var currentGirl = 3;






rolloverImage0 = new Image();
rolloverImage0.src = "/city/img/slingback/mir_icon_corporatewarrior.gif";
function hover0()
{
if (document.getElementById) {
    document.getElementById('thumb0').src = '/city/img/slingback/mir_icon_corporatewarrior_sel.gif';
    }
}

function unhover0()
{
if (document.getElementById) {
    document.getElementById('thumb0').src = '/city/img/slingback/mir_icon_corporatewarrior.gif';
    }
}

function switch0() {
if (document.getElementById) {
    document.getElementById('img0').innerHTML = '<img id="thumb0" src="/city/img/slingback/mir_icon_corporatewarrior_sel.gif" alt="Corporate Warrior" width="95" height="78" border="0">';
    }
}

function unSwitch0() {
if (document.getElementById) {
      document.getElementById('img0').innerHTML = '<img src="/city/img/slingback/mir_icon_corporatewarrior.gif" alt="Corporate Warrior" width="95" height="78" border="0" class="cursor" id="thumb0" onMouseOver="hover0();" onMouseOut="unhover0();" onClick="setSlide(0);switch0();unSwitch1();unSwitch2();">';
     }
}




rolloverImage1 = new Image();
rolloverImage1.src = "/city/img/slingback/mir_icon_afterhours.gif";
function hover1()
{
if (document.getElementById) {
    document.getElementById('thumb1').src = '/city/img/slingback/mir_icon_afterhours_sel.gif';
    }
}

function unhover1()
{
if (document.getElementById) {
    document.getElementById('thumb1').src = '/city/img/slingback/mir_icon_afterhours.gif';
    }
}

function switch1() {
if (document.getElementById) {
    document.getElementById('img1').innerHTML = '<img id="thumb1" src="/city/img/slingback/mir_icon_afterhours_sel.gif" alt="After Hours" width="51" height="78" border="0">';
    }
}

function unSwitch1() {
if (document.getElementById) {
      document.getElementById('img1').innerHTML = '<img src="/city/img/slingback/mir_icon_afterhours.gif" alt="After Hours" width="51" height="78" border="0" class="cursor" id="thumb1" onMouseOver="hover1();" onMouseOut="unhover1();" onClick="setSlide(1);switch1();unSwitch0();unSwitch2();">';
     }
}




rolloverImage2 = new Image();
rolloverImage2.src = "/city/img/slingback/mir_icon_mirandasmiles.gif";
function hover2()
{
if (document.getElementById) {
    document.getElementById('thumb2').src = '/city/img/slingback/mir_icon_mirandasmiles_sel.gif';
    }
}

function unhover2()
{
if (document.getElementById) {
    document.getElementById('thumb2').src = '/city/img/slingback/mir_icon_mirandasmiles.gif';
    }
}

function switch2() {
if (document.getElementById) {
    document.getElementById('img2').innerHTML = '<img id="thumb2" src="/city/img/slingback/mir_icon_mirandasmiles_sel.gif" alt="Miranda&#39;s Milestones" width="78" height="78" border="0">';
    }
}

function unSwitch2() {
if (document.getElementById) {
      document.getElementById('img2').innerHTML = '<img src="/city/img/slingback/mir_icon_mirandasmiles.gif" alt="Miranda&#39;s Milestones" width="78" height="78" border="0" class="cursor" id="thumb2" onMouseOver="hover2();" onMouseOut="unhover2();" onClick="setSlide(2);switch2();unSwitch0();unSwitch1();">';
     }
}




//Set the duration of slideshow (in seconds)
var SlideShowSpeed = 3000;


var title = new Array()


title[0] = 'Corporate Warrior'

title[1] = 'After Hours'

title[2] = 'Miranda&#39;s Milestones'

//set number of slideshows
var number_of_slideshows=3;


var imageLocation = new Array(number_of_slideshows)
var slideNumber = new Array(number_of_slideshows)
var captions = new Array(number_of_slideshows)


imageLocation[0]= new Array


imageLocation[0][0] = '/city/img/slingback/slideshows/miranda_corporatewarrior/1.jpg'
imageLocation[0][1] = '/city/img/slingback/slideshows/miranda_corporatewarrior/2.jpg'
imageLocation[0][2] = '/city/img/slingback/slideshows/miranda_corporatewarrior/3.jpg'
imageLocation[0][3] = '/city/img/slingback/slideshows/miranda_corporatewarrior/4.jpg'
imageLocation[0][4] = '/city/img/slingback/slideshows/miranda_corporatewarrior/5.jpg'
imageLocation[0][5] = '/city/img/slingback/slideshows/miranda_corporatewarrior/6.jpg'


slideNumber[0]= new Array

slideNumber[0][0] = '1/6'

slideNumber[0][1] = '2/6'

slideNumber[0][2] = '3/6'

slideNumber[0][3] = '4/6'

slideNumber[0][4] = '5/6'

slideNumber[0][5] = '6/6'


captions[0]= new Array
captions[0][0] = 'Miranda may be blas&#233; about Steve, but when it comes to her work attire, nothing&#39;s casual.'
captions[0][1] = 'Miranda exhibits her no-nonsense side in a double-breasted military style jacket over a classic ribbed turtleneck.'
captions[0][2] = 'The fitted pantsuit is by Moschino, the blouse by Theory; the red coral beads and Miranda&#39;s laugh add the color.'
captions[0][3] = 'Fair trade. Miranda spices up her red (slingbacks by Siegerson Morrison), white (silk blouse by Theory) and blue (suit by Tahari) with vintage Mexican silver jewelry.'
captions[0][4] = 'Miranda gets a jolt on her coffee break when her ex, Steve, invites her to the opening of his new bar.'
captions[0][5] = 'Miranda finds herself in a pickle over whether to date the sandwich-board guy. '

imageLocation[1]= new Array


imageLocation[1][0] = '/city/img/slingback/slideshows/miranda_afterhours/1.jpg'
imageLocation[1][1] = '/city/img/slingback/slideshows/miranda_afterhours/2.jpg'
imageLocation[1][2] = '/city/img/slingback/slideshows/miranda_afterhours/3.jpg'
imageLocation[1][3] = '/city/img/slingback/slideshows/miranda_afterhours/4.jpg'
imageLocation[1][4] = '/city/img/slingback/slideshows/miranda_afterhours/5.jpg'
imageLocation[1][5] = '/city/img/slingback/slideshows/miranda_afterhours/6.jpg'
imageLocation[1][6] = '/city/img/slingback/slideshows/miranda_afterhours/7.jpg'
imageLocation[1][7] = '/city/img/slingback/slideshows/miranda_afterhours/8.jpg'
imageLocation[1][8] = '/city/img/slingback/slideshows/miranda_afterhours/9.jpg'


slideNumber[1]= new Array

slideNumber[1][0] = '1/9'

slideNumber[1][1] = '2/9'

slideNumber[1][2] = '3/9'

slideNumber[1][3] = '4/9'

slideNumber[1][4] = '5/9'

slideNumber[1][5] = '6/9'

slideNumber[1][6] = '7/9'

slideNumber[1][7] = '8/9'

slideNumber[1][8] = '9/9'


captions[1]= new Array
captions[1][0] = 'Miranda takes haute couture to the streets with a sheer floral patterned top by Christian Lacroix and a flouncy cream skirt by Dries Van Noten.'
captions[1][1] = 'Miranda does a 180 from corporate warrior to weekend warrior in these classic overalls.'
captions[1][2] = 'Miranda&#39;s got funk in Tommy Hilfiger ruffled suede flares, an embroidered silk blouse and a Chanel patchwork suede jacket (tied around waist).'
captions[1][3] = 'Miranda exhibits street smarts in a tribal print mesh tank and cropped army cargo pants.'
captions[1][4] = 'Miranda dots the skyline at a rooftop barbeque in this hand-painted geometric Aztec pattern dress by Moschino.'
captions[1][5] = 'Miranda kicks back in this stretch-denim shirtdress by Earl and sky-high strappy denim wood wedge sandals by Bebe.'
captions[1][6] = 'Pregnancy doesn&#39;t stop Miranda from painting the town multicolored in a Jean Paul Gaultier halter dress.'
captions[1][7] = 'Miranda radiates sidewalk summer ease in a bright orange pattern scoop neck dress by Versus.'
captions[1][8] = 'Cover-up Girl. Miranda protects her fair skin when the girls share a summer weekend in the Hamptons.'

imageLocation[2]= new Array


imageLocation[2][0] = '/city/img/slingback/slideshows/miranda_milestones/1.jpg'
imageLocation[2][1] = '/city/img/slingback/slideshows/miranda_milestones/2.jpg'
imageLocation[2][2] = '/city/img/slingback/slideshows/miranda_milestones/3.jpg'
imageLocation[2][3] = '/city/img/slingback/slideshows/miranda_milestones/4.jpg'
imageLocation[2][4] = '/city/img/slingback/slideshows/miranda_milestones/5.jpg'
imageLocation[2][5] = '/city/img/slingback/slideshows/miranda_milestones/6.jpg'
imageLocation[2][6] = '/city/img/slingback/slideshows/miranda_milestones/7.jpg'
imageLocation[2][7] = '/city/img/slingback/slideshows/miranda_milestones/8.jpg'
imageLocation[2][8] = '/city/img/slingback/slideshows/miranda_milestones/9.jpg'
imageLocation[2][9] = '/city/img/slingback/slideshows/miranda_milestones/10.jpg'
imageLocation[2][10] = '/city/img/slingback/slideshows/miranda_milestones/11.jpg'
imageLocation[2][11] = '/city/img/slingback/slideshows/miranda_milestones/12.jpg'


slideNumber[2]= new Array

slideNumber[2][0] = '1/12'

slideNumber[2][1] = '2/12'

slideNumber[2][2] = '3/12'

slideNumber[2][3] = '4/12'

slideNumber[2][4] = '5/12'

slideNumber[2][5] = '6/12'

slideNumber[2][6] = '7/12'

slideNumber[2][7] = '8/12'

slideNumber[2][8] = '9/12'

slideNumber[2][9] = '10/12'

slideNumber[2][10] = '11/12'

slideNumber[2][11] = '12/12'


captions[2]= new Array
captions[2][0] = 'Miranda discovers a secret about her new boyfriend.'
captions[2][1] = 'Miranda plays along on a fix-up date when everyone at her office thinks she&#39;s a lesbian.'
captions[2][2] = 'Miranda becomes a member of the wedding when her interior designer and British pal fall in love at first sight.'
captions[2][3] = 'Miranda has second thoughts about Steve when he suggests they have a kid.'
captions[2][4] = 'It&#39;s a class thing when Miranda splits with Steve.'
captions[2][5] = 'Miranda is surprised to learn Steve&#39;s opening his own bar.'
captions[2][6] = 'At her baby shower, Miranda doubts her maternal instincts until she taps into her nurturing side when Charlotte has a melt-down.'
captions[2][7] = 'Carrie shows up for  Miranda and the birth of Brady.'
captions[2][8] = 'Miranda agrees to baptize Brady to make Steve (and his nutty mother) happy.'
captions[2][9] = 'On a girl&#39;s night out, Miranda sparkles in a sheer black Moschino top over a black bandeau by Alberta Ferretti. '
captions[2][10] = 'Going down? Miranda savors her elevator encounter with the new neighbor in a sea breeze shift dress by Oscar de la Renta with a purse by Rafi.'
captions[2][11] = 'Miranda says &quot;no&quot; to traditional white and &quot;I do&quot; to a deep wine velvet ensemble by British designer Ghost.'






var currentImg;
var total;

//var mainImg = ;
var thisImg = 0;
//var imgCt = imageLocation[mainImg].length - 1;
//alert(imgCt);
var baseCt = 0;

var tss;
var start = 1;








//variable is set to 1 initially so that slideshow starts when page is loaded
//vairable is set to 0 if PREVIOUS or NEXT is clicked which stops the slideshow
function StartorStop(x) {
start = x;
}

//this function is run first so that there is a delay on the first image
//otherwise the slideshow jumps to the second image immediately
//timer is faster for this than the loop
function runSlideShowParent(){
tss = setTimeout('runSlideShow()', 3000);
}

//this is the automatic slideshow
function runSlideShow(){

	if ( start == 1 ){

		//counter is at beginning so that if user interrupts the slideshow with the PREVIOUS NEXT
		//then the slideshow won't jump ahead two images instead of just one
var imgCt = imageLocation[mainImg].length - 1;
var slide = slideNumber[mainImg][thisImg];
var content = captions[mainImg][thisImg];


		if (thisImg >= imgCt){
		thisImg=0;
		slide = slideNumber[mainImg][thisImg];
		content = captions[mainImg][thisImg];
		} else {
		thisImg = thisImg + 1;
		slide = slideNumber[mainImg][thisImg];
		content = captions[mainImg][thisImg];
		}

	
		document.slider.src = imageLocation[mainImg][thisImg];		
		document.getElementById('slideDiv').innerHTML = slideNumber[mainImg][thisImg];
		document.getElementById('captionDiv').innerHTML = captions[mainImg][thisImg];
	
		
	
		
tss = setTimeout('runSlideShow()', SlideShowSpeed);
	}
}


//this function selects the slideshow
function setSlide(which){
mainImg=which;
thisImg=0;
document.slider.src=imageLocation[mainImg][thisImg];
document.getElementById('titleDiv').innerHTML = title[mainImg];
document.getElementById('slideDiv').innerHTML = slideNumber[mainImg][thisImg];
document.getElementById('captionDiv').innerHTML = captions[mainImg][thisImg];
trackSlideshow(mainImg);

	if (start == 0) {
	start = 1;
	runSlideShowParent();
	}
	

}


//this is the user controlled slideshow
function layerWrite(id,text) {
var imgCt = imageLocation[mainImg].length - 1;
//var image = imageLocation[mainImg][thisImg];
var slide = slideNumber[mainImg][thisImg];
var content = captions[mainImg][thisImg];

	if (thisImg > imgCt) {
	thisImg = 0;
	slide = slideNumber[mainImg][thisImg];
	content = captions[mainImg][thisImg];
	}
	
	if (thisImg < baseCt) {
	thisImg = imageLocation[mainImg].length - 1;
	slide = slideNumber[mainImg][thisImg];
	content = captions[mainImg][thisImg];
	}

	document.images.slider.src = imageLocation[mainImg][thisImg];
	document.getElementById('slideDiv').innerHTML = slideNumber[mainImg][thisImg];
	document.getElementById('captionDiv').innerHTML = captions[mainImg][thisImg];
}



function trackSlideshow(Num) {

	var s=s_gi(s_account);
	s.linkTrackVars='prop13,server';
	s.linkTrackEvents='None';
	s.server='hbo.com';
	

if (Num == 0) {s.prop13="HBO: SATC: Miranda: Corporate Warrior Slideshow Number";}

 else if (Num == 1) { s.prop13="HBO: SATC: Miranda: After Hours Slideshow Number";}

 else if (Num == 2) { s.prop13="HBO: SATC: Miranda: Miranda's Milestones Slideshow Number";}
	
	s.t(this,'o','Slideshow Number');
}



function nextSlideshow(Num) {

	var s=s_gi(s_account);
	s.linkTrackVars='prop13,server';
	s.linkTrackEvents='None';
	s.server='hbo.com';
	

if (Num == 0) {s.prop13="HBO: SATC: Miranda: Corporate Warrior Slideshow Next";}

 else if (Num == 1) { s.prop13="HBO: SATC: Miranda: After Hours Slideshow Next";}

 else if (Num == 2) { s.prop13="HBO: SATC: Miranda: Miranda's Milestones Slideshow Next";}
	
s.t(this,'o','Slideshow Next');
}



function previousSlideshow(Num) {

	var s=s_gi(s_account);
	s.linkTrackVars='prop13,server';
	s.linkTrackEvents='None';
	s.server='hbo.com';
	

if (Num == 0) {s.prop13="HBO: SATC: Miranda: Corporate Warrior Slideshow Previous";}

 else if (Num == 1) { s.prop13="HBO: SATC: Miranda: After Hours Slideshow Previous";}

 else if (Num == 2) { s.prop13="HBO: SATC: Miranda: Miranda's Milestones Slideshow Previous";}
	
s.t(this,'o','Slideshow previous');
}
