//Open Remote Window

var win = null;

function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',menubar=no ,scrollbars='+scroll+',resizable=no'
win = window.open(mypage,myname,settings)
}

var win = null;

function NewWindow2(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',menubar=no ,scrollbars=1'+scroll+',resizable=no'
win = window.open(mypage,myname,settings)
}

function NWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


//Disable Right Click For Images

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
document.oncontextmenu=new Function("return false")
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
document.oncontextmenu=new Function("return false")
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
document.oncontextmenu=new Function("return false")
return false;
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all||document.getElementById)
document.onmousedown=disableclick
else if (document.layers)
associateimages()

function formHandler(form) {
var URL = form.site.options[form.site.selectedIndex].value;
var width = 540
var height = 500
var left = (screen.width - width) / 2;
var top = (screen.height - height) / 2;
var windowprops = "height=500,width=540,left="+ left +",top="+ top +",location=no,scrollbars=Yes,menubars=no,toolbars=no,resizable=yes"
popup = window.open(URL,"MenuPopup",windowprops);
}

if (document.all||document.getElementById)
document.onmousedown=disableclick
else if (document.layers)
associateimages()

function jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
