if(document.images)
{
  var image_array = new Array();
  var path = '/images/';

  // enumeration of the "active" images
  image_array[0] = path + "episode1ON.png";
  image_array[1] = path + "episode2ON.png";
  image_array[2] = path + "episode3ON.png";
  image_array[3] = path + "episode4ON.png";
  image_array[4] = path + "episode5ON.png";
  image_array[5] = path + "episode6ON.png";
  image_array[6] = path + "episode7ON.png";
  image_array[7] = path + "episode8ON.png";
    
  var preload_image = new Array ();
 
  for(var i=0; i<image_array.length; i++)
  {
    preload_image[i]= new Image();
    preload_image[i].src = image_array[i];
  }
}


function rollover(name, filename)
{
  var fullpath = '/images/' + filename;
  document.images[name].src = fullpath;

}


function insertTabs() {

openTable="<table class=headerOuter border=0><tr><td>";
innerTable="<table class=headerInner border=0 align=center><tr>";

logo="<td><a href=/index.html><img src=/images/logo.png width=246 height=80 border=0 id=logo></a></td>";

deathisodes="<td class=button><a href=/deathisodes/index.html><img src=/images/deathisodes.png name=deathisodes width=120 height=20 border=0></a></td>";
blogatorium="<td class=button><a href=/blogatorium/><img src=/images/blogatorium.png name=blog width=125 height=20 border=0></a></td>";
story="<td class=button><a href=/story/index.html><img src=/images/story.png name=give width=65 height=20 border=0></a></td>";
griefResources="<td class=button><a href=/griefResources/index.html><img src=/images/griefResources.png name=downloads width=152 height=20 border=0></a></td>";
payingTribute="<td class=button><a href=/payingtribute/index.html><img src=/images/payingTribute.png name=contacts width=152 height=20 border=0></a></td>";
closeTable="</td></tr></table></td></tr></table>";


document.write(openTable+innerTable+logo+deathisodes+blogatorium+story+griefResources+payingTribute+closeTable);
document.write("<div class=tshirt><a href=/tshirts/index.html><img src=/images/tshirts.png width=442 height=18 border=0></a></div>");
}//--------------------------INSERT TABS


function insertVideo (ep) {
	if (ep==1) {
		epOutput = "<object width=600 height=338><param name=movie value=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=curtains></param><param name=allowscriptaccess value=always></param><param name=wmode value=transparent></param><param name=allowfullscreen value=true></param><embed src=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=curtains type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true wmode=transparent width=600 height=338></embed></object><br><img class=episodeLabel src=/images/episode1label.png>";
//-------episode 1

	} else 	if (ep==2) {
		epOutput = "<object width=600 height=338><param name=movie value=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=dead_end_job></param><param name=allowscriptaccess value=always></param><param name=wmode value=transparent></param><param name=allowfullscreen value=true></param><embed src=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=dead_end_job type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true wmode=transparent width=600 height=338></embed></object><br><img class=episodeLabel src=/images/episode2label.png>";

//-------episode 2

	} else 	if (ep==3) {
		epOutput = "<object width=600 height=338><param name=movie value=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=rots_the_matter></param><param name=allowscriptaccess value=always></param><param name=wmode value=transparent></param><param name=allowfullscreen value=true></param><embed src=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=rots_the_matter type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true wmode=transparent width=600 height=338></embed></object><br><img class=episodeLabel src=/images/episode3label.png>";


//-------episode 3

	} else 	if (ep==4) {
		epOutput = "<object width=600 height=338><param name=movie value=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=dead_in_the_water></param><param name=allowscriptaccess value=always></param><param name=wmode value=transparent></param><param name=allowfullscreen value=true></param><embed src=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=dead_in_the_water type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true wmode=transparent width=600 height=338></embed></object><br><img class=episodeLabel src=/images/episode4label.png>";


//-------episode 4
		
	} else	if (ep==5) {
		epOutput = "<object width=600 height=338><param name=movie value=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=death_with_a_side_of_sickles></param><param name=allowscriptaccess value=always></param><param name=wmode value=transparent></param><param name=allowfullscreen value=true></param><embed src=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=death_with_a_side_of_sickles type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true wmode=transparent width=600 height=338></embed></object><br><img class=episodeLabel src=/images/episode5label.png>";

//-------episode 5

		
	} else	if (ep==6) {
		epOutput = "<object width=600 height=338><param name=movie value=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=you_oughta_be_in_coffins></param><param name=allowscriptaccess value=always></param><param name=wmode value=transparent></param><param name=allowfullscreen value=true></param><embed src=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=you_oughta_be_in_coffins type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true wmode=transparent width=600 height=338></embed></object><br><img class=episodeLabel src=/images/episode6label.png>";


//-------episode 6
		
	} else	if (ep==7) {
		epOutput = "<object width=600 height=338><param name=movie value=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=the_totally_dead_show></param><param name=allowscriptaccess value=always></param><param name=wmode value=transparent></param><param name=allowfullscreen value=true></param><embed src=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=the_totally_dead_show type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true wmode=transparent width=600 height=338></embed></object><br><img class=episodeLabel src=/images/episode7label.png>";

//-------episode 7
		
	} else 	if (ep==8) {
		epOutput = "<object width=600 height=338><param name=movie value=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=that_girls_a_reaper></param><param name=allowscriptaccess value=always></param><param name=wmode value=transparent></param><param name=allowfullscreen value=true></param><embed src=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=that_girls_a_reaper type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true wmode=transparent width=600 height=338></embed></object><br><img class=episodeLabel src=/images/episode8label.png>";


	} else {
//-------episode 8		
		epOutput = "<object width=600 height=338><param name=movie value=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=curtains></param><param name=allowscriptaccess value=always></param><param name=wmode value=transparent></param><param name=allowfullscreen value=true></param><embed src=http://www.koldcast.tv/EmbeddedVideoPlayer.swf?video=curtains type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true wmode=transparent width=600 height=338></embed></object><br><img class=episodeLabel src=/images/episode1label.png>";


//-------catch

	}	

koldcast="<div class=koldcast><a href=http://www.koldcast.tv><img src=/images/koldcast.png width=150 height=48></a></div>";

document.write(epOutput+koldcast);
}

function insertEpisodesOLD (episode) {

firstEp = episode+1;
secondEp = episode+2;
thirdEp = episode+3;
fourthEp = episode+4;

if (episode==5) {
	fourthEp = 1;
}

if (episode==6) {
	thirdEp = 1;
	fourthEp = 2;
}

if (episode==7) {
	secondEp = 1;
	thirdEp = 2;
	fourthEp = 3;
}

if (episode==8) {
	firstEp = 1;
	secondEp = 2;
	thirdEp = 3;
	fourthEp = 4;
}

if (episode==1) {
	prevEp = 8;
	nextEp = 2;
} else if (episode==8) {
	prevEp = 7;
	nextEp = 1;
} else {
	prevEp = episode-1;
	nextEp = episode+1;
}


tableOpen="<table class=footerOuter><tr><td><table class=footerInner align=center><tr>";

prevButton = "<td class=navButtons><a href=/episode.html?"+prevEp+" onmouseover=rollover('sicklePrev','sicklePrevON.png') onmouseout=rollover('sicklePrev','sicklePrev.png')>prev <img src=/images/sicklePrev.png width=40 height=40 border=0 align=middle name=sicklePrev></a></td>";

firstThumb = "<td class=more><a href=/epsisode.html?"+firstEp+" onmouseover=rollover('ep"+firstEp+"','episode"+firstEp+"ON.png') onmouseout=rollover('ep"+firstEp+"','episode"+firstEp+"OFF.png')><img src=/images/episode"+firstEp+"OFF.png width=125 height=83 border=0 name=ep"+firstEp+"><br>episode "+firstEp+"</a></td>";

secondThumb = "<td class=more><a href=/epsisode.html?"+secondEp+" onmouseover=rollover('ep"+secondEp+"','episode"+secondEp+"ON.png') onmouseout=rollover('ep"+secondEp+"','episode"+secondEp+"OFF.png')><img src=/images/episode"+secondEp+"OFF.png width=125 height=83 border=0 name=ep"+secondEp+"><br>episode "+secondEp+"</a></td>";

thirdThumb = "<td class=more><a href=/epsisode.html?"+thirdEp+" onmouseover=rollover('ep"+thirdEp+"','episode"+thirdEp+"ON.png') onmouseout=rollover('ep"+thirdEp+"','episode"+thirdEp+"OFF.png')><img src=/images/episode"+thirdEp+"OFF.png width=125 height=83 border=0 name=ep"+thirdEp+"><br>episode "+thirdEp+"</a></td>";

fourthThumb = "<td class=more><a href=/epsisode.html?"+fourthEp+" onmouseover=rollover('ep"+fourthEp+"','episode"+fourthEp+"ON.png') onmouseout=rollover('ep"+fourthEp+"','episode"+fourthEp+"OFF.png')><img src=/images/episode"+fourthEp+"OFF.png width=125 height=83 border=0 name=ep"+fourthEp+"><br>episode "+fourthEp+"</a></td>";
 
nextButton = "<td class=navButtons><a href=/episode.html?"+nextEp+" onmouseover=rollover('sicklenext','sicklenextON.png') onmouseout=rollover('sicklenext','sicklenext.png')><img src=/images/sicklenext.png width=40 height=40 align=middle border=0 name=sicklenext> next</a></td>";

tableClose="</tr></table></td></tr></table>";

document.write(tableOpen+prevButton+firstThumb+secondThumb+thirdThumb+fourthThumb+nextButton+tableClose);

}//--------------------------INSERT EPISODELIST


function insertEpisodes (episode) {

tableOpen="<table class=footerOuter><tr><td><table class=footerInner align=center><tr>";


firstThumb = "<td class=more><a href=/epsisode.html?1 onmouseover=rollover('ep1','episode1ON.png') onmouseout=rollover('ep1','episode1OFF.png')><img src=/images/episode1OFF.png width=100 height=67 border=0 name=ep1><br>episode 1</a></td>";

secondThumb = "<td class=more><a href=/epsisode.html?2 onmouseover=rollover('ep2','episode2ON.png') onmouseout=rollover('ep2','episode2OFF.png')><img src=/images/episode2OFF.png width=100 height=67 border=0 name=ep2><br>episode 2</a></td>";

thirdThumb = "<td class=more><a href=/epsisode.html?3 onmouseover=rollover('ep3','episode3ON.png') onmouseout=rollover('ep3','episode3OFF.png')><img src=/images/episode3OFF.png width=100 height=67 border=0 name=ep3><br>episode 3</a></td>";

fourthThumb = "<td class=more><a href=/epsisode.html?4 onmouseover=rollover('ep4','episode4ON.png') onmouseout=rollover('ep4','episode4OFF.png')><img src=/images/episode4OFF.png width=100 height=67 border=0 name=ep4><br>episode 4</a></td>";

fifthThumb = "<td class=more><a href=/epsisode.html?5 onmouseover=rollover('ep5','episode5ON.png') onmouseout=rollover('ep5','episode5OFF.png')><img src=/images/episode5OFF.png width=100 height=67 border=0 name=ep5><br>episode 5</a></td>";

sixthThumb = "<td class=more><a href=/epsisode.html?6 onmouseover=rollover('ep6','episode6ON.png') onmouseout=rollover('ep6','episode6OFF.png')><img src=/images/episode6OFF.png width=100 height=67 border=0 name=ep6><br>episode 6</a></td>";

seventhThumb = "<td class=more><a href=/epsisode.html?7 onmouseover=rollover('ep7','episode7ON.png') onmouseout=rollover('ep7','episode7OFF.png')><img src=/images/episode7OFF.png width=100 height=67 border=0 name=ep7><br>episode 7</a></td>";

eighthThumb = "<td class=more><a href=/epsisode.html?8 onmouseover=rollover('ep8','episode8ON.png') onmouseout=rollover('ep8','episode8OFF.png')><img src=/images/episode8OFF.png width=100 height=67 border=0 name=ep8><br>episode 8</a></td>";

tableClose="</tr></table></td></tr></table>";

document.write(tableOpen+firstThumb+secondThumb+thirdThumb+fourthThumb+fifthThumb+sixthThumb+seventhThumb+eighthThumb+tableClose);



}//--------------------------INSERT EPISODELIST


function insertNetworks () {
openTag="<div id=networks>"
facebook="<a href=http://www.facebook.com/pages/Playing-Dead/243765638362 target=_blank><img src=/images/facebookIcon.png height=25 width=25 border=0></a>"
twitter="<a href=http://www.twitter.com/helloimdeath  target=_blank><img src=/images/twitterIcon.png height=25 width=25 border=0></a>"
rss="<a href=http://www.watchplayingdead.com/blogatorium/feed/ target=_blank><img src=/images/feedIcon.png height=25 width=25 border=0></a>"
email="<a href=mailto:info@watchplayingdead.com target=_blank><img src=/images/emailIcon.png height=25 width=25 border=0></a>"
favorite="<a href='javascript:window.external.AddFavorite(http://www.watchplayingdead.com,playing dead web series)'><img src=/images/favoriteIcon.png height=25 width=25 border=0></a>"
closeTag="</div>"

document.write(openTag+facebook+twitter+rss+email+closeTag)

}//--------------------------INSERT NETWORKS

function insertDeathisodes () {
var deathisodes = "";
var comments = new Array();

comments[1] = "&quot;<b>Curtains Grace's</b>&quot; wish on a chain letter has unexpected consequences."
comments[2] = "&quot;<b>Dead End Job</b>&quot; Death makes an offer Grace would rather refuse."
comments[3] = "&quot;<b>Rots the Matter</b>&quot; It's hard being Death."
comments[4] = "&quot;<b>Dead in the Water</b>&quot; A dead clown is no laughing matter."
comments[5] = "&quot;<b>Death with a Side of Sickles</b>&quot; Auditioning can be murder."
comments[6] = "&quot;<b>You Oughta Be in Coffins</b>&quot; Grace gets caught dead handed."
comments[7] = "&quot;<b>The Totally Dead Show</b>&quot; Alex Albrecht is shocking."
comments[8] = "&quot;<b>That Girl's a Reaper</b>&quot; This might be the beginning of a beautiful end."

for (i = 0;i < 8;i++) {
j=i+1;

if (j>2) {
nextDeathisodes = "<a class=deathisodes2 href=/epsisode.html?"+j+"><b>episode "+j+"</b></a> (coming soon) <br><div class=deathisodesComments>"+comments[j]+"</div></td>";
} else {
nextDeathisodes = "<a class=deathisodes3 href=/epsisode.html?"+j+"><b>episode "+j+"</b></a><br><div class=deathisodesComments>"+comments[j]+"</div></td>";
}

deathisodes=deathisodes+nextDeathisodes;

}

document.write(deathisodes);
}//--------------------------INSERT DEATHISODES

