﻿// JScript File

function PopUpWindow(sPage, sName, iW, iH, bScroll) {
var iLeft = (screen.width - iW) / 2;
var iTop = (screen.height - iH) / 2;
sProps = 'height='+iH+',width='+iW+',top='+iTop+',left='+iLeft+',scrollbars='+bScroll+',resizable'
wNew = window.open(sPage, sName, sProps)
if (parseInt(navigator.appVersion) >= 4) { wNew.window.focus(); }
}



function clickButton(e, buttonid){ 
var bt = document.getElementById(buttonid);
  if (typeof bt == 'object'){ 
        if (e.keyCode == 13){ 
                        bt.click(); 
                        return false; 
                  } 
      } 
}
 
function setFocus(e, ctrlid){ 
var ctrl = document.getElementById(ctrlid);
  if (typeof ctrl == 'object'){ 
        if (e.keyCode == 13){ 
                        ctrl.focus(); 
                        return false; 
                  } 
      } 
}

function fnDisable(e, ctrlid){ 
var ctrl = document.getElementById(ctrlid);
  if (typeof ctrl == 'object'){ 
    //ctrl.style="disabled='true'"
ctrl.disabled="true"
}
}


function removeFrame() {
	if (parent.frames.length > 0) {
	    parent.location.href = self.document.location;
	}
}

/*
	var msgnoright = "ouch!!!!"; 
	function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ 	alert(msgnoright); return false; } 
	if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { 	alert(msgnoright); 	return false; } } 
	document.onmousedown = rtclickcheck;
*/

/* Stop Right Click

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
*/
