	var action = location.href.split("?")[1];
	var swf = "swf/PS_Loader.swf?home_page=swf/Intro_tim.swf";
	var width = "100%";
	var height = "100%";
	var pageVar = "";//action.substring(4); // used to get 'pid=' out of the string
	
	//alert("action:" + action);
	if(action == undefined){
		action = "";
	}else{
		pageVar = action.substring(4);
		action = "&" + action;
	}
	//swf = swf + action;
	
	function popup(url, width, height, name)
	{
		var w = window.open(url, name, "width=" + width + ",height=" + height + ",resizeable=no,scrollbars=no,toolbar=no,location=no");
		w.focus();
	}

	function doNav(swf, width, height){
		var contentString = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'" id="main" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+swf+'" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#000000" /><embed src="'+swf+'" quality="best" wmode="transparent" bgcolor="#000000" width="'+width+'" height="'+height+'" name="main" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
		document.write(contentString);
	}
	
	function doFlash(swf, width, height){
		if (pageVar == "archive"){
			var contentString = '<iframe src="archive/index.html" width="100%" height="628" frameborder="0" scrolling="no"></iframe>';
		} else {
			var contentString = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'" id="main" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+swf+'" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#000000" /><embed src="'+swf+'" quality="best" wmode="transparent" bgcolor="#000000" width="'+width+'" height="'+height+'" name="main" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
		}
		document.write(contentString);
	}
	
	function getPageTitle(){
		// Upon obtaining the variable of what page we are on this will match it with the appropriate title
		switch(pageVar){
		case "home":
			return "Home";
			break;
		case "june":
			return "This is My Tune";
			break;
		case "ninja":
			return "Attack of the Germs";
			break;
		case "ponies":
			return "Farty Food Game";
			break;
		case "maze":
			return "Melville Maze Game";
			break;
		case "bowling":
			return "Gnaughty Gnomes Bowling Game";
			break;
		case "gastro":
			return "Gastro Surgery Game";
			break;
		case "dino":
			return "Excavate a Dinosaur";
			break;
		case "news":
			return "News Readers";
			break;
		case "rappers":
			return "Petshop Rappers";
			break;
		case "cooking":
			return "Cooking with Dr. Inosaur";
			break;
		case "mail":
			return "Parp Mail";
			break;
		case "gallery":
			return "Gallery";
			break;
		case "archive":
			return "Archive";
			break;
		case "museum":
			return "Museum";
			break;
		case "pink_house":
			return "The Pink House";
			break;
		case "hospital":
			return "Hospital";
			break;
		default:
			return "";
		}
	}
	
	window.focus();

