	document.write('<scr'+'ipt type="text/javascript" src="http://www.ivillage.com/stc/newhomepageJS/jquery-1.31.js"></scr'+'ipt>');
	var iv_scriptletIncluded_search = 1;



	iv_searchIVUrl = "http://search.ivillage.com/search/ivillage";
	iv_searchHealthUrl = "http://search.ivillage.com/search/health";
	iv_searchWebUrl = "http://search.ivillage.com/search/web";
	iv_searchWebMomtourageUrl = "http://search.momtourage.com/search/webmomtourage";

	function iv_handleGoogleSearch(inputForm, frmIDBase) {
	    var skin = inputForm.sk;
	    var restrictValue = inputForm.restrict;
	    var mt = inputForm.q.value;

	    if (mt.length == 0) {
	        alert('Your search could not be completed because no search words were entered.');
	        inputForm.q.focus();
	        inputForm.q.select();
	        return false;
	    }

	    if (document.getElementById) {
	        var r1 = document.getElementById(frmIDBase + '_ivradio');
			var r2 = inputForm;
	        if (r1.src.indexOf("off.") > -1) {
	            inputForm.action = "http://search.ivillage.com/search/web";
	            restrictValue.value = "web";
	        } else {
				if (r2.name.indexOf("health") > -1) {
					inputForm.action = "http://search.ivillage.com/search/health";
	            	restrictValue.value = "health";
				} else {
					inputForm.action = "http://search.ivillage.com/search/ivillage";
	            	restrictValue.value = "ivillage";
				}  			          
	        }
	        return true;
	    }
	}


	function iv_handleGoogleSimpleSubmit(inputForm) {
	    var skin = inputForm.sk;
	    var mt = inputForm.q.value;

	    var restrictValue = "";
	    for (var i = 0; i < inputForm.restrict.length; i++) {
	        if (inputForm.restrict[i].checked) { var restrictValue = inputForm.restrict[i].value; break; }
	    }

	    if (mt.length == 0) {
	        alert('Your search could not be completed because no search words were entered.');
	        inputForm.q.focus();
	        inputForm.q.select();
	        return false;
	    }

	    if (restrictValue == "ivillage") {
	        inputForm.action = "http://search.ivillage.com/search/ivillage";
	    } else {
	        inputForm.action = "http://search.ivillage.com/search/web";
	    }
	}


	function iv_toggleSearch(selectedRadio, frmIDBase) {
	    if (document.getElementById) {
	        r1 = document.getElementById(frmIDBase + '_ivradio');
	        r2 = document.getElementById(frmIDBase + '_webradio');

	        var current = (r1.src.indexOf("off.") > -1) ? "web" : "ivillage";

	        if (current != selectedRadio) {
	            var src1 = r1.src;
	            r1.src = r2.src;
	            r2.src = src1;
	        }
	    }
	}


	function iv_submitCSSearch(frm) {
		if (frm.q.value == "") { 
			alert("Your search could not be completed because no search words were entered.");
			return false; 
		}
	}


	function cs_handleSearch(inputForm) {
		
		iv_searchIVUrl = "http://search.ivillage.com/search/ivillage";
		iv_searchHealthUrl = "http://search.ivillage.com/search/health";
		iv_searchWebUrl = "http://search.ivillage.com/search/web";
	    iv_searchMomtourageUrl = "http://search.momtourage.com/search/momtourage";

	    var skin = inputForm.sk;
		var theaction;
	    var restrictValue;

		//if (inputForm.name != 'ivSearchForm' && inputForm.name != 'MomtourageSearchForm') {
		//	restrictValue = inputForm.restrictValue.options[inputForm.restrictValue.selectedIndex].value;
		//} else {
			restrictValue = inputForm.restrict.value;
			
		//}

		switch (restrictValue)
		{
			case "ivillage":
				theaction = iv_searchIVUrl;
				break

			case "health":
				theaction = iv_searchHealthUrl;
				break

			case "momtourage":
				theaction = iv_searchMomtourageUrl;
				break

			case "webmomtourage":
				theaction = iv_searchWebMomtourageUrl;
				break



			default:
				theaction = iv_searchWebUrl;
				break
		}
		inputForm.action = theaction;
	    inputForm.submit(); 
	}

	function cs_toggleSearch(selectedTab) {	
	    if (document.getElementById) {
	        r1 = document.getElementById('top_ivtab');
	        r2 = document.getElementById('top_webtab');        

	        if (selectedTab == 'ivillage') {			
	            r1.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/shared/iv/search/ivillage_on.gif';
	            r2.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/shared/iv/search/web_off.gif';
	        } else {
				r1.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/shared/iv/search/ivillage_off.gif';
	            r2.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/shared/iv/search/web_on.gif';
			}
	    }
		document.ivSearchForm.restrict.value = selectedTab;	
	}

	function cs_toggleUnifiedSearch(selectedTab) {	
	    if (document.getElementById) {
	        r1 = document.getElementById('top_ivtab');
	        r2 = document.getElementById('top_webtab');        

	        if (selectedTab == 'ivillage') {			
	            r1.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/shared/iv/refresh/channels/ivillage_on.gif';
	            r2.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/shared/iv/refresh/channels/web_off.gif';
	        } else {
				r1.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/shared/iv/refresh/channels/ivillage_off.gif';
	            r2.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/shared/iv/refresh/channels/web_on.gif';
			}
	    }
		document.ivSearchForm.restrict.value = selectedTab;	
	}


	// function for Momtourage search
	function cs_toggleUnifiedSearchMom(selectedTab, frm) {	
	    if (document.getElementById) {
	        r1 = document.getElementById('top_momtab');
	        r2 = document.getElementById('top_momwebtab');        

	        if (selectedTab == 'momtourage') {			
	            r1.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/momtourage_vertical/mom_moments/mom_searchresults_on.gif';
	            r2.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/momtourage_vertical/mom_moments/web_searchresults_off.gif';
	        } else {
				r1.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/momtourage_vertical/mom_moments/mom_searchresults_off.gif';
	            r2.src = 'http://a820.g.akamai.net/f/820/822/1d/i.ivillage.com/momtourage_vertical/mom_moments/web_searchresults_on.gif';
			}
	    }
		document.MomtourageSearchForm.restrict.value = selectedTab;	
	}

	function cs_focusSearch(inputForm) {	
		inputForm.q.focus();
	}


	
	
	var currentPage = document.location.href;
	function momt_localSubmit(frm) {
		var mt = frm.q.value;
		
		if (mt.length == 0) {		       
			 alert('Your search could not be completed because no search words were entered.');
			 frm.q.focus();
			 frm.q.select();
			 return false;
		}
		cs_handleSearch(frm);	
	}
	
	
	
	document.write('<div id="momHeader">');
	
	document.write('<div id="momHeaderContainter">')
	
	document.write('<div id="momHeaderRow1">');
	document.write('<div id="momHeaderLogo"><a href="http://www.momtourage.com/"><img border="0" src="http://i.ivillage.com/momtourage_vertical/images/momheaderlogo.jpg"></a></div>');
	document.write('<div id="momSearch">');
	
	document.write('<form id="MomtourageSearchForm" name="MomtourageSearchForm" action="" name="$searchForm" onsubmit="return momt_localSubmit(this);" method="get" id="searchform_main">');
	document.write('<input type="hidden" name="sk" value="ivi" />');
	document.write('<input type="hidden" name="restrict" value="momtourage" />');
	document.write('<div id="momSearchInner">');

	document.write('<div id="momSearchInnerNav"><img src="http://i.ivillage.com/momtourage_vertical/mom_moments/mom_searchresults_on.gif" alt="momtourage" onclick="return cs_toggleUnifiedSearchMom(\'momtourage\');" id="top_momtab" class=""></div>');

	document.write('<div id="momSearchInnerInput">');
	document.write('<div class="searchSides"><img src="http://i.ivillage.com/momtourage_vertical/mom_moments/searchBackLeft.gif"></div>');
	document.write('<div><input type="text" name="q" value="" id="websearchtext_main" /></div>');
	document.write('<div class="searchSides"><img src="http://i.ivillage.com/momtourage_vertical/mom_moments/searchBackRight.gif"></div>');
	document.write('</div>');
	document.write('<div id="momSearchInnerButton"><input type="image" src="http://i.ivillage.com/shared/iv/refresh/channels/serach_go_grey.jpg"  alt="Search"/></div>');
	//document.write('<div id="momSearchYahoo">powered by YAHOO!</div>');
	document.write('<div id="momSearchYahooSearch"><input type="submit" value="SEARCH"></div>');
	document.write('<div style="clear:left;"></div>');
	document.write('</div>');
	document.write('</form>');
	document.write('</div>');

	document.write('<div id="momHeaderSponsor">');
	document.writeln("<iframe scrolling=\"no\" frameborder=\"no\" id=\"spons\" style=\"border: none; width:200px; height:60px;\" src=\"http://www.momtourage.com/sponswrapper/0,,,00.html\"><\/iframe>");
	document.write('</div>');
	document.write('<div id="momHeaderStop"></div>');
	document.write('</div>')
	document.write('<div id="momHeaderRow2">');
	document.write('<div id="momChannels">');
	
	//If a user lands on a specific channel, the channel hyperlink will be set to an active state.
	//The class file to use is class="momChannelActive"
	//Place this accordingly to the corresponding channel.
	//For the others, do not add this tag into the a tag.
	
	// For example, active channel ->  <a href="" class="momChannelActive">
	//				non-active channel -> <a href="">
	
	
	
	if (currentPage.indexOf('blogs.momtourage.com/advice') != -1 )
	
	{
		document.write('<div id="momChannel1"><a href="http://www.momtourage.com/">HOME</a></div>');
	
		document.write('<div id="momChannel2"><a href="http://blogs.momtourage.com/bloggerknowsbest">BLOGGER KNOWS BEST</a></div>');
		document.write('<div id="momChannel3"><a href="http://www.momtourage.com/mommoments/0,,,00.html">MOM MOMENTS</a></div>');
		document.write('<div id="momChannel4"><a class="momChannelActive" href="http://blogs.momtourage.com/advice">NEED ADVICE?</a></div>');
		document.write('<div id="momChannel5"><a href="http://www.momtourage.com/escape/0,,,00.html">ESCAPE</a></div>');
	
	}
	else if (currentPage.indexOf('blogs.momtourage.com/bloggerknowsbest') != -1 )
	{
		document.write('<div id="momChannel1"><a href="http://www.momtourage.com/">HOME</a></div>');
	
		document.write('<div id="momChannel2"><a class="momChannelActive" href="http://blogs.momtourage.com/bloggerknowsbest">BLOGGER KNOWS BEST</a></div>');
		document.write('<div id="momChannel3"><a href="http://www.momtourage.com/mommoments/0,,,00.html">MOM MOMENTS</a></div>');
		document.write('<div id="momChannel4"><a href="http://blogs.momtourage.com/advice">NEED ADVICE?</a></div>');
		document.write('<div id="momChannel5"><a href="http://www.momtourage.com/escape/0,,,00.html">ESCAPE</a></div>');
	}
	else
	{
		document.write('<div id="momChannel1"><a href="http://www.momtourage.com/">HOME</a></div>');
	
		document.write('<div id="momChannel2"><a href="http://blogs.momtourage.com/bloggerknowsbest">BLOGGER KNOWS BEST</a></div>');
		document.write('<div id="momChannel3"><a href="http://www.momtourage.com/mommoments/0,,,00.html">MOM MOMENTS</a></div>');
		document.write('<div id="momChannel4"><a href="http://blogs.momtourage.com/advice/">NEED ADVICE?</a></div>');
		document.write('<div id="momChannel5"><a href="http://www.momtourage.com/escape/0,,,00.html">ESCAPE</a></div>');
	}
	
	document.write('</div>');
	document.write('</div>');
	document.write('</div>');
	document.write('</div>');