var bIsNN4  = (document.layers) ? true : false;



var bIsIE   = (document.all) ? true : false;



var bIsDOM  = (document.getElementById) ? true : false;



var bIsMac  = (navigator.userAgent.toLowerCase().indexOf("mac") !=-1)?  true : false;



var bIsIEPC = bIsIE && !bIsMac;



var bIsIEMac = bIsIE && bIsMac;



var iBrVrn  = (navigator.appVersion.indexOf("MSIE 5")!=-1) ? 5 : 4;



var iBrVrn  = (navigator.appVersion.indexOf("MSIE 6")!=-1) ? 6 : iBrVrn;







var iSpecialChars = "!#$%^*+=[]\\\';/{}|\":<>?~`";



//var iSpecialChars = "!#$%^*+=-[]\\\';/{}|\":<>?~`";



/////////////////////////////////////////trimmer fucntions///////////////////////////////////////



function stripSpecialChar(val){



	var retVal="";



	var len = val.length;



	if(len < 1) return retVal;



	var c;



    for(var i = 0; i < len; i++) {



    	c = val.charAt(i);



        if (iSpecialChars.indexOf(c)==-1) {



			retVal+=val.charAt(i);



        }



    }



    return retVal;



}







function Trim(TRIM_VALUE)



{



   if(TRIM_VALUE.length < 1)



   {



      return "";



   }



   TRIM_VALUE = RTrim(TRIM_VALUE);



   TRIM_VALUE = LTrim(TRIM_VALUE);



   TRIM_VALUE = stripSpecialChar(TRIM_VALUE);



   if(TRIM_VALUE == "")



   {



      return "";



   }



   else 



   {



      return TRIM_VALUE;



   }



}



//End Function







function RTrim(VALUE)



{



   var w_space = String.fromCharCode(32);



   var v_length = VALUE.length;



   var strTemp = "";



   if(v_length < 0)



   {



      return "";



   }



   var iTemp = v_length - 1;



   while(iTemp > - 1)



   {



      if(VALUE.charAt(iTemp) == w_space)



      {



      }



      else 



      {



         strTemp = VALUE.substring(0, iTemp + 1);



         break;



      }



      iTemp = iTemp - 1;



   }



   //End While



   return strTemp;



}



//End Function







function LTrim(VALUE)



{



   var w_space = String.fromCharCode(32);



   if(v_length < 1)



   {



      return "";



   }



   var v_length = VALUE.length;



   var strTemp = "";



   var iTemp = 0;



   while(iTemp < v_length)



   {



      if(VALUE.charAt(iTemp) == w_space)



      {



      }



      else 



      {



         strTemp = VALUE.substring(iTemp, v_length);



         break;



      }



      iTemp = iTemp + 1;



   }



   //End While



   return strTemp;



}



//End Function







//function trims the value in the passed object and then changes the current value to the trimmed value



//return the trimmed value



function trimAndFill(trimmableObject){



	if(trimmableObject.value == null || trimmableObject.value=="") return "";



	



	var val = Trim(trimmableObject.value);



	trimmableObject.value = val;



	return val;



}



/////////////////////////////////////////end trimmer fucntions///////////////////////////////////////







//argument 1: needle



//argument 2: haystack



//argument 3: boolean - ignore Case



//argument 4: boolean - ignore white space in both needle & haystack



//argument 5: boolean - ignore html in haystack



function searchString(){



	var a = searchString.arguments;



	//by default case insensitive



    var iC = true;//ignore Case



    var iS = false;//ignore white space



    var iH = false;//ignore html



    



	if(a.length < 2) return "";



	



	//check if 3rd argument present



	if(a.length > 2) iC = a[2];



	if(iC){



 		//convert to lower case for ignore case



		var n = a[0].toLowerCase();



		var h = a[1].toLowerCase();		



	}



	else{



		var n = a[0];



		var h = a[1];



	}







	if(a.length > 3) iS = a[3];



	if(a.length > 4) iH = a[4];







	var nLen = n.length;



	var hLen = h.length;



	var nIndex = 0;



	var m = false;



	var inTag = false;



	var tag = "";



	var hC="";



	var nStart=0;



	



	for(var i=0; i<hLen; i++){



		hC = h.charAt(i);



		nC = n.charAt(nIndex);



		//if matching and end of needle string reached		



		if(m && nIndex==nLen) break;		



		if(iH){



			if(hC=="<") {



				tag = "";



				inTag = true;			



			}



			if(inTag && hC==">"){



				tag +=hC;				



				inTag = false;



				continue;



			}



			if(inTag) {



				tag +=hC;



				continue;



			}



		}



		//to ignore white space



		if(iS && (hC==" " || hC=="\t" || hC=="\n" || hC=="\r")){



			continue;



		}



		if(iS && (nC==" " || nC=="\t" || nC=="\n" || nC=="\r")){			



			nIndex++;



			i--;



			continue;



		}







		//if matching current char then increment needle index



		//and set matching to true



		if(hC == nC){							



			nIndex++;



			if(nStart==-1) nStart = i;



			m = true;



		}



		//if no match then reset nIndex and m



		else{



			nStart = -1;		



			nIndex = 0;



			m = false;



		}



	}



	return nStart;



}











///////////////////////////////////////end validator funcitons////////////////////////////////



function checkDate(day,month, year)



{



   // checks if date passed is valid



   // will accept dates in following format:



   // isDate(dd,mm,ccyy), or



   // isDate(dd,mm) - which defaults to the current year, or



   // isDate(dd) - which defaults to the current month and year.



   // Note, if passed the month must be between 1 and 12, and the



   // year in ccyy format.



   if(day=="" || month=="" || year==""){



   	  return 0;



   }   



   



   var today = new Date();



   year =((!year) ? y2k(today.getYear()) : year);



   month =((!month) ? today.getMonth() : month - 1);



   if(!day)



    return 0;



    



   var test = new Date(year, month, day);   



   var diff = today.getTime() - test.getTime();







   if((y2k(test.getYear()) == year) &&(month == test.getMonth()) &&(day == test.getDate()) && diff>0)



   {  



      return 1;



   }



   else 



   {



      //errorMessage += "Invalid date\n";



      return 0;



   }



} 







function y2k(number)



{



   return(number < 1000) ? number + 1900 : number;



}







function limitedTextField(textArea, maxlimit) {



	if (textArea.value.length > maxlimit) // if too long...trim it!



		textArea.value = textArea.value.substring(0, maxlimit);



}







function validateEmail(email){	



	if(email=="")



		return 0;



	var at='@';



	var dot='.';	



	if (email.indexOf(at)==-1){



		return 0;



	}







	if ((email.indexOf(at)==-1) || (email.indexOf(at)==0) || (email.indexOf(at)==email.length)){



	   return 0;







	}



	if ((email.indexOf(dot)==-1) || (email.indexOf(dot)==0) || (email.indexOf(dot)==email.length)){



		return 0;



	}	



	//check to see if the first letter of email is a number



	//if its a number flag an error



	var numbers="0123456789";



	var strChar = email.charAt(0);



	if(numbers.indexOf(strChar) != -1) {



		return 0;



	 }



	var spchar="*'\"!^`;&><#";



	for(i=0;i<email.length;i++){



		var strChar=email.charAt(i);



		if(spchar.indexOf(strChar)!=-1) {



			return 0;



		}



	}



	return 1;



}



///////////////phoone validator start



// Declaring required variables



var digits = "0123456789";



// non-digit characters which are allowed in phone numbers



var phoneNumberDelimiters = "()- ";



// characters which are allowed in international phone numbers



// (a leading + is OK)



var validWorldPhoneChars = phoneNumberDelimiters + "+";



// Minimum no of digits in an international phone no.



var minDigitsInIPhoneNumber = 8;







function isInteger(s)



{   var i;



    for (i = 0; i < s.length; i++)



    {   



        // Check that current character is number.



        var c = s.charAt(i);



        if (((c < "0") || (c > "9"))) return 0;



    }



    // All characters are numbers.



    return 1;



}







function stripCharsInBag(s, bag)



{   var i;



    var returnString = "";



    // Search through string's characters one by one.



    // If character is not in bag, append to returnString.



    for (i = 0; i < s.length; i++)



    {   



        // Check that current character isn't whitespace.



        var c = s.charAt(i);



        if (bag.indexOf(c) == -1) returnString += c;



    }



    return returnString;



}







function validateMobileNumber(strPhone){



	s=stripCharsInBag(strPhone,validWorldPhoneChars);



	return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);



}







function checkAge(liMonth, liYear) {



	var ldToday = new Date();



	var liAge;



	liAge = ldToday.getFullYear() - liYear;



	if ( liMonth >= ldToday.getMonth()+1 ) {



		liAge = liAge - 1;



	}



	return liAge;



}



//get difference between two dates



//parameters in yyyyddmm



//if second parameter is empty it compares the first parameter with today's date



//returns an approximate fraction indicating the difference in years



function dateDiff() {



	var a = dateDiff.arguments;



	if(a.length==0)



		return -1;



	var date1 = new Date();



	var date2 = new Date();



	var diff  = new Date();







	if(a.length==1) {



		if(!a[0].substring) return -1;



		date1 = new Date(a[0].substring(0,4),a[0].substring(4,6)-1,a[0].substring(6,8));		



	}



	else if(a.length == 2){



		if(!a[0].substring) return -1;



		if(!a[1].substring) return -1;



		date1 = new Date(a[0].substring(0,4),a[0].substring(4,6)-1,a[0].substring(6,8));		



		date2 = new Date(a[1].substring(0,4),a[1].substring(4,6)-1,a[1].substring(6,8));



	}		







	diff.setTime(Math.abs(date1.getTime() - date2.getTime()));



	timediff = diff.getTime();



	//weeks = Math.floor(timediff / (1000 * 60 * 60 * 24 * 7));



	//timediff -= weeks * (1000 * 60 * 60 * 24 * 7);



	



	days = Math.floor(timediff / (1000 * 60 * 60 * 24)); 



	timediff -= days * (1000 * 60 * 60 * 24);







//	hours = Math.floor(timediff / (1000 * 60 * 60)); 



//	timediff -= hours * (1000 * 60 * 60);



	



//	mins = Math.floor(timediff / (1000 * 60)); 



//	timediff -= mins * (1000 * 60);



	



//	secs = Math.floor(timediff / 1000); 



//	timediff -= secs * 1000;







//	dateform.difference.value = weeks + " weeks, " + days + " days, " + hours + " hours, " + mins + " minutes, and " + secs + " seconds";



	return days/365.22;	



}







///////////////phone validator end/////////////////



///////////////////////////////////////end validator funcitons////////////////////////////////



	



	function fDivAct(sDivAct) {



		if ((sDivAct.indexOf(".")>-1)&&(sDivAct.indexOf("=")>-1)) {



			sDivName = sDivAct.substr(0,sDivAct.indexOf("."));



			sDivProp = sDivAct.substring(sDivAct.indexOf(".")+1,sDivAct.indexOf("="));



			sPropVal = sDivAct.substring(sDivAct.indexOf("=")+1,sDivAct.length);



			if (bIsIE) {



				oDiv = eval("document.all." + sDivName);



				if      (sDivProp=="left")       oDiv.style.pixelLeft   = sPropVal;



				else if (sDivProp=="top")        oDiv.style.pixelTop    = sPropVal;



				else if (sDivProp=="scrollTop")  oDiv.scrollTop         = sPropVal;



				else if (sDivProp=="visibility") oDiv.style.visibility  = sPropVal;



			}



			else if (bIsDOM) {



				oDiv = document.getElementById(sDivName);



				if      (sDivProp=="left")       oDiv.style.left        = sPropVal;



				else if (sDivProp=="top")        oDiv.style.top         = sPropVal;



				else if (sDivProp=="scrollTop")  oDiv.scrollTop         = sPropVal;



				else if (sDivProp=="visibility") oDiv.style.visibility  = sPropVal;



			}



		}



	}



 



 



  function printWindow(){



        //using global printContent - declared in nav_t.php



        var contentDiv = document.getElementById('cont');



        var printWindow;    



		



        /*



        //check if alternate div is present.



        //if yes extract contents of the div and open print page popup



        if(printAltDiv!=""){



            printContent = document.getElementById(printAltDiv).innerHTML;                



            printWindow = window.open("../main/pop_pp.html","printWindow","width=517,height=470,scrollbars=1,left=100, top=100").focus();            



        }



        else*/ if(contentDiv){  







            if (bIsIEPC) 



						{



							fDivAct("cont.scrollTop=0");



						}



            else 



						{



							fDivAct("contInnerScroll.top=0");



						}



            printContent = contentDiv.innerHTML;                



            printWindow = window.open("../main/print.html","printWindow","width=552,height=470,scrollbars=1,left=100, top=100").focus();            



        }



        else{



           // alert('hi');



			window.print();



        }



    }







//////////////////////////////////div handling functions//////////////////////////////////////////



function getDivInnerHTML(divId){



	



	if(bIsDOM){



		return document.getElementById(divId).innerHTML;



	}



	else if(bIsIE){



		var tmp = eval("document.all."+divId);



		return tmp.innerHTML;



	}



}







function setDivInnerHTML(divId, vContent){



	if(bIsDOM){



		document.getElementById(divId).innerHTML = vContent;



	}



	else{



		var tmp = eval("document.all."+divId);



		tmp.innerHTML = vContent;



	}



}



//////////////////////////////////end div handling functions//////////////////////////////////////////







///global variable focus used to resolve which text field will get if errors exist focus



var focusInUse=false;



function resolveFocus(focussableObject){



	if(!focusInUse){



		focussableObject.focus();



		focusInUse=true;



	}



}







function getErrorMessage(key){



	var messageArray = new Array();



	var m = messageArray;



	m["pquiz answer"] = "Please select an answer";



}







function findPosX(obj) 



{     



	var curleft = 0;     



	if (obj.offsetParent) 



	{         



		while (obj.offsetParent) 



		{             



			curleft += obj.offsetLeft             



			obj = obj.offsetParent;         



		}      



	} 



	else 



		if (obj.x)         



			curleft += obj.x;     



	



	return curleft; 



}   







function findPosY(obj) 



{     



	var curtop = 0;     



	if (obj.offsetParent) 



	{         



		while (obj.offsetParent) 



		{             



			curtop += obj.offsetTop             



			obj = obj.offsetParent;         



		}      



	} 



	else 



		if (obj.y)         



			curtop += obj.y;     



	



	return curtop; 



}







/////////////////////adjust position ofmenus according to window size//////////////////////////



function adjustMenu() {







  var myWidth = 0, myHeight = 0;



  if( typeof( window.innerWidth ) == 'number' ) {



    //Non-IE



    myWidth = window.innerWidth;



    myHeight = window.innerHeight;



  } else if( document.documentElement &&



      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {



    //IE 6+ in 'standards compliant mode'



    myWidth = document.documentElement.clientWidth;



    myHeight = document.documentElement.clientHeight;



  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {



    //IE 4 compatible



    myWidth = document.body.clientWidth;



    myHeight = document.body.clientHeight;



  }



	genericLeft = 0;



	

		var anchorimage = document.getElementById('yourmind');

	

	if (anchorimage)

	{

		//genericLeft = findPosX(anchorimage) + anchorimage.width;

		genericLeft = findPosX(anchorimage) - 136;



		/*

		setMenuProp("divyourbody.left="+genericLeft);



		setMenuProp("divyourbody.top="+findPosY(document.getElementById('yourbody')));

		*/

		 



		setMenuProp("divyourmind.left="+genericLeft);



		setMenuProp("divyourmind.top="+findPosY(document.getElementById('yourmind')));



		 



		setMenuProp("divbeauty.left="+genericLeft);



		setMenuProp("divbeauty.top="+findPosY(document.getElementById('beauty')));



		 /*



		setMenuProp("divsexrel.left="+genericLeft);



		setMenuProp("divsexrel.top="+findPosY(document.getElementById('sexrel')));



		*/ 



		setMenuProp("divaskanna.left="+genericLeft);



		setMenuProp("divaskanna.top="+findPosY(document.getElementById('askanna')));



		

		



		setMenuProp("divadvice.left="+genericLeft);



		setMenuProp("divadvice.top="+findPosY(document.getElementById('advice')));



		 



//		setMenuProp("divvip.left="+genericLeft);



//      setMenuProp("divvip.top="+findPosY(document.getElementById('vip')));



	}



}







var bIsIE   = (document.all) ? true : false;



var bIsDOM  = (document.getElementById) ? true : false;







function setMenuProp(sDivAct) {



    if ((sDivAct.indexOf(".")>-1)&&(sDivAct.indexOf("=")>-1)) {



        sDivName = sDivAct.substr(0,sDivAct.indexOf("."));



        sDivProp = sDivAct.substring(sDivAct.indexOf(".")+1,sDivAct.indexOf("="));



        sPropVal = sDivAct.substring(sDivAct.indexOf("=")+1,sDivAct.length);



        if (bIsIE) {



            oDiv = eval("document.all." + sDivName);

			

			



						if (oDiv) 

						{



							if      (sDivProp=="left")       oDiv.style.pixelLeft   = sPropVal;



							else if (sDivProp=="top")        oDiv.style.pixelTop    = sPropVal;



						}



        }



        else if (bIsDOM) {



            oDiv = document.getElementById(sDivName);



						if (oDiv) 



						{



							if      (sDivProp=="left")       oDiv.style.left        = sPropVal;



							else if (sDivProp=="top")        oDiv.style.top         = sPropVal;



						}



        }



    }



}







//window.onload = adjustMenu;



window.onresize = adjustMenu;











function MM_reloadPage(init) {  //reloads the window if Nav4 resized



  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {



    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}



  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();



}



MM_reloadPage(true);







function MM_preloadImages() { //v3.0



  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();



    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)



    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}



}







function MM_swapImgRestore() { //v3.0



  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;



}







function MM_findObj(n, d) { //v4.01



  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {



    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}



  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];



  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);



  if(!x && d.getElementById) x=d.getElementById(n); return x;



}







function MM_swapImage() { //v3.0



  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;



   for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){



		document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];



	}



}











function fixDivBehindSelect( Status, Menu ){



	if( !bIsIE || !window.fix_div_behind_select ) return true;



	if( fix_div_behind_select.lastIndexOf(Menu)==-1) return true;



	var selectLists = document.getElementsByTagName("select");



	for (var i=0; i<selectLists.length; i++){



		if( selectLists[i].className == "hideBehindDiv" ){



			selectLists[i].style.visibility = (Status=="hide")?"hidden":"visible";



		}



	}



}











function MM_showHideLayers() { //v6.0



  var i,p,v,obj,args=MM_showHideLayers.arguments;

//alert(args.length);

  for (i=0; i<(args.length-2); i+=3) 



		if ((obj=MM_findObj('div'+args[i]))!=null) 

		{  

		//alert('hi');

		v=args[i+2];



			if (obj.style) 



			{



				obj=obj.style; 



				v=(v=='show')?'visible':(v=='hide')?'hidden':v; 



			}



			if (obj.visibility!=v){



				obj.visibility=v;



				fixDivBehindSelect( (v=='visible')?'hide':'show', args[i]);



				if( args[i] != ActiveSection ){



					if( v=='visible' )



						MM_swapImage(args[i],'',eval("'../images/re_"+args[i]+"_active.gif'"),1);



					else



						MM_swapImage(args[i],'',eval("'../images/re_"+args[i]+".gif'"),1);



				}



			}



		}



}







function hideAll(SelectedMenu){





//		MM_showHideLayers('yourmind','','hide','beauty','','hide','advice','','hide','vip','','hide');
		MM_showHideLayers('yourmind','','hide','beauty','','hide','sexrel','','hide','askanna','','hide','advice','','hide','vip','','hide');


//		MM_showHideLayers('yourbody','','hide','yourmind','','hide','beauty','','hide','sexrel','','hide','askanna','','hide','advice','','hide','vip','','hide');



}







var timerID = null;



var timerOn = false;



var timecount = 200;



	



function startTime() {



       if (timerOn == false) {



              timerID = setTimeout( "hideAll()" , timecount);



              timerOn = true;



       }



}







function stopTime() {



       if (timerOn) {



  	        clearTimeout(timerID);



              timerID = null;



              timerOn = false;



       }



}







function validateLoginForm()



    {



        var username=trimAndFill(document.loginForm.username);



        var password=trimAndFill(document.loginForm.password);        



        var errorMessage='';



		focusInUse = false;



        if(username=="")



        {



            errorMessage="Username cannot be empty\n";



			resolveFocus(document.loginForm.username);



        }



        if(password==""){



            errorMessage+="Password cannot be empty\n";



			resolveFocus(document.loginForm.password);



        }



        if(errorMessage!=""){



            alert(errorMessage);



			return false;



		}



        else{



            //document.loginForm.submit();



			return true;



		}



    }



	



function showHideCallout( DivName, Action ){







	switch( DivName ){



		case "cheeks":



			if( Action == "show" ){



				var anchorimage = document.getElementById('faceimage');



				document.getElementById("callout_cheeks").style.left = findPosX(anchorimage) + 24;



				document.getElementById("callout_cheeks").style.top = findPosY(anchorimage) + 226;



				document.getElementById("callout_cheeks").style.visibility = "visible";



			}



			else



				document.getElementById("callout_cheeks").style.visibility = "hidden";



			break;



		case "eyes":



			if( Action == "show" ){



				var anchorimage = document.getElementById('faceimage');



				document.getElementById("callout_eyes").style.left = findPosX(anchorimage) + 162;



				document.getElementById("callout_eyes").style.top = findPosY(anchorimage) + 194;



				document.getElementById("callout_eyes").style.visibility = "visible";



			}



			else



				document.getElementById("callout_eyes").style.visibility = "hidden";



			break;



		case "lips":



			if( Action == "show" ){



				var anchorimage = document.getElementById('faceimage');



				document.getElementById("callout_lips").style.left = findPosX(anchorimage) + 67;



				document.getElementById("callout_lips").style.top = findPosY(anchorimage) + 262;



				document.getElementById("callout_lips").style.visibility = "visible";



			}



			else



				document.getElementById("callout_lips").style.visibility = "hidden";



			break;



		case "greasy":



			if( Action == "show" ){



				var anchorimage = document.getElementById('hairimage');



				document.getElementById("callout_greasy").style.left = findPosX(anchorimage) + 7;



				document.getElementById("callout_greasy").style.top = findPosY(anchorimage) + 42;



				document.getElementById("callout_greasy").style.visibility = "visible";



			}



			else



				document.getElementById("callout_greasy").style.visibility = "hidden";



			break;



		case "dull":



			if( Action == "show" ){



				var anchorimage = document.getElementById('hairimage');



				document.getElementById("callout_dull").style.left = findPosX(anchorimage) + 92;



				document.getElementById("callout_dull").style.top = findPosY(anchorimage) + 88;



				document.getElementById("callout_dull").style.visibility = "visible";



			}



			else



				document.getElementById("callout_dull").style.visibility = "hidden";



			break;



		case "lifeless":



			if( Action == "show" ){



				var anchorimage = document.getElementById('hairimage');



				document.getElementById("callout_lifeless").style.left = findPosX(anchorimage) + -20;



				document.getElementById("callout_lifeless").style.top = findPosY(anchorimage) + 61;



				document.getElementById("callout_lifeless").style.visibility = "visible";



			}



			else



				document.getElementById("callout_lifeless").style.visibility = "hidden";



			break;



		case "dandruff":



			if( Action == "show" ){



				var anchorimage = document.getElementById('hairimage');



				document.getElementById("callout_dandruff").style.left = findPosX(anchorimage) + 82;



				document.getElementById("callout_dandruff").style.top = findPosY(anchorimage) + 111;



				document.getElementById("callout_dandruff").style.visibility = "visible";



			}



			else



				document.getElementById("callout_dandruff").style.visibility = "hidden";



			break;



		case "dry":



			if( Action == "show" ){



				var anchorimage = document.getElementById('hairimage');



				document.getElementById("callout_dry").style.left = findPosX(anchorimage) + 20;



				document.getElementById("callout_dry").style.top = findPosY(anchorimage) + 225;



				document.getElementById("callout_dry").style.visibility = "visible";



			}



			else



				document.getElementById("callout_dry").style.visibility = "hidden";



			break;



		case "splitends":



			if( Action == "show" ){



				var anchorimage = document.getElementById('hairimage');



				document.getElementById("callout_splitends").style.left = findPosX(anchorimage) + 30;



				document.getElementById("callout_splitends").style.top = findPosY(anchorimage) + 245;



				document.getElementById("callout_splitends").style.visibility = "visible";



			}



			else



				document.getElementById("callout_splitends").style.visibility = "hidden";



			break;

			

			

		//////////////////////////////////////////////////////////////////////////////////////////////

		case "interactive_cout1":

			if( Action == "show" ){

				var anchorimage = document.getElementById('picture');

				document.getElementById("interactive_cout1").style.left = findPosX(anchorimage)+350;

				document.getElementById("interactive_cout1").style.top = findPosY(anchorimage)+140;

				document.getElementById("interactive_cout1").style.visibility = "visible";

			}

			else

				document.getElementById("interactive_cout1").style.visibility = "hidden";

			break;

		case "interactive_cout2":

			if( Action == "show" ){

				var anchorimage = document.getElementById('picture');

				document.getElementById("interactive_cout2").style.left = findPosX(anchorimage) + 335;

				document.getElementById("interactive_cout2").style.top = findPosY(anchorimage) + 75;

				document.getElementById("interactive_cout2").style.visibility = "visible";

			}

			else

				document.getElementById("interactive_cout2").style.visibility = "hidden";

			break;

		case "interactive_cout3":

			if( Action == "show" ){

				var anchorimage = document.getElementById('picture');

				document.getElementById("interactive_cout3").style.left = findPosX(anchorimage) + 370;

				document.getElementById("interactive_cout3").style.top = findPosY(anchorimage) + 74;

				document.getElementById("interactive_cout3").style.visibility = "visible";

			}

			else

				document.getElementById("interactive_cout3").style.visibility = "hidden";

			break;

		case "interactive_cout4":

			if( Action == "show" ){

				var anchorimage = document.getElementById('picture');

				document.getElementById("interactive_cout4").style.left = findPosX(anchorimage) + 370;

				document.getElementById("interactive_cout4").style.top = findPosY(anchorimage) + 156;

				document.getElementById("interactive_cout4").style.visibility = "visible";

			}

			else

				document.getElementById("interactive_cout4").style.visibility = "hidden";

			break;

		}

}



function setImgSrc( ImgObj, Filename, MenuNr ){

	if( !ImgObj ) return false;

	if(	MenuNr != activeContentMenu )

		ImgObj.src = Filename;

}



function setImgSrcByID( ImgID, Filename ){

	if( !(ImgObj = MM_findObj(ImgID)) ) return false;

	ImgObj.src = Filename;

}



function setInteractiveBodyContent( ContentID ){

	setScrollerContents('hidden_div'+ContentID);
	setImgSrcByID('hotspot1','images/interactivebody_greendot.gif');

	setImgSrcByID('hotspot2','images/interactivebody_greendot.gif');

	setImgSrcByID('hotspot3','images/interactivebody_greendot.gif');

	setImgSrcByID('hotspot4','images/interactivebody_greendot.gif');

	setImgSrcByID('hotspot'+ContentID,'images/interactivebody_reddot.gif');

if(ContentID==1)
	{
		document.getElementById('pic1').style.visibility="visible";
		document.getElementById('pic1').style.display="inline";

		document.getElementById('pic2').style.visibility="hidden";	
		document.getElementById('pic2').style.display="none";

		document.getElementById('pic3').style.visibility="hidden";	
		document.getElementById('pic3').style.display="none";


		document.getElementById('pic4').style.visibility="hidden";	
		document.getElementById('pic4').style.display="none";

	}
	

	
	if(ContentID==2)
	{
		document.getElementById('pic2').style.visibility="visible";
		document.getElementById('pic2').style.display="inline";

		document.getElementById('pic1').style.visibility="hidden";	
		document.getElementById('pic1').style.display="none";

		document.getElementById('pic3').style.visibility="hidden";	
		document.getElementById('pic3').style.display="none";


		document.getElementById('pic4').style.visibility="hidden";	
		document.getElementById('pic4').style.display="none";

	}
	
	if(ContentID==3)
	{
		document.getElementById('pic3').style.visibility="visible";
		document.getElementById('pic3').style.display="inline";

		document.getElementById('pic1').style.visibility="hidden";	
		document.getElementById('pic1').style.display="none";

		document.getElementById('pic2').style.visibility="hidden";	
		document.getElementById('pic2').style.display="none";

		document.getElementById('pic4').style.visibility="hidden";	
		document.getElementById('pic4').style.display="none";

	}
	
	if(ContentID==4)
	{
		document.getElementById('pic4').style.visibility="visible";
		document.getElementById('pic4').style.display="inline";

		document.getElementById('pic1').style.visibility="hidden";	
		document.getElementById('pic1').style.display="none";

		document.getElementById('pic2').style.visibility="hidden";	
		document.getElementById('pic2').style.display="none";

		document.getElementById('pic3').style.visibility="hidden";	
		document.getElementById('pic3').style.display="none";
	}
	
	
	
	
/*

	setImgSrcByID('picture','images/interactivebody_pic'+ContentID+'.swf');

*/
}







function setImgSrc( ImgObj, Filename, MenuNr ){



	if( !ImgObj ) return false;



	if(	MenuNr != activeContentMenu )



		ImgObj.src = Filename;



}







function displaysurveypopup()



{



	var countdb=document.getElementById("count");



	var countdbval=countdb.value;



	



	if(countdbval == "")



	{



		countdbval=1;



	}



	if(countdbval < 1001)



	{



		MM_openBrWindow('../main/pop_up_survey1.html','win');



		return;



	}



	else



	{



		return;



	}







}







function MM_openBrWindow(theURL,winName) { //v2.0



	



	window.open(theURL,winName,'width=520,height=320,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes');



}















function popupWindow( Page, Width, Height ){







		popWindow = window.open( Page,"popWindow","width="+Width+",height="+Height+",scrollbars=1,left="+((screen.width-Width)/2)+",top="+((screen.height-Height)/2)).focus();







}