function popUp(pName, path, w, h){
	if(typeof(newWin)!="undefined"){
		if(!newWin.closed) { newWin.close(); }
	}
	ww = w+100;
	wh = h+80;
	t = (screen.height/2)-(wh/2);
	l = (screen.width/2)-(ww/2);
	newWin = window.open('','newWin',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width="+ww+",height="+wh+",left="+l+",top="+t);
	newWin.document.write("<html><head><title>PTW - "+pName+"</title><LINK type='text/css' rel='stylesheet' href='popup.css'></head><body><div id='line'></div><p id='pTitle'></p><img src='"+path+"' width="+w+" height="+h+" id='pic' /><img id='logo' src='webimages/logo.gif' /></body></html>");
	newWin.document.close;
	if(window.focus) { newWin.focus(); }
}

screenHeight = 0;
screenWidth = 0;
function getDimensions(){
	if (document.getElementById && !document.all){
		screenHeight = window.innerHeight;
		screenWidth = window.innerWidth;
	} else {
		screenHeight = document.documentElement.clientHeight;
		screenWidth = document.documentElement.clientWidth;
		if(screenHeight == 0){
			screenHeight = document.body.clientHeight;
			screenWidth = document.body.clientWidth;
		}
	}
}


function fullscreen(page){
		if(typeof(newWin)!="undefined"){
			if(!newWin.closed) { newWin.close(); }
		}
		wh = screen.height;
		ww = screen.width;
		t = 0;
		l = (screen.width/2)-(ww/2);
		newWin = window.open(page,'ptw',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width="+ww+",height="+wh+",left="+l+",top="+t);
		if(window.focus) { newWin.focus(); }
	}
	
	
function setAlpha(name, opacity){
	obj = document.getElementById(name);
	if (obj.style.MozOpacity!=null) {  
		// Mozilla's pre-CSS3 proprietary rule
		obj.style.MozOpacity = (opacity/100) - 0.001;
	} else if (obj.style.opacity!=null) {
		// CSS3 compatible
		obj.style.opacity = (opacity/100) - 0.001;
	} else if (obj.style.filter!=null) {
		// IE's proprietary filter
		obj.style.filter = "alpha(opacity="+opacity+")";
	}
}
//gets something's opacity
function getAlpha(name){
	obj = document.getElementById(name);
	if (obj.style.MozOpacity!=null) {  
		// Mozilla's pre-CSS3 proprietary rule 
		return (obj.style.MozOpacity*100);
	} else if (obj.style.opacity!=null) {
		// CSS3 compatible 
		return (obj.style.opacity*100);
	} else if (obj.style.filter!=null) {
		// IE's proprietary filter 
		var opac = obj.style.filter;
		var opac_array = opac.split("=");
		opac_array = opac_array[1].split(")");
		opac = parseInt(opac_array[0]);
		return (opac);
	}
}