<!--
//email and text alerts
function addSeriesNewsletter(a, rtn, ttl) {
	var _return = rtn;
	var _title = ttl;
	var _submit = a.getAttribute('href');
	var _params = ['', _submit, '&returnurl=', _return, '&returntitle=', escape(_title)];
	document.location = _params.join('');
}

//add this favorites
function addBookmark() {
	if (document.all) {
		window.external.AddFavorite(location.href, document.title);
	}
	else if (window.sidebar) {
		window.sidebar.addPanel(document.title, location.href, "");
	}
}

//select all
function selectAll(theField) {
	var tempval=eval("document."+theField)
	tempval.focus()
	tempval.select()
}

function disableRightClick() {
	alert("Showtime Networks Inc., a CBS Company. All rights reserved.")
}

//victim files
function popVictimFiles() {
	popWin = window.open('/site/dexter/victim_files.do', 'victim_files', 'scrollbars=no, width=873, height=590');
	popWin.focus();
}

//blood spatter
function popBloodSpatter() {
	popWin = window.open('/site/dexter/blood_spatter.do', 'blood_spatter', 'scrollbars=no, width=800, height=600');
	popWin.focus();
}

//BEGIN games
function gameEmbed(Loc) {
	embed=window.open(Loc,"embed","toolbar=no,scrollbars=yes,directories=no,resizable=no,menubar=no,width=820,height=600,top=50,left=200,screeny=50,screenx=200");
	passedVariable = "";
	embed.focus();
}

function gameEmail(Loc) {
	email=window.open(Loc,"email","toolbar=no,scrollbars=yes,directories=no,resizable=no,menubar=no,width=820,height=600,top=50,left=200,screeny=50,screenx=200");
	passedVariable = "";
	email.focus();
}
//END games

//BEGIN image preloads and rollovers
var preloadFlag = false;
function preload() {
	var a = new Image();
	a.src= "/site/dexter/season4/images/home/nav/main_off.png";
	a.src= "/site/dexter/season4/images/home/nav/main_on.png";
	a.src= "/site/dexter/season4/images/home/nav/about_the_series_off.png";
	a.src= "/site/dexter/season4/images/home/nav/about_the_series_on.png";
	a.src= "/site/dexter/season4/images/home/nav/series_schedule_off.png";
	a.src= "/site/dexter/season4/images/home/nav/series_schedule_on.png";
	a.src= "/site/dexter/season4/images/home/nav/series_video_off.png";
	a.src= "/site/dexter/season4/images/home/nav/series_video_on.png";
	a.src= "/site/dexter/season4/images/home/nav/episode_guide_off.png";
	a.src= "/site/dexter/season4/images/home/nav/episode_guide_on.png";
	a.src= "/site/dexter/season4/images/home/nav/cast_and_characters_off.png";
	a.src= "/site/dexter/season4/images/home/nav/cast_and_characters_on.png";
	a.src= "/site/dexter/season4/images/home/nav/special_features_off.png";
	a.src= "/site/dexter/season4/images/home/nav/special_features_on.png";
	a.src= "/site/dexter/season4/images/home/nav/downloads_off.png";
	a.src= "/site/dexter/season4/images/home/nav/downloads_on.png";
	a.src= "/site/dexter/season4/images/home/nav/message_boards_off.png";
	a.src= "/site/dexter/season4/images/home/nav/message_boards_on.png";
	a.src= "/site/dexter/season4/images/home/nav/series_shop_off.png";
	a.src= "/site/dexter/season4/images/home/nav/series_shop_on.png";
	a.src= "/site/dexter/season4/images/home/nav/mobile_off.png";
	a.src= "/site/dexter/season4/images/home/nav/mobile_on.png";
	a.src= "/site/dexter/season4/images/nav/main_off.png";
	a.src= "/site/dexter/season4/images/nav/main_on.png";
	a.src= "/site/dexter/season4/images/nav/about_the_series_off.png";
	a.src= "/site/dexter/season4/images/nav/about_the_series_on.png";
	a.src= "/site/dexter/season4/images/nav/series_schedule_off.png";
	a.src= "/site/dexter/season4/images/nav/series_schedule_on.png";
	a.src= "/site/dexter/season4/images/nav/series_video_off.png";
	a.src= "/site/dexter/season4/images/nav/series_video_on.png";
	a.src= "/site/dexter/season4/images/nav/episode_guide_off.png";
	a.src= "/site/dexter/season4/images/nav/episode_guide_on.png";
	a.src= "/site/dexter/season4/images/nav/cast_and_characters_off.png";
	a.src= "/site/dexter/season4/images/nav/cast_and_characters_on.png";
	a.src= "/site/dexter/season4/images/nav/special_features_off.png";
	a.src= "/site/dexter/season4/images/nav/special_features_on.png";
	a.src= "/site/dexter/season4/images/nav/downloads_off.png";
	a.src= "/site/dexter/season4/images/nav/downloads_on.png";
	a.src= "/site/dexter/season4/images/nav/message_boards_off.png";
	a.src= "/site/dexter/season4/images/nav/message_boards_on.png";
	a.src= "/site/dexter/season4/images/nav/series_shop_off.png";
	a.src= "/site/dexter/season4/images/nav/series_shop_on.png";
	a.src= "/site/dexter/season4/images/nav/mobile_off.png";
	a.src= "/site/dexter/season4/images/nav/mobile_on.png";
	a.src= "/site/dexter/season4/images/schedule/showtime_hd_off.png";
	a.src= "/site/dexter/season4/images/schedule/showtime_hd_on.png";
	a.src= "/site/dexter/season4/images/schedule/showtime_off.png";
	a.src= "/site/dexter/season4/images/schedule/showtime_on.png";
	a.src= "/site/dexter/season4/images/schedule/showtime_vod_off.png";
	a.src= "/site/dexter/season4/images/schedule/showtime_vod_on.png";
	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;
	}
}
//END image preloads and rollovers

//show and hide layers
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";
	}
}

//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';
		}
	}
}

//toggle div slider
function toggleDiv(divName) {
	if ($(divName).visible()) {
		$(divName).blindUp();
	}
	else {
		$(divName).blindDown();
	}
}

//downloads page interviews
function toggleInterviews(divName) {
	//hide all
	hideAllInterviews();
	
	//show tab user clicked on
	$(divName).show();
	
	//show all tabs as de-selected
	deselectAllInterviewTabs();
	
	//show tab as selected
	var tab = divName + '_btn';
	$(tab).addClassName('currentTab');
	//alert(tab);
}
function deselectAllInterviewTabs() {
	$('intSeason1_btn').removeClassName('currentTab');
	$('intSeason2_btn').removeClassName('currentTab');
	//$('intSeason3_btn').removeClassName('currentTab');
	if ($('intSeason3_btn')) {
		$('intSeason3_btn').removeClassName('currentTab');
	}
}
function hideAllInterviews() {
	$('intSeason1').hide();
	$('intSeason2').hide();
	$('intSeason3').hide();
	//$('intSeason4').hide();
}
// -->
