// JavaScript Document
// this one will make a window automatically fit screen res. call from onLoad
function resetWin ()
{
	window.moveTo(0,0);
if (document.all) 
 {
	top.window.resizeTo(screen.availWidth,screen.availHeight);
 }
else if (document.layers||document.getElementById) 
 {
	if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth)
	{
		top.window.outerHeight = screen.availHeight;
		top.window.outerWidth = screen.availWidth;
	}
 }
}

// preload images
function preloadimages(imagesstring){
 var imagesarray;
 var count;
 imagesarray=imagesstring.split(",");
 for(count=0;count<imagesarray.length;count++){
  newimage=new Image();
  newimage.src=imagesarray[count];
 }
} 
function NewWindow(mypage, myWidth, myHeight, scrollbars, winresize) {
winName = new Date().getTime();
var win = null
var resw = screen.width;
var resh = screen.height;
var winl = (screen.width - myWidth) / 2;
var wint = (screen.height - myHeight) / 2;
winprops = 'height='+myHeight+',width='+myWidth+',top='+wint+',left='+winl+',scrollbarsbars='+scrollbars+',resizable='+winresize+'';
winpropsmac = 'height='+myHeight+',width='+screen.width+',top=0,left=7,scrollbarsbars='+scrollbars+',resizable='+winresize+'';
winpropswin = 'height='+myHeight+','+myWidth+',top=4,left=1,scrollbarsbars='+scrollbars+',resizable='+winresize+'';
	if ((navigator.platform == "MacPPC") && (resw <= 832)) {
	win = window.open(mypage, winName, winpropsmac);
	}
	else if (resw <= 832) {
	win = window.open(mypage, winName, winpropswin);
	}
	else {
	win = window.open(mypage, winName, winprops);
	}
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
if (!win.opener) win.opener = self;
}
function popFullSize(URL) {

id = new Date().getTime();
if (navigator.platform == "MacPPC") {
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width='+(screen.width)+',height='+(screen.height-40)+',left = 0,top = 0');");
}
else {
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width='+(screen.width-10)+',height='+(screen.height-175)+',left = 0,top = 0');");
}

}