function onResize(){

	
	if (document.layers || document.all || document.getElementById){
		
		var windowW, windowH, fullW, fullH, finalW, finalH;
		var isSafari = (navigator.appVersion.indexOf("Safari") != -1) ? true : false;
		
		//constants
		
		var minW = 720;
		var minH = 462;
		var maxW = 1014;
		var maxH = 650;
		
		var padLeft = 20;
		var padRight = 0;
		var padTop = 24;
		var padBottom = 0;
		
		
		
		ns4 = (document.layers)? true:false
		ie4 = (document.all)? true:false

		windowW = (ns4)? window.innerWidth-16 : document.body.offsetWidth-20
		windowH = (ns4)? window.innerHeight : document.body.offsetHeight
		
		windowW = windowW-(padLeft*2);
		windowH = windowH-(padTop*2);

		//figure out the full dimensions, would be final without preserving scaling
		
		if(windowW < minW){
			fullW = minW;
		} else {
			fullW = windowW;
		}
		
		if(windowH < minH) {
			fullH = minH;
		} else {
			fullH = windowH;
		}
		
		if ((windowW < maxW) || (windowH < maxH)){
			
			
		
			//preserve scaling
			if (windowW/windowH < maxW/maxH){
				finalW = fullW;
				finalH = (maxH*finalW)/maxW;
				document.getElementById('flashcontent').style.marginLeft = padLeft +"px";
				document.getElementById('pbsLogo').style.marginLeft = (0 - ((windowW)/2)-30)  + "px";
			} else {
				finalH = fullH;
				finalW = (maxW*finalH)/maxH;
				document.getElementById('flashcontent').style.marginLeft = ((windowW-finalW)/2 + padLeft/2)+"px";
				
				document.getElementById('pbsLogo').style.marginLeft = (0 - ((finalW)/2)-45)  + "px";
				
			}
			
			document.getElementById('flashcontent').style.width = finalW + "px";
			document.getElementById('flashcontent').style.height = finalH + "px";
			
			//place the margins to keep it in the top left corner if overflow is occuring
			document.getElementById('flashcontent').style.marginTop =  (padTop-24)  + "px";
			document.getElementById('pbsLogo').style.marginTop = padTop  + "px";
			//document.getElementById('flashcontent').style.marginLeft = ((windowW-maxW)/2)+"px";	
			
		} else {
			//browser is big enough in both directions, so use max
			
if(ie4)
{
			document.getElementById('flashcontent').style.width = maxW + "px";
			document.getElementById('flashcontent').style.height = maxH + "px";
			document.getElementById('flashcontent').style.marginTop = (0 - 240) +"px";
			document.getElementById('flashcontent').style.marginLeft = (0 - padLeft) +"px";
			
			document.getElementById('pbsLogo').style.marginTop = padTop + "px";
			document.getElementById('pbsLogo').style.marginLeft = (0 - 530 - padLeft)  + "px";
}else{
			document.getElementById('flashcontent').style.width = maxW + "px";
			document.getElementById('flashcontent').style.height = maxH + "px";
			document.getElementById('flashcontent').style.marginTop = 0 +"px";
			document.getElementById('flashcontent').style.marginLeft = ((windowW-maxW)/2) + padLeft +"px";
			
			document.getElementById('pbsLogo').style.marginTop = padTop + "px";
			document.getElementById('pbsLogo').style.marginLeft = (0 - 530 - padLeft)  + "px";
}
		}
		
	}
}

function queryString(parameter) { 
	var loc = location.toString().substring(location.toString().indexOf('?')+1,location.toString().length);
	var param_value = false;

	var params = loc.split("&");
	
	for (i=0; i<params.length;i++) {
		param_name = params[i].substring(0,params[i].indexOf('='));
		
		if (param_name == parameter) {
		  param_value = params[i].substring(params[i].indexOf('=')+1)
		}
	}
	if (param_value) {
		return param_value;
	}
	else {
		return false; //Here determine return if no parameter is found
	}
}