self.name = "Main"

var popup = 0;
var popfoot = 0;
function NewWindow(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=yes'
win = window.open(mypage, myname, winprops)
win.focus()
popup = 1
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function popWindow(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=yes'
popwin = window.open(mypage, myname, winprops)
popwin.focus()
popfoot = 2
}
function popWin(url, name){
	popup = window.open (url, name,"width=800,height=600,scrollbars=yes,toolbar=yes,location=yes,menubar=yes,resizable=yes,status=yes");
popup = 3
}

function CloseWindow() {
if (popup == 1)
  {
  win.close();
    }
	
	if (popfoot == 2)
  {
  popwin.close();
    }
	else
	if (popup == 3)
  {
  popup.close();
    }
	
}

function changeImage(filename)
{
   document.mainimage.src = filename;
}

function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures); }

