// Vignette Generated Content Marker - DO NOT REMOVE
<!--  Hide from old browsers	

function movobject(movien) {
	if (navigator.appName.indexOf ("Microsoft") !=-1) {
		return window[movien]
	} else 	{
		return document[movien]
	}
}

var number = 0;
function loadmov(movie) {
	if (number > -1) { 
		number = 0;
	}
	if (number == -1) { 
		if (movie == "next") {
			number = 0; 
		} else if (movie == "prev") {
			number = -2;
		}
	} else {
		if (movie == "next") {
			number++;
		} else if (movie == "prev") {
			number--;
			if (number == 2) {
				number = 1;
			}
			if (number < 0) {
				number = -1;
			}
		}
	}
	movieobject(moviename).LoadMovie(0, flashArray[number]);
}
		
function playmov() {
	movobject(movien).Play();
}

function stopmov() {
	movobject(movien).Stop();
}

var onImgArray = new Array();
onImgArray['pause'] = new Image();
onImgArray['pause'].src = "http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/uk_en/redesign/images/play_button.gif";

var offImgArray = new Array();
offImgArray['pause'] = new Image();
offImgArray['pause'].src = "http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/uk_en/redesign/images/pause_button.gif";

var numb = 0;
function flashButtons(command, args) {
	// need to pass in appropriate args so that it know what movie to play.
	if ( command == "play_next" ) {
		loadmov("next");
	} else if ( command == "play" ) {
	    movobject(movien).Play();
	} else if ( command == "play_previous" ) {
	    loadmov("prev");
	} else if ( command == "pause" ) {
		var numB = (parseInt(numb) + parseInt(args));
		var mod = (parseInt(numB) % 2);
		if (mod != 0 ) {
			movobject(movien).Stop();
		} else {
			movobject(movien).Play();
			var swaps = imageOff('pause');
		}
		numb++;
	}
}
	
function imageSwap(i) {
	if (document.images) {
		document.images[i].src = onImgArray[i].src
	}
}

function imageOff(i) {
	if (document.images) {
		document.images[i].src = offImgArray[i].src
	}
}

function processCIMS(theForm) {
  //alert(theForm.nl(0).checked + ',' + theForm.nl(1).checked + ',' + theForm.nl(2).checked + ',' + theForm.nl(3).checked);
  if ((theForm.email.value == "") || (theForm.email.value.indexOf('@') == -1) || (theForm.email.value.indexOf('.') == -1)) { 
    alert("Please check your email address"); 
    return false; 
  } 
  if (typeof(cimsCid) != 'undefined') {
    theForm.cid.value=cimsCid;
  }
  
  if (typeof(cimsUid) != 'undefined') {
	theForm.uid.value=cimsUid;
  }
  
  return true;
}

function ShiftTo(DivID, headId, divTag){
//alert("divid="+ DivID +", headId="+ headId +", divTag="+ divTag);
var x;
var Base=document.getElementById(divTag+'Maindiv');
var Sub=Base.getElementsByTagName('div');
for (x=0;x<Sub.length;x++){
if (Sub[x].id==DivID && Sub[x].parentNode==Base){
Sub[x].style.display="block";
	}else{
Sub[x].style.display="none";
}
}	

setBorders(headId, 'on', divTag);
	
}

function QuizShift(DivID, divTag){
//alert("divid="+ DivID +" divTag="+ divTag);
var x;
var Base=document.getElementById(divTag);
var Sub=Base.getElementsByTagName('div');
for (x=0;x<Sub.length;x++){
//alert (Sub[x].id)
if (Sub[x].id==DivID && Sub[x].parentNode==Base){
Sub[x].style.display="block";
	}else{
Sub[x].style.display="none";
}
}	
	
}

function setBorders(headId, state, divTag) {

	if ( state == 'on' ) {
		var bottom = "0px"
		var back = "#fff"
		
		if (divTag == "HL_") {
			var sides = "1px solid #09b6c6"
			var color = "#09b6c6";
		} else if (divTag == "DE_") {
			var sides = "1px solid #09b6c6"
			var color = "#09b6c6";
		} else if (divTag == "P_") {
			var sides = "1px solid #4C72D3"
			var color = "#4C72D3";
		} else if (divTag == "IC_") {
			var sides = "1px solid #4C72D3"
			var color = "#B6D3FB";
		} else if (divTag == "CT_") {
			var sides = "1px solid #4C72D3"
			var color = "#B6D3FB";
		} else if (divTag == "P2_") {
			var sides = "1px solid #76376C"
			var color = "#E1CCEB";
		} else if (divTag == "MB_") {
			var sides = "1px solid #84a7e9"
			var color = "#84a7e9";
		}
	
	} else {
	}
	

	
	var tag = divTag+"left_col_heads";
	
	var Base=document.getElementById(tag);
	var Sub=Base.getElementsByTagName('div');
	
	//var Base2=document.getElementById(headId);
	//var Sub2=Base2.getElementsByTagName('a');
	
		
	var x;
	for (x=0;x<Sub.length;x++){
		if (Sub[x].id==headId && Sub[x].parentNode==Base){
			//alert('setting lc' + headId +'here');
			Sub[x].style.borderLeft=sides;
			Sub[x].style.borderRight=sides;
			Sub[x].style.borderTop=sides;
			Sub[x].style.borderBottom=bottom;
			Sub[x].style.backgroundColor=back;
			//Sub2[0].style.color = colorswitch('ON');
			//Sub2[0].style.color=ON;
			//alert(+headId);
		} else {
			Sub[x].style.backgroundColor=color;
			Sub[x].style.borderLeft=bottom;
			Sub[x].style.borderRight=bottom;
			Sub[x].style.borderTop=bottom;
			Sub[x].style.borderBottom=sides;
			//Sub2[0].style.color = colorswitch('OFF');
			//Sub2[0].style.color=OFF;
			//alert(+headId);
		}
			
	}
	
	
	//var Base2=document.getElementById(headId);
	//var Sub2=Base2.getElementsByTagName('a');
	//var y;
	//for (y=0;y<Sub2.length;y++){
	//	if (Sub2[y].name=="1" && Sub2[y].parentNode==Base2){
	//		Sub2[y].style.color="red";
	//	} else {
	//		Sub2[y].style.color="black";
	//	}	
	//}		
}
function colorswitch (status) {
	var ON = "#204DA8";
	var OFF = "#fff";
	if (status == "ON") {
		return OFF;
	} else {
	 return ON;
	}
}

function rand(start, end) {
    return Math.floor(Math.random()*((end+1)-start)) + start;
}

function Load_functionsHP() {

	//ShiftTo('DE_subdiv3', 'head3', 'DE_');
	//ShiftTo('HL_subdiv2', 'hot_list2', 'HL_');
	//ShiftTo('P_subdiv3', 'partner3', 'P_');
	
	var DErand = rand(1, 4);
	var HLrand = rand(1, 2);
	var Prand = rand(1, 3);
	
	if (DErand == 2 || DErand == 3) {
		var DErand = 4;
	}
	
	ShiftTo('DE_subdiv'+ DErand, 'head'+ DErand, 'DE_');
	ShiftTo('HL_subdiv'+ HLrand, 'hot_list'+ HLrand, 'HL_');
	ShiftTo('P_subdiv' + Prand, 'partner'+ Prand, 'P_');
	
	var dailyessent = document.getElementById('daily_essent');
	dailyessent.style.display="block";
	var hotlist = document.getElementById('hot_lists');
	hotlist.style.display="block";
	var partner = document.getElementById('partners');
	partner.style.display="block";
	
	//leave_behind();
}

function Load_functionsCHP () {
 	ShiftTo('CT_subdiv4', 'CThead4', 'CT_');
}

function Load_functionsMB () {
 	ShiftTo('MB_subdiv2', 'MB_list2', 'MB_');
}

function Load_functions () {
 	ShiftTo('IC_subdiv4', 'IChead4', 'IC_');
}

function leave_behind() {
		
				var ip = '<!--#echo var="REMOTE_ADDR"-->';
				var IP = ip.substr(0,9)
				if(IP != "192.168.0") {
					if (IP != "194.72.84") {
						var date = new Date();
						var datenum = date.getTime();
						datestring = datenum.toString();
						randnum = datestring.substr(12, 1);
						//if ( randnum == 1 || randnum == 2 || randnum == 3) {
								if (GetCookie('leavebehind'))
									 {return;}
								else {
									SetCookie( 'leavebehind', 'popped_up', 30, '/', '', '' );
									var popWin = window.open('http://www.ivillage.co.uk/stc/lb/lb_fairy.html','pop','width=630,height=800,scrollbars=no,resizable=yes');
									popWin.blur();
								}
						//}
					}
				}
			 }
				
		
		function getCookieVal (offset) {
			var endstr = document.cookie.indexOf (";", offset);
			if (endstr == -1) { endstr = document.cookie.length; }
			return unescape(document.cookie.substring(offset, endstr));
		}

		function GetCookie (name) {
			var arg = name + "=";
			var alen = arg.length;
			var clen = document.cookie.length;
			var i = 0;
			while (i < clen) {
				var j = i + alen;
				if (document.cookie.substring(i, j) == arg) { return getCookieVal (j); }
				i = document.cookie.indexOf(" ", i) + 1;
				if (i == 0) break;
			}
			return null;
		}

		function DeleteCookie (name,path,domain) {
			if (GetCookie(name)) {
				document.cookie = name + "=" +
				"; path=" + ((path) ? path : "/") +
				((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-1970 00:00:01 GMT";
			}
		}
 
		function SetCookie (name,value,expires,path,domain) {
			// expires represents a value in days
			var ckToday = new Date();
			if (expires != null) { var exp = new Date(ckToday.getTime() + expires * 24 * 60 * 60 * 1000); }
				document.cookie = name + "=" + escape(value) +
				((expires) ? "; expires=" + exp.toGMTString() : "") +
				"; path=" + ((path) ? path : "/") +
				((domain) ? "; domain=" + domain : "");
		}

// -->