// Functions to open new browser windows
function openPictureWindow_Fever(imageName,imageWidth,imageHeight,alt,posLeft,posTop) {
    var img = new Image;
    img.src = imageName;
    if (imageWidth == 0) imageWidth = img.width;
    if (imageHeight == 0) imageHeight = img.height;
    newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
    newWindow.document.open();
    newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
    newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt='+alt+'>');
    newWindow.document.write('</body></html>');
    newWindow.document.close();
    newWindow.focus();
		return newWindow;
}

function openWindow(url,name,width,height) {
	newWindow = window.open(url,name,"width="+width+",height="+height+",scrollbars=yes,resizable=yes,location=yes");
	newWindow.focus();
	return newWindow;
}

function openInfoWindow(url,name,width,height) {
	newWindow = window.open(url,name,"width="+width+",height="+height+",scrollbars=no,resizable=no,location=no");
	newWindow.focus();
	return newWindow;
}

function openWinNameSizeMenuLocation(url, name, width, height, menubar, location) {
	aWindow = window.open(url, name, "toolbar=no,location=" + (location ? "yes" : "no") + ",directories=no,status=yes,menubar=" + (menubar ? "yes" : "no") + ",resizable=yes,copyhistory=no,scrollbars=yes,width=" + width + ",height=" + height + ",left=0,top=0");
	if(window.focus) {
		//delay a bit here because IE4 encounters errors
		//when trying to focus a recently opened window
		 setTimeout("aWindow.focus();", 250);
	}
}

function openWinSize(URL, width, height) {
	aWindow = openWinNameSzMenu('thewindow', width, height, false);
}

function openWin(url){
	openWinSize(url, 400, 300);
}

function openWinName640by480(url, name) {
	OpenWinNameSizeMenuLocation(url, name, 640, 480, true, true);
}

function popW(url){
  r=Math.random();t=Math.round(r*250);
  r=Math.random();l=Math.round(r*600);
  if (navigator.appName=="Netscape") {
    oWin=window.open("","_blank","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
  }
  else {
    if (navigator.appName=="Microsoft Internet Explorer"){oWin=window.open("","","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");}
  }
  if (oWin!=null){ oWin.resizeTo(450,400);oWin.moveTo(l,t);oWin.location=url; }
}