var strPub = '';

function loadPortal(){
	var arrLinks = new Array();
	var strLink = document.getElementById("portal").getElementsByTagName("a")[0];
	var arrAs = document.getElementById("portal").getElementsByTagName("a");
	var strHtml = document.getElementById("issueDate").innerHTML.replace(":","=");
	var strFlash = AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','900','height','500','title','Kidsville News!','src','/images/flash/portal15?'+strHtml,'quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','/images/flash/portal15?'+strHtml,'wmode','transparent');
	var strHtml = document.getElementById("portal").innerHTML;
	strHtml = strFlash + strHtml;
	document.getElementById("portal").innerHTML = strHtml;
	arrAs[0].onclick = function(){
		homeNavMode('Teachers',strLink);
		return false;
	};
	arrAs[1].onclick = function(){
		homeNavMode('Kids',strLink);
		return false;
	};
	arrAs[2].onclick = function(){
		homeNavMode('Parents',strLink);
		return false;
	};
	arrAs[3].onclick = function(){
		homeLink('/games');
		return false;
	};
	arrAs[4].onclick = function(){
		homeLink('/trumans_song.aspx');
		return false;
	};
	arrAs[5].onclick = function(){
		homeLink('/wheres_kidsville.aspx');
		return false;
	};
	arrAs[6].onclick = function(){
		homeLink('/contact_national_hq.aspx');
		return false;
	};
	arrAs[7].onclick = function(){
		homeLink('/cart');
		return false;
	};
}

function homeLink(strLink){
	document.cookie = 'pub = '+strPub+'; path=/';
	window.location.href = strLink;	
}

function homeNavMode(strMode,gotoPage){
	navMode = strMode;
	document.cookie = 'navMode = '+strMode+'; path=/';
	document.cookie = 'pub = '+strPub+'; path=/';
	window.location.href = gotoPage;
}