

cstv={ajax:{}};
cstv.ajax.x=function(o)
{
	var _obj=false;
	try
	{
		_obj={o:o,ax:new ActiveXObject("Msxml2.XMLHTTP")};return _obj;
	} catch(e)
	{
		try{_obj={o:o,ax:new ActiveXObject("Microsoft.XMLHTTP")};return _obj;}
		catch(e){_obj=false;}
	};
	if(typeof XMLHttpRequest!="undefined")
	{
		try{_obj={o:o,ax:new XMLHttpRequest()};/*_obj.overrideMimeType("text/xml");*/return _obj;}
		catch(e){_obj=false;}
	};
	alert("cstv.ajax does not support your browser ... just yet ..."); 
	return null;
};
cstv.ajax.send=function(u,f,m,a,o,h){var x=cstv.ajax.x(o);x.ax.open(m,u,true);x.ax.onreadystatechange=function(){if(x.ax.readyState==4)f(x.ax.responseText,x.o,x.ax)};
	if(h){ for(var i in h){x.ax.setRequestHeader(i,h[i]);}}
	x.ax.send(a);return(x);};
cstv.ajax.get=function(url,func,o,h){ return(cstv.ajax.send(url,func,'GET',null,(typeof(o)!="undefined")?o:null,(typeof(h)!="undefined")?h:null));};
	

// module top_2

		var ls_curtab="read";
		function highlighttab(t)
		{
			document.getElementById("ls_tab_"+t).style.backgroundPosition=(t==ls_curtab)?"0 -198px":"0 -198px";
		}
		function dehighlighttab(t)
		{document.getElementById("ls_tab_"+t).style.backgroundPosition=(t==ls_curtab)?"0 -132px":"0 0";};

		
		selecttab=function(t)
		{
			document.getElementById("ls_tab_"+ls_curtab).style.backgroundPosition="0 0";
			ls_curtab=t;
			document.getElementById("ls_tab_"+ls_curtab).style.backgroundPosition="0 -132px";
			cstv.ajax.get
			(
				window.location.pathname.replace(/\/[^\/]+$/,"").replace(/^\/$/,"")+
				"/library/inc/psu-07-ls_tab_"+t+".html?rnd="+Math.random(),
				function(a,t) 
				{ 
					try
					{ 
						document.getElementById('ls_content').innerHTML=a; 
						if(t=="read"){psuheadlines.mouseclick('navhl1',1);}
//						if(t=="view" && typeof(videoContaner)!="undefined" && typeof(videoContaner[cursport])!="undefined"){placevideo(videoContaner[cursport]);}
					}catch(e){alert("Lead Story Content Error:\n"+e);}
					
				},
				t
			)
		};

		var videoContaner = {
		vidabbrev : "psu",
		aaVid : "",
		aaImg : "",
		aaW : "",
		aaH : "",
		videoAutoPlay : false,
		asControls : "y",
		aaStatusBar : "n",
		aAd : "&bumper=both" // make this string EMPTY to restore FREQUENCY CAPPING - first, last or both otherwise
		};


/*
loadvideolist=function(src)
{
	cstv.ajax.get
	(
		 window.location.protocol+"//"+window.location.host+"/"+src+"?ord="+Math.random()
		,function(a)
		{
			try{document.getElementById('div_lists').innerHTML=a;}catch(e){alert("couldn't find div_lists");}
		}
	)
};
*/

playVideo=function(url,title)
{
	try
	{
		var isMSIE = /*@cc_on!@*/false;
		var windowless=(isMSIE)?"y":"n";
		document.getElementById('videoiframe').src="http://www.cstv.com/media_server/play.smil?school=psu&autoplay=y&endimage=&swstat=n&swcntl=y&width=400&height=316&media_type=video&specialtemplate=dynamic_allaccess&windowless="+windowless+"&bumper=both&adpageid=&content="+url;
//		document.getElementById('videoiframe').src="http://www.cstv.com/media_server/play.smil?school=cs&media_type=video&width=400&height=316&swstat=n&specialtemplate=playeronlyTest&windowless="+windowless+"&bumper=both,cstv.frontpage&content="+url;
		document.getElementById('nowplaying').innerHTML=title;
	}catch(e){alert(e);}
		return(void(0));
};


var psuheadlines=
{
	mouseclick:function(id,panel)
	{
		$('#nav-headlines li').removeClass('clicked');
		$('#' + id).addClass('clicked');
		$('#stories .panel').hide();
		$('#panel_'+panel).show();
	}
	,mouseout:function(id){$('#' + id).removeClass('highlighted');}
	,mouseover:function(id){$('#' + id).addClass('highlighted');}
}
var psuvh=
{
	mouseclick:function(id,panel)
	{
		$('#nav-headlines li').removeClass('clicked');
		$('#' + id).addClass('clicked');
		$('#stories .panel').hide();
		$('#panel_'+panel).show();
	}
	,mouseout:function(id){$('#' + id).removeClass('highlighted');}
	,mouseover:function(id){$('#' + id).addClass('highlighted');}
}


var sportnames={
'c-lionclub':"Nittany Lion Club"
,'c-psuac':"PSUac"
,'c-track':"Track & Field"
,'c-xc':"Cross Country"
,'m-basebl':"Baseball"
,'m-baskbl':"Men's Basketball"
,'m-fenc':"Men's Fencing"
,'m-footbl':"Football"
,'m-golf':"Men's Golf"
,'m-gym':"Men's Gymnastics"
,'m-lacros':"Men's Lacrosse"
,'m-soccer':"Men's Soccer"
,'m-swim':"Men's Swimming &amp; Diving"
,'m-tennis':"Men's Tennis"
,'m-volley':"Men's Volleyball"
,'m-wrestl':"Wrestling"
,'w-baskbl':"Women's Basketball"
,'w-fenc':"Women's Fencing"
,'w-fieldh':"Field Hockey"
,'w-golf':"Women's Golf"
,'w-gym':"Women's Gymnastics"
,'w-lacros':"Women's Lacrosse"
,'w-soccer':"Women's Soccer"
,'w-softbl':"Softball"
,'w-swim':"Women's Swimming &amp; Diving"
,'w-tennis':"Women's Tennis"
,'w-volley':"Women's Volleyball"
}


if(typeof(cursport)=="undefined"){ cursport="index";}
if(typeof(oascodeToUse)=="undefined"){ oascodeToUse="psu";}
