function QuizManager(){
	this.quizes=[];
	this.selectedQuiz = 1;
	this.currStep = -1;
	this.answers = new Object();
	this.results=new Object();
	this.imageBase = 'http://cn3.kaboodle.com/ht/mk/img/teen-quiz/';
	
	this.init=function init(){
		this.quizes[0]={
			'id':'q1', 
			'name':'Which hot style trend is right for you?',
			'desc':'Not sure which back-to-school trend to adopt?  Let us do the work for you! Answer 10 quick questions to discover which hot new look is right for you.',
			'cover': this.imageBase +'quiz_cover_trend.png',
			'resultBox': this.imageBase +'result/school-slide.jpg',
			'questions':[
				{'name':'The thought of back-to-school shopping:', 'options':[{'name':'Makes you slightly anxious. ', 'type':'plaid'},{'name':'Excites you beyond belief. ', 'type':'jumpsuit'},{'name':'Is worth the effort. ', 'type':'ballet flat'}]},
				{'name':'How long does it take you to get dressed in the morning?', 'options':[{'name':'How much time do I have? ', 'type':'jumpsuit'},{'name':'About 20 minutes. ', 'type':'ballet flat'},{'name':'About as long as it takes me to put on my clothes. ', 'type':'plaid'}]},
				{'name':'If you were a car, you\'d be:', 'options':[{'name':'A fancy one. ', 'type':'jumpsuit'},{'name':'A cute, compact hybrid. ', 'type':'ballet flat'},{'name':'Something vintage. ', 'type':'plaid'}]},
				{'name':'In the case of foul weather, you:', 'options':[{'name':'Slip on a raincoat. ', 'type':'ballet flats'},{'name':'Break out the waterproof fashion. ', 'type':'jumpsuit'},{'name':'Pull out an umbrella. ', 'type':'plaid'}]},
				{'name':'Your idea of a cute Saturday night outfit is:', 'options':[{'name':'Dress, heels, and tons of accessories. ', 'type':'jumpsuit'},{'name':'Jeans, a cute tee, and simple jewelry. ', 'type':'ballet flats'},{'name':'A cotton jersey dress and sandals. ', 'type':'plaid'}]},
				{'name':'Your jeans collection includes:', 'options':[{'name':'A trusty pair of worn-in jeans. ', 'type':'plaid'},{'name':'Super tight designer denim. ', 'type':'jumpsuit'},{'name':'Classic straight leg blues. ', 'type':'ballet flat'}]},
				{'name':'When asked to dress up for an event, you:', 'options':[{'name':'Start planning ASAP! ', 'type':'jumpsuit'},{'name':'Immediately break out into hives. ', 'type':'plaid'},{'name':'Rely on what\'s already in my closet. ', 'type':'ballet flats'}]},
				{'name':'Your shoe collection mostly consists of:', 'options':[{'name':'Sneakers. ', 'type':'ballet flats'},{'name':'Heels. ', 'type':'jumpsuit'},{'name':'Flip-flops. ', 'type':'plaid'}]},
				{'name':'After spotting a dress you\'ve just got to have, you:', 'options':[{'name':'Buy now, worry about paying for it later.', 'type':'jumpsuit'},{'name':'Buy it later if it\'s still on my mind.', 'type':'ballet flats'},{'name':'Forget about it as soon as I leave the store. ', 'type':'plaid'}]},
				{'name':'The first day of school you spot someone wearing the EXACT same outfit. You:', 'options':[{'name':'Curse the popularity of The Gap, but compliment her just the same. ', 'type':'ballet flats'},{'name':'Shriek and hide in the bathroom. ', 'type':'jumpsuit'},{'name':'Walk over and give her a high-five. The girl has great style. ', 'type':'plaid'}]}
			],
			'topLinkText':'Now that you\'ve tracked your perfect back-to-school trend...',
			'links': [
		         {'text':'Peruse this season\'s most stylish plaids!', 'link':'/backtoschool-flipbooks/mad-about-plaid'},
		         {'text':'Browse the top 10 boyfriend jeans!', 'link':'/backtoschool-flipbooks/top-10-boyfriend-jeans'},
		         {'text':'Get Taylor Swift\'s flirty tomboy look! ', 'link':'/backtoschool-flipbooks/laid-back-taylor-swift'}
			]
		};
		this.quizes[1]={
			'id':'q2',
			'name':'Who\'s your celebrity style match?',
			'desc':'Which star do you share the fashion limelight with? Answer 10 quick quiz questions to find out your celebrity alter ego!',
			'cover': this.imageBase +'quiz_cover_celeb.png',
			'resultBox': this.imageBase +'result/crush-slide.jpg',
			'questions': [
				{'name':'You often find yourself wearing a lot of:', 'options':[{'name':'Hot pink. ', 'type':'Katy Perry'},{'name':'Beige. ', 'type':'Taylor Swift'},{'name':'Navy blue. ', 'type':'Olivia Palermo'}, {'name':'Red. ', 'type':'Taylor Momsen'}]},
				{'name':'Your go-to shoe would most likely be:', 'options':[{'name':'Classic ballet flats. ', 'type':'Olivia Palermo'},{'name':'Old-school sneakers. ', 'type':'Taylor Swift'},{'name':'Jeweled cowboy boots. ', 'type':'Katy Perry'}, {'name':'Stiletto platform pumps. ', 'type':'Taylor Momsen'}]},
				{'name':'Your ultimate investment accessory would be:', 'options':[{'name':'An oversized watch. ', 'type':'Taylor Swift'},{'name':'Vintage jewelry. ', 'type':'Katy Perry'},{'name':'An "it" bag. ', 'type':'Olivia Palermo'}, {'name':'A jeweled headband. ', 'type':'Taylor Momsen'}]},
				{'name':'When running errands, you\'re most likely wearing:', 'options':[{'name':'A polo shirt. ', 'type':'Olivia Palermo'},{'name':'An oversized hoodie. ', 'type':'Taylor Swift'},{'name':'A velour zip-up. ', 'type':'Taylor Momsen'}, {'name':'A playsuit. ', 'type':'Katy Perry'}]},
				{'name':'Your fantasy vacation consists of:', 'options':[{'name':'Paris Fashion Week. ', 'type':'Taylor Momsen'},{'name':'A week in the Hamptons. ', 'type':'Olivia Palermo'},{'name':'Ski week in the Rockies. ', 'type':'Taylor Swift'}, {'name':'A last-minute road trip. ', 'type':'Katy Perry'}]},
				{'name':'You\'ve overslept and   have to be out the door in five minutes. You:', 'options':[{'name':'Accessorize my pajamas. ', 'type':'Katy Perry'},{'name':'Throw on a polo and a skirt. ', 'type':'Olivia Palermo'},{'name':'Find a clean tee and my favorite jeans. ', 'type':'Taylor Swift'}, {'name':'Wear all black plus big sunglasses. ', 'type':'Taylor Momsen'}]},
				{'name':'Your favorite style of jeans is:', 'options':[{'name':'High-waisted. ', 'type':'Katy Perry'},{'name':'Skinny. ', 'type':'Olivia Palermo'},{'name':'Comfy and worn-in. ', 'type':'Taylor Swift'}, {'name':'Cropped pencil-leg. ', 'type':'Taylor Momsen'}]},
				{'name':'Your favorite store at the mall is:', 'options':[{'name':'J.Crew. ', 'type':'Olivia Palermo'},{'name':'Abercrombie. ', 'type':'Taylor Swift'},{'name':'Barneys. ', 'type':'Taylor Momsen'}, {'name':'Urban Outfitters. ', 'type':'Katy Perry'}]},
				{'name':'The one magazine you can\'t live without is:', 'options':[{'name':'Teen Vogue. ', 'type':'Taylor Momsen'},{'name':'In Style. ', 'type':'Olivia Palermo'},{'name':'People. ', 'type':'Taylor Swift'}, {'name':'Nylon. ', 'type':'Katy Perry'}]},
				{'name':'The city that most reflects your style is:', 'options':[{'name':'Austin, Texas. ', 'type':'Taylor Swift'},{'name':'Paris, France. ', 'type':'Taylor Momsen'},{'name':'New York, New York. ', 'type':'Olivia Palermo'}, {'name':'San Francisco, California. ', 'type':'Katy Perry'}]}				
			],
			'topLinkText':'Now that you\'ve discovered your style soul mate...',
			'links': [
		         {'text':'Get Jessica Szohr\'s look for less!', 'link':'/member/seventeen/styleboards/celebrity-spotlight-jessica-szohr'},
		         {'text':'Browse the most popular skinny jeans!', 'link':'/backtoschool-flipbooks/most-popular-skinny-jeans'},
		         {'text':'Snag Katy Perry\'s bold style!', 'link':'/backtoschool-flipbooks/bold-katy-perry'},
		         {'text':'Discover your denim identity.', 'link':'/backtoschool/teen-quiz'}
			]
			
		};
		this.quizes[2]={
			'id':'q3', 
			'name':'What\'s your denim identity?',
			'desc':'What style of jeans match your personality?  Answer 10 quick questions to discover your denim soul mate!',
			'by':'Sara Himeles',
			'cover': this.imageBase +'quiz_cover_denim.png',
			'resultBox': this.imageBase +'result/superlative-slide.jpg',
			'questions': [
				{'name':'Favorite way to spend a Friday night?', 'options':[{'name':'Hang out with the usual suspects. ', 'type':'boyfriend'},{'name':'Doing something cultural. ', 'type':'flared'},{'name':'Catch up with an old friend. ', 'type':'high-waisted'}, {'name':'Heading to the hottest party. ', 'type':'skinny'}]},
				{'name':'After discovering your best friend\'s crush isn\'t interested in her, you :', 'options':[{'name':'Tell her the truth as gently as I can. ', 'type':'high-waisted'},{'name':'Mind my own business. ', 'type':'boyfriend'},{'name':'Tell her he doesn\'t deserve her anyway. ', 'type':'flared'}, {'name':'Regularly remind her of all of his worst qualities. ', 'type':'skinny'}]},
				{'name':'You found a wallet! The first thing you do is:', 'options':[{'name':'Check the ID so I can personally return it. ', 'type':'high-waisted'},{'name':'Hand it over to lost and found. ', 'type':'boyfriend'},{'name':'Investigate everything inside. ', 'type':'flared'}, {'name':'Hope there\'s a reward involved. ', 'type':'skinny'}]},
				{'name':'The best way to celebrate friends\' birthdays are to:', 'options':[{'name':'Do whatever they want to do. ', 'type':'boyfriend'},{'name':'Treat them to a night out on the town! ', 'type':'skinny'},{'name':'Give them a gift that I know they really want. ', 'type':'high-waisted'}, {'name':'Make them something from scratch. ', 'type':'flared'}]},
				{'name':'Your favorite band is performing! You:', 'options':[{'name':'Go up front and dance, of course! ', 'type':'Skinny'},{'name':'Grab the first open spot. ', 'type':'boyfriend'},{'name':'Stand wherever there is the least distraction. ', 'type':'high-waisted'}, {'name':'Flit around the scene. ', 'type':'flared'}]},
				{'name':'If you were an ice-cream flavor, you\'d be:', 'options':[{'name':'French vanilla. ', 'type':'high-waisted'},{'name':'Phish Food. ', 'type':'flared'},{'name':'Mint chip. ', 'type':'boyfriend'}, {'name':'Dolce de Leche. ', 'type':'skinny'}]},
				{'name':'When on vacation you are most likely to buy:', 'options':[{'name':'Something handmade. ', 'type':'flared'},{'name':'Gifts for friends and family. ', 'type':'high-waisted'},{'name':'Only the things I need. ', 'type':'boyfriend'}, {'name':'Cool fashions no one else has. ', 'type':'skinny'}]},
				{'name':'Your best friend would describe you as:', 'options':[{'name':'Whimsical. ', 'type':'flared'},{'name':'Trustworthy. ', 'type':'high-waisted'},{'name':'Laid-back. ', 'type':'boyfriend'}, {'name':'Confident. ', 'type':'skinny'}]},
				{'name':'When it come to your ideal living location, you\'re:', 'options':[{'name':'A college town-addict. ', 'type':'high-waisted'},{'name':'Into small towns. ', 'type':'boyfriend'},{'name':'A suburban lover. ', 'type':' flared'}, {'name':'A total city girl. ', 'type':'skinny'}]},
				{'name':'You look your best:', 'options':[{'name':'Just the way I am! ', 'type':'boyfriend'},{'name':'All dolled up and ready for a night out. ', 'type':'skinny'},{'name':'When off to school or work. ', 'type':'high-waisted'}, {'name':'Getting weekend errands done. ', 'type':'flared'}]}

			],
			'topLinkText':'Now that you know your denim identity...',
			'links': [
		         {'text':'Check out this season\'s hottest jeans.', 'link':'/backtoschool-guide-products/denim'},
		         {'text':'Revel in the latest trendy rompers.', 'link':'/tenderobject/rompers.html?v=SLIDESHOW'},
		         {'text':'Get Olivia Palermo\'s contemporary-classic look.', 'link':'/backtoschool-flipbooks/classic-olivia-palermo'},
		         {'text':'Browse our favorite back-to-school shoes.', 'link':'/backtoschool-guide-products/shoes'}
			]
		};
		
		this.results['Olivia Palermo'] = {'name':'Olivia Palermo is your fashion alter ego! ', 'desc':' You consider Audrey Hepburn and Jackie Kennedy the ultimate style icons, and, like them and your celeb style match Olivia Palermo, you always look put-together. In your mind there is no occasion too small or insignificant for a special outfit. That\'s because you\'re all about the classics! Lucky for you, your look is always on trend.'};
		this.results['Taylor Swift'] = {'name':'Taylor Swift is your fashion alter ego!', 'desc':'The casual look&mdash;perhaps with a healthy dose of tomboy&mdash;is where you hang your fashion hat. And what\'s wrong with that? After all, you know it\'s not what you wear &mdash; it\'s how you wear it. And girl, you wear that laid-back but oh-so-cute style well&mdash;just like your celebrity style match Taylor Swift!  '};
		this.results['Katy Perry'] = {'name':'Katy Perry is your fashion alter ego!', 'desc':'Off-beat, playful, and very individual fashion is definitely your go-to look. Who cares what others think when you know that you\'re ahead of the trends! Yes, sometimes you experience a fashion "don\'t," but it sure beats following the crowd! With that kind of confidence it\'s no wonder your celebrity style match is bold and beautiful Katy Perry.'};
		this.results['Taylor Momsen'] = {'name':'Taylor Momsen is your fashion alter ego!', 'desc':'When it comes to fashion you are always on trend. If they\'re wearing it in Paris, you may just be wearing it in the cafeteria. And why not? After all, you have a passion for fashion that is rarely paralleled and your bold look has quickly become your calling card, just like your celebrity style match Taylor Momsen.'};
		this.results['skinny'] = {'name':'You are skinny jeans!', 'desc':'Just like body-hugging skinny jeans you are never one to hide in the corner. You fearlessly move forward with your personality out front-and what a big personality it is! You enjoy being the center of attention, follow trends, and are outspoken and bold, even if it sometimes alienates people. But your flirty, and fun ways usually keep you in favor with friends-and envied by foes. '};
		this.results['high-waisted'] = {'name':'You are high-waisted jeans!', 'desc':'You have great appreciation for things that have longevity, history, and sentimentality&mdash;like the regularly resurrected high-waisted jean! Though you may not always be the center of attention, those who know you best love you for your reliability, trustworthiness, and loyalty-and with them you never go out of style!'};
		this.results['boyfriend'] = {'name':'You are boyfriend jeans!', 'desc':'Casually chic, approachable, and comfy to the core, you are known everywhere for your happy-go-lucky, easy-going nature&mdash;just like boyfriend jeans. Given your ability to get along with everyone it\'s no surprise that you have lots and lots of friends. And while you may not steal the show when you enter a room, you are always noticed and appreciated.  '};
		this.results['flared'] = {'name':'You are flared jeans!', 'desc':'If playful, curious, alternative, and artsy are words that friends often use to describe you, then you are one with the fun of flared jeans. Your interest in the world, creativity, and adventure often leads you off the beaten track-with both people and places.  But that\'s just fine for you since you fit in pretty much anywhere-and do it stylishly to boot!'};
		this.results['plaid'] = {'name':'Try plaid!', 'desc':'You like to keep your style relatively simple. And while you like to look nice, worrying over the latest trends  just isn\'t your thing. That\'s why plaid will work for you! Integrate a bit of the colorful classic pattern into your wardrobe and you can easily refresh your style without betraying your love for basics. Try pairing it with denim or a white skirt, or, for a truly fashion-forward look, add a wide leather belt and get ready to be voted best dressed!'};
		this.results['jumpsuit'] = {'name':'Jump on a jumpsuit!', 'desc':'You know fashion and you\'re confident enough to pull anything off, so we probably don\'t need to tell you the jumpsuit is the hottest thing this year (just ask Blake Lively)&mdash;or that it\'s only for the fashion fearless (i.e. YOU!). Pair it with simple accessories and a cute jacket and everyone will be eyeing your look.  Plus, it\'ll make getting dressed for school a snap!'};
		this.results['ballet flats'] = {'name':'Buy some ballet flats!', 'desc':'You love clothes, but sometimes you just don\'t have the energy or desire to pull together an entire "look" or forego function for fashion. That\'s why a pair of ballet flats is right for you! A perfect compromise of comfort and style, they\'re quintessentially casual-chic. Wear them with everything from skinny jeans to jersey dresses to skirts and you\'ll instantly be on trend without losing your classic look.'};
	}
	
	
	this.answer=function(theAnswer){
	
		theQuiz = this.quizes[this.selectedQuiz];
		
		if(!this.answers[theAnswer]){
			this.answers[theAnswer] = 0;
		}
		this.answers[theAnswer] =this.answers[theAnswer] + 1; 
		
		theQuiz.questions[this.currStep].answer=theAnswer;
	
	}
}
function setTab(index){
	_quizManager.currStep = -1;
	$('#tab > ul').tabs('select', index);
	
}

function switchQuestion(index){

	_quizManager.answers= new Object();
	if(index != undefined){
		_quizManager.selectedQuiz = index;

	
	}
	if(typeof popv != "undefined") {
		tr = new Object();
		tr.pageName = "Quiz Intro";
		tr.channel = "Teen";
		setTimeout("popv(tr)",5);
	}	
	navigate(-1);
}
function navigate(nextStep, start){
	
	if(start) {
		
		for(i=0;i<theQuiz.questions.length;i++) {
			
			theQuiz.questions[i].answer="";
		}
	}
	
	theQuiz = _quizManager.quizes[_quizManager.selectedQuiz];		
	var nextIndex = _quizManager.currStep + nextStep;
	
	if(nextIndex <= -1 || start){
		
		_quizManager.currStep = -1;
		
		$('#start h1').empty().append(theQuiz.name);
		$('#start h3').empty().append(theQuiz.desc);
		$('#big').attr( 'src', theQuiz.cover );
		$('#big').hide();
		
		
		var element = '#t' + _quizManager.selectedQuiz;
		
		$('#start').fadeIn('fast');
		$('#big').fadeIn('fast');

		$(element).empty();


	}else if(nextIndex >= theQuiz.questions.length){

		if(typeof popv != "undefined") {
			tr = new Object();
			tr.pageName = "Quiz Result";
			tr.channel = "Teen";
			setTimeout("popv(tr)",5);
		}

		var element = '#t' + _quizManager.selectedQuiz;

		$(element).empty().hide();
		
		var result = '';
		var resultKey = '';
		var maxResult=0;
		for (var key in _quizManager.answers) {
  		//	result = result + key + '=>'+ _quizManager.answers[key];
  			
  			if(_quizManager.answers[key] > maxResult){
  				resultKey = key;
  				maxResult =_quizManager.answers[key]; 
  			}
		}
		
		if(resultKey.length > 0){
	
			var nextQuizIndex = (_quizManager.selectedQuiz + 1 )% 3;				
			
			$(element).append(_clonedResult);
			
			$(element + ' h4').empty().append(_quizManager.results[resultKey].name);
			$(element + ' p').empty().append(_quizManager.results[resultKey].desc);
			$(element + ' h3').empty().append(_quizManager.quizes[_quizManager.selectedQuiz].topLinkText);
			
			var list="";
			for(var count=0;count<_quizManager.quizes[_quizManager.selectedQuiz].links.length;count++) {
				
				var anchor = '<a href="'+_quizManager.quizes[_quizManager.selectedQuiz].links[count].link+'">'+_quizManager.quizes[_quizManager.selectedQuiz].links[count].text+'</a>';				
				list+='<li>'+anchor+'</li>';
			}			
			$(element + ' div.quiz_links').empty().append('<ul>'+list);
			 
			$(element + ' h5').empty().append(_quizManager.results[resultKey].desc2);
			$('#nextQuiz').attr('href', 'javascript:setTab(' + nextQuizIndex + ');');
			$(element + ' div.result-pic').css('background-image', 'url(http://cn3.kaboodle.com/ht/mk/img/teen-quiz/result/'+resultKey+'-bg.jpg)');
			$(element + ' div.result-bg').css('background-image', 'url(' + theQuiz.resultBox + ')');
			
		}else{
			$(element).append('You Are Done!');
		}

		$(element).fadeIn('fast');

	}else if(nextIndex < theQuiz.questions.length){
		
		if(typeof popv != "undefined") {
			tr = new Object();
			tr.pageName = "Quiz Question";
			tr.channel = "Teen";
			setTimeout("popv(tr)",5);
		}
		
		$('#start').hide();
				
		if(_quizManager.currStep >= 0 && ( 	
				typeof(theQuiz.questions[_quizManager.currStep]) == 'undefined' || 
				typeof(theQuiz.questions[_quizManager.currStep]).answer == 'undefined' ||
				theQuiz.questions[_quizManager.currStep].answer == '')){
				
			alert('Sorry, you need to select an option to continue.');
			return;

		}else{		
			_quizManager.currStep = nextIndex;
			
			var element = '#t' + _quizManager.selectedQuiz;
			var htmlOptions='<div class="quiz_question"><ul>';
			var options=theQuiz.questions[_quizManager.currStep].options;
			for(i=0; i<options.length; i++){
				var divId = "options_"+i;
				var fnctn = "changeBackground('"+i+"','"+options.length+"')";
				htmlOptions = htmlOptions + '<li><input type=radio name=qa value="' + options[i].type + '" onclick='+fnctn+'><span id='+divId+' class="ans-options">' + options[i].name + '</span></li>';
			}
			htmlOptions = htmlOptions + '</ul></div>';

			htmlOptions += '<div class="quiz_button"><a href="javascript:navigate(1);"><img src="http://cn3.kaboodle.com/ht/mk/img/teen-quiz/quiz_nextbtn.png" border=0 /></a></div>';
						
			//.('h4').empty().appendTo(_quizManager.currStep].name).appendTo(element)
			//set the value in the div and show it
			$(element).empty();
			$(element).hide();
			
	
			$(element).append('<div class="quest quiz_main"><h4>' + theQuiz.questions[_quizManager.currStep].name +'</h4>'+ htmlOptions + '</div>');
			
			$(element +' input').click(function(){_quizManager.answer($('input[name=qa]:checked').val() );});
			
			$(element).fadeIn("fast");
		}

	}
	//reloadAds();
	
}	
var _ads=[];

function reloadAds(){

	var elements = document.getElementsByTagName('div');
	
	var ord=Math.floor(Math.random()*1000000);
	
	var currAd = 0;
	
	for(var i=0;i<elements.length; i++){
		
		var div = elements[i];
		
		if(div.className == 'ads-section'){
			
			var html = div.innerHTML;

			var adParam = 'ord=';
			var ordIndex = html.indexOf(adParam);
			
			var ordValue= html.substring(ordIndex,html.indexOf(';', ordIndex+1));
								
			
			_ads[currAd] = html.replace(ordValue, 'ord=' + ord);
			
			div.id = 'ad' + currAd;
			
	//		div.innerHTML = '';


			snTimeout = setTimeout("showAd("+currAd+")", 1000);			
			
			
			currAd++;
		}	
	

	}
}
function showAd(index){

//document.write('<div class="ads-section"><script language=\"JavaScript\" type=\"text\/javascript\" src=\"http:\/\/ad.doubleclick.net\/adj\/hdm.kaboodle\/Teen\/nocat\/;sz=728x90;tile=1;sect=Teen;ord=1216333816062;dcopt=ist;server=@serverName@;status=internal;\"><\/script>\n\t<noscript>\n\t<a href=\"http:\/\/ad.doubleclick.net\/jump\/hdm.kaboodle\/Teen\/nocat\/;sz=728x90;tile=1;sect=Teen;ord=1216333816062;dcopt=ist;server=@serverName@;status=internal;\" target=\"_blank\">\n\t<img src=\"http:\/\/ad.doubleclick.net\/ad\/hdm.kaboodle\/Teen\/nocat\/;sz=728x90;tile=1;sect=Teen;ord=1216333816062;dcopt=ist;server=@serverName@;status=internal;\" width=\"728\" height=\"90\" border=\"0\" alt=\"\"><\/a>\n\t<\/noscript></div>');
//	document.getElementById('ad' + index).innerHTML = _ads[index];

	var ord=Math.floor(Math.random()*1000000);
//document.write(_ads[index]);
//	document.getElementById('ad' + index).innerHTML = '<script language=\"JavaScript\" type=\"text\/javascript\" src=\"http:\/\/ad.doubleclick.net\/adj\/hdm.kaboodle\/Teen\/nocat\/;sz=728x90;tile=1;sect=Teen;ord='+ord+';dcopt=ist;server=@serverName@;status=internal;\"><\/script>';
	
}
function changeBackground(id,len) {
	/*
	var opt = 'options_';
	for(var i=0;i<len;i++) {
		if(i==id) {
			document.getElementById('options_' + id).style.backgroundColor='#fd67cb';
		}
		else {
			//document.getElementById('options_' + i).style.backgroundColor='#fecccb';
			document.getElementById('options_' + i).style.backgroundColor=''
		}
	}
	*/
}
