<!--
//video overlay
function videoOverlay() {
	SHO.SimpleVideo.play('player','21221247001');
	OmniHelp.tc('video:ilenepartone');
}
//email/wireless script
function membership_pop(Loc) {
	this.window.name = "save_params";
	membership=window.open(Loc,"membership","toolbar=no,scrollbars=yes,directories=no,resizable=yes,menubar=no,width=800,height=600,top=20,left=200,screeny=20,screenx=200");
	membership.focus();
}
//disable right click function
function disableRightClick() {
	alert("Please click on the image to open it in a new window for saving. Showtime Networks Inc., a CBS Company. All rights reserved.")
}
//episode photo popups
function epPhotosPop(Loc) {
	photo=window.open(Loc,"photo","toolbar=no,scrollbars=no,directories=no,resizable=no,menubar=no,width=600,height=575,top=50,left=200,screeny=50,screenx=200");
	passedVariable = "";
	photo.focus();
}
//jenny widget popups
function jennyPop(Loc) {
	jenny=window.open(Loc,"jenny","toolbar=no,scrollbars=no,directories=no,resizable=no,menubar=no,width=600,height=640,top=50,left=200,screeny=50,screenx=200");
	passedVariable = "";
	jenny.focus();
}
//episode popup with scrollbars
function popScroll(Loc) {
	pop=window.open(Loc,"pop","toolbar=no,scrollbars=yes,directories=no,resizable=no,menubar=no,width=617,height=575,top=50,left=200,screeny=50,screenx=200");
	passedVariable = "";
	pop.focus();
}
//select all
function selectAll(theField) {
	var tempval=eval("document."+theField)
	tempval.focus()
	tempval.select()
}
//image preloads
var preloadFlag = false;
function preload() {
	var a = new Image();
	a.src= "/site/lword/season6/images/nav/alerts_off.gif";
	a.src= "/site/lword/season6/images/nav/alerts_on.gif";
	a.src= "/site/lword/season6/images/nav/characters_off.gif";
	a.src= "/site/lword/season6/images/nav/characters_on.gif";
	a.src= "/site/lword/season6/images/nav/community_off.gif";
	a.src= "/site/lword/season6/images/nav/community_on.gif";
	a.src= "/site/lword/season6/images/nav/downloads_off.gif";
	a.src= "/site/lword/season6/images/nav/downloads_on.gif";
	a.src= "/site/lword/season6/images/nav/episodes_off.gif";
	a.src= "/site/lword/season6/images/nav/episodes_on.gif";
	a.src= "/site/lword/season6/images/nav/home_off.gif";
	a.src= "/site/lword/season6/images/nav/home_on.gif";
	a.src= "/site/lword/season6/images/nav/schedule_off.gif";
	a.src= "/site/lword/season6/images/nav/schedule_on.gif";
	a.src= "/site/lword/season6/images/nav/shop_off.gif";
	a.src= "/site/lword/season6/images/nav/shop_on.gif";
	a.src= "/site/lword/season6/images/nav/special_features_off.gif";
	a.src= "/site/lword/season6/images/nav/special_features_on.gif";
	a.src= "/site/lword/season6/images/nav/video_off.gif";
	a.src= "/site/lword/season6/images/nav/video_on.gif";
	a.src= "/site/lword/season6/images/schedule/showtime_off.gif";
	a.src= "/site/lword/season6/images/schedule/showtime_on.gif";
	a.src= "/site/lword/season6/images/schedule/showtime_over.gif";
	a.src= "/site/lword/season6/images/schedule/showtime_hd_off.gif";
	a.src= "/site/lword/season6/images/schedule/showtime_hd_on.gif";
	a.src= "/site/lword/season6/images/schedule/showtime_hd_over.gif";
	a.src= "/site/lword/season6/images/schedule/showtime_vod_off.gif";
	a.src= "/site/lword/season6/images/schedule/showtime_vod_on.gif";
	a.src= "/site/lword/season6/images/schedule/showtime_vod_over.gif";
	preloadFlag = true;
}
function swapImgRestore() {//v3.0
	var i,x,a=document.sr;
	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function findObj(n, d) {//v4.01
	var p,i,x;
	if(!d) d=document;
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) x=d.all[n];
	for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n);
	return x;
}
function swapImage() {//v3.0
	var i,j=0,x,a=swapImage.arguments;
	document.sr=new Array;
	for(i=0;i<(a.length-2);i+=3)
	if ((x=findObj(a[i]))!=null) {
		document.sr[j++]=x;
		if(!x.oSrc) x.oSrc=x.src;
		x.src=a[i+2];
	}
}
function reloadPage(init) {//reloads the window if Nav4 resized
	if (init==true) with (navigator) {
		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
			document.pgW=innerWidth;
			document.pgH=innerHeight;
			onresize=reloadPage;
		}
	}
	else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);
function showHideLayers() {//v6.0
	var i,p,v,obj,args=showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) {
		v=args[i+2];
		if (obj.style) {
			obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v;
		}
		obj.visibility=v;
	}
}
function showHide(whichLayer) {
	if (document.getElementById) {
		//standard
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	}
	else if (document.all) {
		//old msie versions
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
	else if (document.layers) {
		//nn4
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
}
//BEGIN MORE EPISODES
var img_close = '/site/lword/season6/images/minus.gif';
var img_open = '/site/lword/season6/images/plus.gif';
function toggleMenu(objID) {
	if (!document.getElementById) {
		return;
	}
	var ob = document.getElementById(objID).style;
	var ot = document.getElementById(objID + 'title');
	ob.display = (ob.display === 'block')?'none': 'block';
	if (ob.display === 'none') {
		document.images[objID + 'but'].src = '/site/lword/season6/images/plus.gif';
		document.images['allepisodesbut'].src = '/site/lword/season6/images/plus.gif';
		ot.className = 'pointeropen';
		document.getElementById('allepisodestitle').className = 'pointeropen';
	}
	else {
		document.images[objID + 'but'].src = '/site/lword/season6/images/minus.gif';
		ot.className = 'pointerclose';
	}
}
function toggleEpisodes() {
	var titlestyle = document.getElementById('allepisodestitle');
	if (titlestyle.className === 'pointeropen') {
		openEpisodes();
	}
	else {
		closeEpisodes();
	}
}
function openEpisodes(action) {
	var titlestyle = document.getElementById('allepisodestitle');
	titlestyle.className = 'pointerclose';
	document.images['allepisodesbut'].src = '/site/lword/season6/images/minus.gif';
	if (!document.getElementById) {
		return;
	}
	for (var i = 1; i <= 13; i++) {
		var ob = document.getElementById('episode' + i).style;
		ob.display = 'block';
		document.images['episode' + i + 'but'].src = '/site/lword/season6/images/minus.gif';
		document.getElementById('episode' + i + 'title').className = 'pointerclose';
	}
}
function closeEpisodes() {
	var titlestyle = document.getElementById('allepisodestitle');
	titlestyle.className = 'pointeropen';
	document.images['allepisodesbut'].src = '/site/lword/season6/images/plus.gif';
	if (!document.getElementById) {
		return;
	}
	for (var i = 1; i <= 12; i++) {
		var ob = document.getElementById('episode' + i).style;
		ob.display = 'none';
		document.images['episode' + i + 'but'].src = '/site/lword/season6/images/plus.gif';
		document.getElementById('episode' + i + 'title').className = 'pointeropen';
	}
}
//END MORE EPISODES
//BEGIN past podcasts
function toggle(toggleId, e) {
	if (!e) {
		e = window.event;
	}
	if (!document.getElementById) {
		return false;
	}
	var body = document.getElementById(toggleId);
	if (!body) {
		return false;
	} 
	var im = toggleId + "_toggle";
	if (body.style.display == 'none') {
		body.style.display = 'block';
		if (document.images[im]) {
			document.images[im].src = "/site/lword/season6/images/minus.gif";
		}
	}
	else {
		body.style.display = 'none';
		if (document.images[im]) {
			document.images[im].src = "/site/lword/season6/images/plus.gif";
		}
	}
	if (e) {
		e.cancelBubble = true;
		if (e.stopPropagation) {
			e.stopPropagation();
		}
	}
}
//END past podcasts
//get details layer
function hideInstructions(mylayer) {
	if (document.getElementById) {
		document.getElementById(mylayer).style.visibility = 'hidden';
	}
	else {
		if (document.layers) {
			document.mylayer.visibility = 'hidden';
		}
		else {
			document.all.mylayer.style.visibility = 'hidden';
		}
	}
}
function showInstructions(mylayer) {
	if (document.getElementById) {
		document.getElementById(mylayer).style.visibility = 'visible';
	}
	else {
		if (document.layers) {
			document.mylayer.visibility = 'visible';
		}
		else {
			document.all.mylayer.style.visibility = 'visible';
		}
	}
}

/* BEGIN form scripts */
/*Form field Limiter script- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use*/
var ns6=document.getElementById&&!document.all
function restrictinput(maxlength,e,placeholder) {
	if (window.event&&event.srcElement.value.length>=maxlength)
	return false
	else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength) {
		//detect alphanumeric keys
		var pressedkey=/[a-zA-Z0-9\.\,\/]/
		if (pressedkey.test(String.fromCharCode(e.which)))
		e.stopPropagation()
	}
}
function countlimit(maxlength,e,placeholder) {
	var theform=eval(placeholder)
	var lengthleft=maxlength-theform.value.length
	var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
	if (window.event||e.target&&e.target==eval(placeholder)) {
		if (lengthleft<0)
		theform.value=theform.value.substring(0,maxlength)
		placeholderobj.innerHTML=lengthleft
	}
}
function displaylimit(thename, theid, thelimit) {
	var theform=theid!=""? document.getElementById(theid) : thename
	var limit_text='Characters remaining: <span id="'+theform.toString()+'">'+thelimit+'</span>'
	if (document.all||ns6)
	document.write(limit_text)
	if (document.all) {
		eval(theform).onkeypress=function() {
			return restrictinput(thelimit,event,theform)
		}
		eval(theform).onkeyup=function() {
			countlimit(thelimit,event,theform)
		}
	}
	else if (ns6) {
		document.body.addEventListener('keypress', function(event) {
			restrictinput(thelimit,event,theform)
		}, true);
		document.body.addEventListener('keyup', function(event) {
			countlimit(thelimit,event,theform)
		}, true);
	}
}
/*END form field limiter*/
// -->