var currentGirl = 1;






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

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

function switch0() {
if (document.getElementById) {
    document.getElementById('img0').innerHTML = '<img id="thumb0" src="/city/img/slingback/sam_icon_onthetown_sel.gif" alt="Samantha Lets Her Hair Down" width="76" height="78" border="0">';
    }
}

function unSwitch0() {
if (document.getElementById) {
      document.getElementById('img0').innerHTML = '<img src="/city/img/slingback/sam_icon_onthetown.gif" alt="Samantha Lets Her Hair Down" width="76" 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/sam_icon_leisure.gif";
function hover1()
{
if (document.getElementById) {
    document.getElementById('thumb1').src = '/city/img/slingback/sam_icon_leisure_sel.gif';
    }
}

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

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

function unSwitch1() {
if (document.getElementById) {
      document.getElementById('img1').innerHTML = '<img src="/city/img/slingback/sam_icon_leisure.gif" alt="Leisure Wear" width="70" 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/sam_icon_tamingsam_.gif";
function hover2()
{
if (document.getElementById) {
    document.getElementById('thumb2').src = '/city/img/slingback/sam_icon_tamingsam_sel.gif';
    }
}

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

function switch2() {
if (document.getElementById) {
    document.getElementById('img2').innerHTML = '<img id="thumb2" src="/city/img/slingback/sam_icon_tamingsam_sel.gif" alt="Taming Samantha?  " width="78" height="78" border="0">';
    }
}

function unSwitch2() {
if (document.getElementById) {
      document.getElementById('img2').innerHTML = '<img src="/city/img/slingback/sam_icon_tamingsam_.gif" alt="Taming Samantha?  " 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] = 'Samantha Lets Her Hair Down'

title[1] = 'Leisure Wear'

title[2] = 'Taming Samantha?  '

//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/samantha_letsherhairdown/1.jpg'
imageLocation[0][1] = '/city/img/slingback/slideshows/samantha_letsherhairdown/2.jpg'
imageLocation[0][2] = '/city/img/slingback/slideshows/samantha_letsherhairdown/3.jpg'
imageLocation[0][3] = '/city/img/slingback/slideshows/samantha_letsherhairdown/4.jpg'


slideNumber[0]= new Array

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

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

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

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


captions[0]= new Array
captions[0][0] = 'Samantha whips the wait staff into shape at the newest &quot;festish&quot; restaurant in an iridescent purple dress by Jean Paul Gaultier and black lace-up leather gauntlets.'
captions[0][1] = 'Hard to say which is hotter:  the fuchsia jersey dress by Diane von Furstenberg or Samantha&#39;s d&#233colletage &#0151; accentuated by a whimsical bejeweled dragonfly pin by Swarovski.'
captions[0][2] = 'Samantha disguises a bad chemical peel with Julien McDonald&#39;s back-baring jersey jumpsuit, a strategically placed crystal diamante starburst pin by Kenneth Jay Lane, and a custom-made straw and feather hat.'
captions[0][3] = 'Smith shaves his head in solidarity with Samantha, but she still distinguishes herself on the red carpet for his premiere in a Max Mara dress, Manolo Blahnik shoes and a cascading strawberry pink wig. '

imageLocation[1]= new Array


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


slideNumber[1]= new Array

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

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

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

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

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


captions[1]= new Array
captions[1][0] = 'It&#39;s moving day, and Samantha makes the shift to her new meat-packing district loft in Theory leather pants and a Celine logo denim jacket.'
captions[1][1] = 'Hot dog! Samantha skewers lunch in a gingham two-piece shorts suit and little-girl pigtails.'
captions[1][2] = 'Just a country girl? Samantha won&#39;t get lost in the woods in Trina Turk&#39;s hot pink pants, 548&#39;s knotted-at-the-waist silk blouse and Lulu Guiness&#39; jaunty &quot;cocktail&quot; print hat.'
captions[1][3] = 'What&#39;s a pool party without the perfect Missoni cover-up &#0151; and a couple of ripe melons? '
captions[1][4] = 'In the Pink.  On her country adventure, Samantha approaches &quot;Young McDonald&quot; to borrow some milk and gets more than a lesson in how to milk a cow.'

imageLocation[2]= new Array


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


slideNumber[2]= new Array

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

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

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

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

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

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

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

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

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

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

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

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

slideNumber[2][12] = '13/15'

slideNumber[2][13] = '14/15'

slideNumber[2][14] = '15/15'


captions[2]= new Array
captions[2][0] = 'The cool glances Samantha gets at a fashion designer&#39;s funeral are for trying to seduce a &quot;celebutante&#39;s&quot; husband &#0151; not for the white fur and hat meant to brighten up a bleak affair.'
captions[2][1] = 'The cool glances Samantha gets at a fashion designer&#39;s funeral are for trying to seduce a &quot;celebutante&#39;s&quot; husband - not for the white fur and hat meant to brighten up a bleak affair.'
captions[2][2] = 'In search of the elusive &quot;fake&quot; Fendi guy, Samantha wears a Katayone Adeli camisole and cropped Roberto Cavalli jeans. '
captions[2][3] = 'Samantha is every inch the successful executive in sherbet-colored separates from fashion fave Michael Kors, spectators by Manolo Blahnik and a yummy butter patent tote by Louis Vuitton.'
captions[2][4] = 'Samantha stops traffic in this hot pink pantsuit by French couturier Emmanel Ungaro and classic quilted Chanel tote.  '
captions[2][5] = 'Subdued Samantha?  The girls are shocked when Samantha announces she&#39;s back together with Richard.'
captions[2][6] = 'Even a mega diamond ring and a pearl thong can&#39;t ultimately calm Samantha&#39;s jitters about Richard&#39;s inability to settle down.'
captions[2][7] = 'Samantha&#39;s dressed to kill &#0151; Richard, during their Atlantic City trip &#0151; in a slinky black halter dress by Celine and stilettos by Michael Kors.'
captions[2][8] = 'Westward Ho! Samanatha joins Carrie for her book tour, looking every inch the power publicist in a shocking lime jacket by Thierry Mugler, a white skirt by Escada and a &quot;pearl&quot; tromp l&#39;oeil top by Yigal Azrouel.'
captions[2][9] = 'Another day, another stop on Carrie&#39;s book tour as Samantha supports her friend.'
captions[2][10] = 'Samantha sparkles in a black and silver sweater by Chanel, but it&#39;s her new boy toy Jerry Jerrod who she&#39;s determined to make a star &#0151; starting with changing his name to Smith Jerrod.'
captions[2][11] = 'Samantha greets the day in a form-fitting Ungaro purple top and a big and bold stone necklace by Versace &#0151; but will her nameless waiter take notice? '
captions[2][12] = 'When the hot waiter is fired after he and Samantha are discovered in a compromising position, even the offer of a $300 tip fails to get him to reveal his name.'
captions[2][13] = 'Samantha&#39;s stunned to learn: Hello my name is Jerry Jerrod and I&#39;m an alcoholic.'
captions[2][14] = 'With her hair falling out from chemo, Samantha has to face some hard truths.'






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: Samantha: Samantha Lets Her Hair Down Slideshow Number";}

 else if (Num == 1) { s.prop13="HBO: SATC: Samantha: Leisure Wear Slideshow Number";}

 else if (Num == 2) { s.prop13="HBO: SATC: Samantha: Taming Samantha?   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: Samantha: Samantha Lets Her Hair Down Slideshow Next";}

 else if (Num == 1) { s.prop13="HBO: SATC: Samantha: Leisure Wear Slideshow Next";}

 else if (Num == 2) { s.prop13="HBO: SATC: Samantha: Taming Samantha?   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: Samantha: Samantha Lets Her Hair Down Slideshow Previous";}

 else if (Num == 1) { s.prop13="HBO: SATC: Samantha: Leisure Wear Slideshow Previous";}

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