function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}
function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

function showImage(atImage)
{
	window.showModalDialog("http://www.BELWarriors.be/" + atImage, "", "center:yes;resizable:yes;scroll:no;status:no;dialogHeight:700px;dialogWidth:800px");
}

function showShoutbox() {
	var x=-30;
	var y=-60;
	if (document.layers) {
		x=x+(window.outerWidth-350)/2;
		y=y+(window.outerHeight-400)/2;
	} else {
		x=x+(screen.Width-350)/2;
		y=y+(screen.Height-400)/2;
	}
	if (x<0) x=0;
	if (y<0) y=0;
	var w=window.open("http://452408.myshoutbox.com/","shoutbox","top="+y+",left="+x+",width=300,height=400,location=0,menubar=0,toolbar=0,status=0,resizable=0,scrollbars=1");
	w.focus();
	return;
}


//***************************************
//* No RIGHT CLICK						*
//***************************************
if (window.Event) 
	document.captureEvents(Event.MOUSEUP); 
	
function nocontextmenu(){ 
	if (event.srcElement.type == "text" || event.srcElement.type == "textarea" || event.srcElement.type == "password"){
	}else{
		event.cancelBubble = false 
		event.returnValue = true; 
		return false; 
	}
} 
	
function norightclick(e){ 
	if (window.Event){ 
		if (e.which !=1) 
			return false; 
	}else{
		if (event.button !=1){ 
			event.cancelBubble = true 
			event.returnValue = false; 
			return false; 
		} 
	}
} 

document.oncontextmenu = nocontextmenu; 
document.onmousedown = norightclick; 

//***************************************
//* Block backspace onKeyDown			*
//***************************************
function onKeyDown() {
	if ( (event.altKey) || ((event.keyCode == 8) && (event.srcElement.type != "text" &&	event.srcElement.type != "textarea" &&	event.srcElement.type != "password")) || ((event.ctrlKey) && ((event.keyCode == 78) || (event.keyCode == 82)) ) || (event.keyCode == 116) ) {
		event.keyCode = 0;
		event.returnValue = false;
	}
}

