document.writeln('    <!-- START_MAIN_WRAPPER --><!--IVTH_HEADER-->');
function cs_handleSearch(inputForm) {
	iv_searchIVUrl = "http://search.ivillage.com/search/ivillage";
	//iv_searchHealthUrl = "http://search.ivillage.com/search/health";
	//iv_searchHealthUrl = "http://search.ivillage.com/search/totalhealth";
	iv_searchWebUrl = "http://search.ivillage.com/search/web";
iv_searchHealthUrl = "http://yourtotalhealth.ivillage.com/search/";
    var skin = inputForm.sk;
	var theaction;
    var restrictValue="";
	for(var i=0 ; i<inputForm.restrictValue.length ; i++){
		if(inputForm.restrictValue[i].checked){
			restrictValue = inputForm.restrictValue[i].value;
			break;
		}
	}
	if(restrictValue == "health"){
		theaction = iv_searchHealthUrl;
	}else if(restrictValue == "web"){
		inputForm.searchTerm.name="q";
		theaction = iv_searchWebUrl;
	}
	inputForm.action = theaction;
    inputForm.submit(); 
}
		function iv_localSubmit(frm) {
			var mt = frm.q1.value;
			if (mt.length == 0) {
		        alert('Your search could not be completed because no search words were entered.');
		        frm.q1.focus();
		        frm.q1.select();
		        return false;
		    }
			cs_handleSearch(frm);
		}
		function cs_yahooBlur() {
			var ytxt = document.getElementById("yahTxt");
			if (ytxt.value == "") {
			ytxt.style.backgroundImage='url(http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/ivillage/nav/light/powered_by.gif)';
			}
		}
document.writeln('<!-- ad ops related variables -->');
//<![CDATA[
document.checkedPBA = (location.search == '')? true:false
                if (!document.iv_arrival_pba) document.iv_arrival_pba = '';
                if (!document.dartFTT) document.dartFTT = '';
                if (!document.dartTData) document.dartTData = '';
                if (!document.dartTid) document.dartTid = '';
                if (!document.catid) document.catid = '';
                if (!document.ivrtt) document.ivrtt = '';
				if (typeof eTandomAd == "undefined") eTandomAd = "none";
                document.iv_commonDARTJS = '';
                if (typeof iv_showCobrand == 'string') {
               if (iv_showCobrand == 'msnwomen' || iv_showCobrand == 'msndiet') {
                    document.iv_commonDARTJS = '!category=msn;'
                  }
                }
                if (!document.ivNPA) {
                  qs = location.search.substring(1).split('&');
                  document.ivNPA = '';
                  for (i = 0; i < qs.length; i++) {
                    valSplit = qs[i].split('=');
                    if (valSplit[0] == 'ivNPA') {
                      if (valSplit[1] == 1) {
                        document.iv_arrival_pba = '!category=nopopup;!category=nopopunder;';
                        break;
                      }
                    }
                  }
                }
                if (!document.checkedPBA) {
                  for (i = 0; i < qs.length; i++) {
                    pos = qs[i].indexOf('=');
                    if (qs[i].substring(0, pos) == 'pba') {
                      document.iv_arrival_pba = unescape(qs[i].substring(pos+1)+';!category=nopopup;!category=nopopunder;');
                      document.checkedPBA = 1;
                      break;
                    }
                  }
                }
document.writeln('<script language=javascript src="http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/includes/iv_header.js"></script> ');

document.writeln('<!--script language="javascript" src="http://files.totalhealth.ivillage.com/ivth/files/ivth/site/ad.js"></script-->');
	var pos5 = '0';
	var pos6 = '0';
	var pos7 = '0';
	var pos8 = '0';
	var pos9 = '0';
	var pos10 = '0';
	var pos11 = '0';
	var pos13 = '0';
	var yahooAd = '0';
	var pos5 = parseInt(pos5) + 1;

	var ord= (new Date()).getTime();
	var ctxtID= '';
	var cont= 'hp';
	var sub1= '';
	var sect= '';
	var sub= '';
	var pageid= '';
	var packageID= '';
	var subLevel= '0';
	var keyValue= 'ivth;f=ivth;cont=hp';
	var ucid= '';
	var f= 'ivth';
	var zone= 'ivth';
	var typeID= '';
	var horiz= '';

	var adDartSite = 'nbcu.ivth/';
	var adDartSiteBottom = 'nbcu.ivth.b/';

	var iv_contenttype= 'HomePage';
	var iv_section= 'totalhealth';
	var iv_subsection1= 'home';
	var iv_subsection2= '';
	var iv_titletag= '';

	//alert(v29);
document.writeln('<!--END_OF_AD_VARIABLES-->');
ord = Math.floor(Math.random() * 10000005607799);