

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 4000;


var tss;
var thisImg = 0
var imgCt = 2

// determine browsers
doclay = (document.layers)? true : false
docall = (document.all)? true : false
docget = (document.getElementById)? true : false


// preload images
var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("/img/homepage/slides/_titles_large/notorious_seeitsaturday.png","/img/homepage/slides/_titles_large/showgirls_thisweek.png","/img/homepage/slides/_titles_large/lifeontop_newepisodesthisweek.png","/img/homepage/slides/notorious.jpg","/img/homepage/slides/showgirls.jpg","/img/homepage/slides/lifeontop04.jpg")





//determine if browser is Windows IE5 or IE6; if IE5 or IE6, add captions with filter options 

var agt=navigator.userAgent.toLowerCase();
var appVer = navigator.appVersion.toLowerCase();

var is_minor = parseFloat(appVer);
var is_major = parseInt(is_minor);

   
var is_mac = (agt.indexOf("mac")!=-1);
    var iePos  = appVer.indexOf('msie');
    if (iePos !=-1) {
       if(is_mac) {
           var iePos = agt.indexOf('msie');
           is_minor = parseFloat(agt.substring(iePos+5,agt.indexOf(';',iePos)));
       }
       else is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
       is_major = parseInt(is_minor);
    }
    
var is_ie   = (iePos!=-1);  
var is_ie5   = (is_ie && is_major == 5);
var is_ie6   = (is_ie && is_major == 6);


if (is_ie6) {
imageNavigation = new Array()
imageNavigation[0] = '<div id="layer1"><div class="img"><img src="/img/homepage/slides/notorious.jpg" border="0" width="460" height="345" alt="NOTORIOUS"></div><div class="content"><p class="text1"><span class="arrow"><img src="/img/template/arrow.gif" border="0" width="15" height="17" alt="arrow"></span>Catch the exclusive world premiere of Maino&#39;s new video &quot;Let&#39;s Make a Movie&quot; before Notorious.</p><p class="subhed1-2"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=555821"><img src="/img/homepage/slides/_titles_small/showgirls.gif" border="0" width="200" height="17" alt="SHOWGIRLS"></a><span class="time">this week</span></p><p class="subhed1-3"><a href="/afterdark/series/lifeontop/index.html"><img src="/img/homepage/slides/_titles_small/lifeontop.gif" border="0" width="200" height="17" alt="LIFE ON TOP"></a><span class="time">friday after dark</span></p></div></div><div id="hed1"><span style="width:183px;height:77px;display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/img/homepage/slides/_titles_large/notorious_seeitsaturday.png);"><img style="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="/img/homepage/slides/_titles_large/notorious_seeitsaturday.png" width="183" height="77" border="0" alt="NOTORIOUS"></span></div><div id="link1"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=661415"><img src="/img/template/spacer.gif" width="183" height="77" border="0" alt=""></a></div>'


imageNavigation[1] = '<div id="layer2"><div class="img"><img src="/img/homepage/slides/showgirls.jpg" border="0" width="460" height="345" alt="SHOWGIRLS"></div><div class="content"><p class="subhed2-1"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=661415"><img src="/img/homepage/slides/_titles_small/notorious.gif" border="0" width="200" height="17" border="0" alt="NOTORIOUS"></a><span class="time">see it saturday at 10pm</span></p><p class="text2"><span class="arrow"><img src="/img/template/arrow.gif" border="0" width="15" height="17"></span>An aspiring Las Vegas showgirl stops at nothing to realize her dream.</p><p class="subhed2-3"><a href="/afterdark/series/lifeontop/index.html"><img src="/img/homepage/slides/_titles_small/lifeontop.gif" border="0" width="200" height="17" border="0" alt="LIFE ON TOP"></a><span class="time">friday after dark</span></p></div></div><div id="hed2"><span style="width:198px;height:71px;display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/img/homepage/slides/_titles_large/showgirls_thisweek.png);"><img style="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="/img/homepage/slides/_titles_large/showgirls_thisweek.png" width="198" height="71" border="0" alt="SHOWGIRLS"></span></div><div id="link2"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=555821"><img  src="/img/template/spacer.gif" width="198" height="71" border="0" alt=""></a></div>'


imageNavigation[2] = '<div id="layer3"><div class="img"><img src="/img/homepage/slides/lifeontop04.jpg" border="0" width="460" height="345" alt="LIFE ON TOP"></div><div class="content"><p class="subhed2-1"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=661415"><img src="/img/homepage/slides/_titles_small/notorious.gif" border="0" width="200" height="17" border="0" alt="NOTORIOUS"></a><span class="time">see it saturday at 10pm</span></p><p class="subhed3-2"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=555821"><img src="/img/homepage/slides/_titles_small/showgirls.gif" border="0" width="200" height="17" border="0" alt="SHOWGIRLS"></a><span class="time">this week</span></p><p class="text3"><span class="arrow"><img src="/img/template/arrow.gif" border="0" width="15" height="17"></span>Sophie has her first official date with Tai and Maya goes on the rebound.</p></div></div><div id="hed3"><span style="width:206px;height:81px;display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/img/homepage/slides/_titles_large/lifeontop_newepisodesthisweek.png);"><img style="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="/img/homepage/slides/_titles_large/lifeontop_newepisodesthisweek.png" width="206" height="81" border="0" alt="LIFE ON TOP" ></span></div><div id="link3"><a href="/afterdark/series/lifeontop/index.html"><img src="/img/template/spacer.gif" width="206" height="81" border="0" alt=""></a></div>'



} else {
imageNavigation = new Array()
imageNavigation[0] = '<div id="layer1"><div class="img"><img src="/img/homepage/slides/notorious.jpg" border="0" width="460" height="345" alt="NOTORIOUS"></div><div class="content"><p class="text1"><span class="arrow"><img src="/img/template/arrow.gif" border="0" width="15" height="17" alt="arrow"></span>Catch the exclusive world premiere of Maino&#39;s new video &quot;Let&#39;s Make a Movie&quot; before Notorious.</p><p class="subhed1-2"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=555821"><img src="/img/homepage/slides/_titles_small/showgirls.gif" border="0" width="200" height="17" alt="SHOWGIRLS"></a><span class="time">this week</span></p><p class="subhed1-3"><a href="/afterdark/series/lifeontop/index.html"><img src="/img/homepage/slides/_titles_small/lifeontop.gif" border="0" width="200" height="17" alt="LIFE ON TOP"></a><span class="time">friday after dark</span></p></div></div><div id="hed1"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=661415"><img src="/img/homepage/slides/_titles_large/notorious_seeitsaturday.png" width="183" height="77" border="0" alt="NOTORIOUS"></a></div>'

imageNavigation[1] = '<div id="layer2"><div class="img"><img src="/img/homepage/slides/showgirls.jpg" border="0" width="460" height="345" alt="SHOWGIRLS"></div><div class="content"><p class="subhed2-1"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=661415"><img src="/img/homepage/slides/_titles_small/notorious.gif" border="0" width="200" height="17" border="0" alt="NOTORIOUS"></a><span class="time">see it saturday at 10pm</span></p><p class="text2"><span class="arrow"><img src="/img/template/arrow.gif" border="0" width="15" height="17"></span>An aspiring Las Vegas showgirl stops at nothing to realize her dream.</p><p class="subhed2-3"><a href="/afterdark/series/lifeontop/index.html"><img src="/img/homepage/slides/_titles_small/lifeontop.gif" border="0" width="200" height="17" border="0" alt="LIFE ON TOP"></a><span class="time">friday after dark</span></p></div></div><div id="hed2"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=555821"><img src="/img/homepage/slides/_titles_large/showgirls_thisweek.png" width="198" height="71" border="0" alt="SHOWGIRLS"></a></div>'

imageNavigation[2] = '<div id="layer3"><div class="img"><img src="/img/homepage/slides/lifeontop04.jpg" border="0" width="460" height="345" alt="LIFE ON TOP"></div><div class="content"><p class="subhed2-1"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=661415"><img src="/img/homepage/slides/_titles_small/notorious.gif" border="0" width="200" height="17" border="0" alt="NOTORIOUS"></a><span class="time">see it saturday at 10pm</span></p><p class="subhed3-2"><a href="http://www.cinemax.com/apps/schedule/ScheduleServlet?ACTION_DETAIL=DETAIL&FOCUS_ID=555821"><img src="/img/homepage/slides/_titles_small/showgirls.gif" border="0" width="200" height="17" border="0" alt="SHOWGIRLS"></a><span class="time">this week</span></p><p class="text3"><span class="arrow"><img src="/img/template/arrow.gif" border="0" width="15" height="17"></span>Sophie has her first official date with Tai and Maya goes on the rebound.</p></div></div><div id="hed3"><a href="/afterdark/series/lifeontop/index.html"><img src="/img/homepage/slides/_titles_large/lifeontop_newepisodesthisweek.png" width="206" height="81" border="0" alt="LIFE ON TOP"></a></div>'
}



//this is the automatic slideshow

function runSlideShowParent(){
tss = setTimeout('runSlideShow()', 4000);
}


function runSlideShow(){


	navigation = imageNavigation[thisImg]

		if (thisImg >= imgCt){
		thisImg=0;
		navigation = imageNavigation[thisImg]
		} else {
		thisImg = thisImg + 1;
		navigation = imageNavigation[thisImg]
		}


	if (docget){
		document.getElementById("slidenavigation").innerHTML= navigation; 
		} else if (doclay) {
		document.layers["slidenavigation"].document.open()
		document.layers["slidenavigation"].document.write(navigation)
		document.layers["slidenavigation"].document.close()
		} else if (docall) {
		document.all.slidenavigation.innerHTML = navigation
		}


		

	tss = setTimeout('runSlideShow()', SlideShowSpeed);
}

