var currentGirl = 2;






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

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

function switch0() {
if (document.getElementById) {
    document.getElementById('img0').innerHTML = '<img id="thumb0" src="/city/img/slingback/char_icon_prettypink_sel.gif" alt="Pretty in Pink" width="80" height="78" border="0">';
    }
}

function unSwitch0() {
if (document.getElementById) {
      document.getElementById('img0').innerHTML = '<img src="/city/img/slingback/char_icon_prettypink.gif" alt="Pretty in Pink" width="80" 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/char_icon_alwaysbride.gif";
function hover1()
{
if (document.getElementById) {
    document.getElementById('thumb1').src = '/city/img/slingback/char_icon_alwaysbride_sel.gif';
    }
}

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

function switch1() {
if (document.getElementById) {
    document.getElementById('img1').innerHTML = '<img id="thumb1" src="/city/img/slingback/char_icon_alwaysbride_sel.gif" alt="Always a Bride " width="66" height="78" border="0">';
    }
}

function unSwitch1() {
if (document.getElementById) {
      document.getElementById('img1').innerHTML = '<img src="/city/img/slingback/char_icon_alwaysbride.gif" alt="Always a Bride " width="66" 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/char_icon_classicchar.gif";
function hover2()
{
if (document.getElementById) {
    document.getElementById('thumb2').src = '/city/img/slingback/char_icon_classicchar_sel.gif';
    }
}

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

function switch2() {
if (document.getElementById) {
    document.getElementById('img2').innerHTML = '<img id="thumb2" src="/city/img/slingback/char_icon_classicchar_sel.gif" alt="Charlotte Breaks the Rules " width="78" height="78" border="0">';
    }
}

function unSwitch2() {
if (document.getElementById) {
      document.getElementById('img2').innerHTML = '<img src="/city/img/slingback/char_icon_classicchar.gif" alt="Charlotte Breaks the Rules " 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] = 'Pretty in Pink'

title[1] = 'Always a Bride '

title[2] = 'Charlotte Breaks the Rules '

//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/charlotte_prettyinpink/1.jpg'
imageLocation[0][1] = '/city/img/slingback/slideshows/charlotte_prettyinpink/2.jpg'
imageLocation[0][2] = '/city/img/slingback/slideshows/charlotte_prettyinpink/3.jpg'
imageLocation[0][3] = '/city/img/slingback/slideshows/charlotte_prettyinpink/4.jpg'
imageLocation[0][4] = '/city/img/slingback/slideshows/charlotte_prettyinpink/5.jpg'
imageLocation[0][5] = '/city/img/slingback/slideshows/charlotte_prettyinpink/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] = 'Charlotte eschews the typical gallery girl&#39;s all-black uniform, opting for ladylike tweed separates from Tocca.'
captions[0][1] = 'Uptown Girl wears a vintage embroidered white cotton summer frock by Amarcord Vintage Fashion with a leather bow belt and Gucci sandals.'
captions[0][2] = 'Potentials flock to Charlotte in her hip shearling jacket by Christian Lacroix.'
captions[0][3] = 'Ladies who lunch in pastel. Miranda shows her softer side in this off-the-shoulder dress by Ilya, while Charlotte plays up her girlish charms in a floral frock by Plenty.'
captions[0][4] = 'Team colors. Courtside, Miranda sports a chic beige dress by Reese while Charlotte pairs a pink ruffle top by Tuleh with navy pants by Louis Vuitton.'
captions[0][5] = 'Scent of a Woman: Charlotte hits all the right classic notes in this pale pink Celine coat over a cream Luca Luca top.'

imageLocation[1]= new Array


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


slideNumber[1]= new Array

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

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

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

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


captions[1]= new Array
captions[1][0] = 'Sometimes a bridesmaid. Charlotte insists on this clich&#233;-shattering dress &#0151; a plunging halter evening gown by Richard Tyler.'
captions[1][1] = 'Trey Chic. Charlotte makes the perfect bride in this strapless Vera Wang with traditional train.'
captions[1][2] = 'Kilt-y pleasures.  Trey underperformed in their pre-marital sex attempt, but Charlotte vows to jumpstart the Honeymoon.'
captions[1][3] = 'Life with Harry. Her perfect day is marred with upsets, but Charlotte still manages to believe in happily ever after in this Audrey Hepburn look in Badgley Mischka&#39;s off-the-shoulder beaded gown. '

imageLocation[2]= new Array


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


slideNumber[2]= new Array

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

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

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

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

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

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

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

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

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

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


captions[2]= new Array
captions[2][0] = 'Charlotte keeps things strictly professional at the gallery in a pair of sexy librarian specs.'
captions[2][1] = 'Charlotte shreds the preppy handbook in a Theory fitted denim jacket, crisp cotton Laundry shirt and Agnes B. linen skirt &#0151; accessorized with a retro-print bucket hat, Coach&#39;s &quot;Honey&quot; wedge slide and Hogan&#39;s canvas bag.'
captions[2][2] = 'Her marriage to Trey may be over, but Charlotte keeps her cool in this simple cotton sundress by Howard Wolf.'
captions[2][3] = 'She may look the sweet divorc&#233;e in this lace-trimmed vintage cocktail dress from the 1960s, but Charlotte wastes no time jumping back in the game with Harry.'
captions[2][4] = 'For her blind date with Yenta #2&#39;s son, Charlotte dons a playful, figure-flaunting Miu Miu print top and a white skirt. '
captions[2][5] = 'Charlotte shows the judges she&#39;s best in show in Ralph Lauren&#39;s preppy cable-knit tennis sweater and matching skirt and a pair of white boots by Tod&#39;s.'
captions[2][6] = 'At the annual Highland Fling, Charlotte sees tartan when Bunny tells her a Mandarin child is out of the question for the MacDougal clan.'
captions[2][7] = 'Nice Goyls finish last. In spite of the best efforts of every matchmaker at the Synagogue, Charlotte realizes no one measures up to Harry.'
captions[2][8] = 'Oy Do. Harry pops the question at a mixer and Charlotte says yes.'
captions[2][9] = 'Tasti Treats. Sometimes a girl would rather have a tub of fat-free frozen desert than a fancy French meal (especially when it gives you food poisoning).'






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: Charlotte: Pretty in Pink Slideshow Number";}

 else if (Num == 1) { s.prop13="HBO: SATC: Charlotte: Always a Bride  Slideshow Number";}

 else if (Num == 2) { s.prop13="HBO: SATC: Charlotte: Charlotte Breaks the Rules  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: Charlotte: Pretty in Pink Slideshow Next";}

 else if (Num == 1) { s.prop13="HBO: SATC: Charlotte: Always a Bride  Slideshow Next";}

 else if (Num == 2) { s.prop13="HBO: SATC: Charlotte: Charlotte Breaks the Rules  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: Charlotte: Pretty in Pink Slideshow Previous";}

 else if (Num == 1) { s.prop13="HBO: SATC: Charlotte: Always a Bride  Slideshow Previous";}

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