function WinOpen(url,windowName) {
  var winHandler = window.open(url,windowName,"left=50,top=50,width=700,height=500,toolbar=0,menubar=0,location=0,status=0,resizable=1,scrollbars=1");
  return winHandler;
}

/*----- key press event handler, which handle enter event to perform action script ----- */
function keyPressHandler(e,elemID, action) {
	var keynum;	//key ASCII value
	if(window.event) // IE
	{
		keynum = e.keyCode;
	}
	else if(e.which) // Netscape//Firefox/Opera
	{
		keynum = e.which;
	}
	if(keynum==13) {
		//----- perform action script -----
		if(action == "click") {
			document.getElementById(elemID).click();
		}
		else {
			eval(action);
		}
		return false;	//----- return false (to mark event as handled) -----
	}
	//----- pass on the event if not enter key -----
	return true;
}
function GetHeight(){
    return screen.height - 50;
}
function GetWidth(){
    return screen.width - 50;
}
function SetDefHeight(){

    var dmain = document.getElementById("dmain");
    if(dmain != null ){
        dmain.style.height = "" + (document.body.clientHeight - 95) + "px";
    }
}

function SetMainHeight(){
    var dmain = document.getElementById("dmain");
    if(dmain != null){
        dmain.style.height = "" + (document.body.clientHeight - 150) + "px";
    }
}

/*----- Disable Right Mouse Click ----- */
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
	if (event.button==2){
		//alert(message);
		return false;
	}
}

function clickNS4(e){
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){
			//alert(message);
			return false;
		}
	}
}

if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
	document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("return false")
/*----- End Disable Right Mouse Click ----- */

function showMenu(){
    var admMenu = document.getElementById("menu");
    admMenu.style.visibility = "visible";
    admMenu.style.display = "inline";
}
function hideMenu(){
    var admMenu = document.getElementById("menu");
    admMenu.style.visibility = "hidden";
    admMenu.style.display = "none";
}
function init(){
    var wait = document.getElementById("wait");
    wait.style.height = (document.body.offsetHeight - 40) +"px";
}

function popWin(url, name) {
    var winHandler = window.open(url,name,"left=50,top=50,width=700,height=500,toolbar=0,menubar=0,location=0,status=0,resizable=1,scrollbars=1");
}
