// JavaScript Document
function popup(theURL,winName,features) {
		var myW = features.substr((features.indexOf("width=") + 6),3);
		var myH = features.substr((features.indexOf("height=") + 7),3);
		var myX = Math.floor((screen.availWidth-myW-10)/2);
		var myY = Math.floor((screen.availHeight-myH-15)/2);
		var myPos = ",left=" + myX + ",top=" + myY;
		features = features + myPos;
		newwindow=window.open(theURL,winName,features);
		if (window.focus) {newwindow.focus()}
}

function openPic(thePic,imageWidth,imageHeight,alt) {
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left=20,top=20");
	newWindow.document.open();
	newWindow.document.write('<html><head><title>'+alt+'</title><style type="text/css"><!--body {margin:0;} --></style></head><body onblur="self.close()">'); 
	newWindow.document.write('<img src=\"'+thePic+'\" width='+imageWidth+' height='+imageHeight+' title=\"'+alt+'\" alt=\"'+alt+'\">');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
	return false;
}

function getWindowHeight() {
	var windowHeight=0;
	if (typeof(window.innerHeight)=='number') {
		windowHeight=window.innerHeight;
	} else {
		if (document.documentElement&&document.documentElement.clientHeight) {
			windowHeight=document.documentElement.clientHeight;
		} else {
			if (document.body&&document.body.clientHeight) {
				windowHeight=document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
