function startList() {	if (document.all && document.getElementById) {		navRoot = document.getElementById("primarynav");		for (i=0;i<navRoot.childNodes.length;i++) {			node = navRoot.childNodes[i];			if (node.nodeName == "LI") {				node.onmouseover = function() {					this.className +=" over";				}				node.onmouseout = function() {					this.className = this.className.replace(" over", "");				}			}		}	}}function showPic(who) {	img = window.open(who,"imgwin",'left=200,top=200,width=580,height=580,toolbar=0,menu=0,scrollable=1,resizable=1');	return false;}function showRecipe(who) {	recipe = window.open(who,"recwin","left=200,top=200,width=880,height=500,toolbar=0,menu=0,scrollable=1,resizable=1");	return false;}function showCoupons() {	window.open("coupons.php","coupwin","menubar=no,status=no,toolbar=no,scrollbars=yes,height=733,width=630,top=200,left=200");}function showAd(who) {	document.getElementById("ad").src = who.href;	var x = document.getElementById("adpages").getElementsByTagName("A");	for(i=0;i<x.length;i++) {		x[i].className = "";	}	who.className = "lit";}function validateRecipe() {	var f = document.forms['recipe'];	var missing = new Array();	for(i=0;i<f.elements.length;i++) {		if(f.elements[i].value.length < 1) {			if(f.elements[i].name != "prep" && f.elements[i].name != "servings") {				missing.push(f.elements[i].name);			}		}	}	if (missing.length > 0) {		labels = document.getElementsByTagName("LABEL");		for(h=0;h<labels.length;h++) {			labels[h].style.color = "";		}		for(j=0;j<missing.length;j++) {			document.getElementById(missing[j]).style.color = "#ff0000";		}		document.getElementById("text").childNodes[0].nodeValue = "We're sorry, we were unable to submit your recipe due to missing information. Please be sure to fill in all fields where the label is red. Thank you!";		return false;	}	else {		return true;	}}function validateContact() {	var f = document.forms['contact'];	var missing = new Array();	for(i=0;i<f.elements.length;i++) {		if(f.elements[i].value.length < 1) {			if(f.elements[i].name != "add1" && f.elements[i].name != "add2" && f.elements[i].name != "city" && f.elements[i].name != "state" && f.elements[i].name != "zip" && f.elements[i].name != "phone" && f.elements[i].name != "comments") {				missing.push(f.elements[i].name);			}		}	}	if (missing.length > 0) {		labels = document.getElementsByTagName("LABEL");		for(h=0;h<labels.length;h++) {			labels[h].style.color = "";		}		for(j=0;j<missing.length;j++) {			document.getElementById(missing[j]).style.color = "#ff0000";		}		document.getElementById("text").childNodes[0].nodeValue = "We're sorry, we were unable to submit your request due to missing information. Please be sure to fill in all fields where the label is red. Thank you!";		return false;	}	else {		return true;	}}function setPNG() {	if(document.all && document.getElementsByTagName) {		z = document.getElementsByTagName("IMG");		for(i=0;i<z.length;i++) {			if(z[i].src.indexOf(".png") > -1) {				a = z[i].src;				b = z[i].height;				c = z[i].width;				z[i].src="images/blank.gif";				z[i].height = b;				z[i].width = c;				z[i].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a+"', sizingMethod='scale')";			}		}	}}function setNav() {	if(document.getElementById("secondarynav")) {		x = document.getElementById("secondarynav").getElementsByTagName("LI")[0];		x.style.backgroundImage = "none";		}}function devLinks() {	x = document.getElementsByTagName("A");	for(i=0;i<x.length;i++) {		if(x[i].href.indexOf("#") > -1) {			x[i].className += "dev";		}	}}function setHomeLink() {	if (document.getElementsByTagName) {		var logo = document.getElementsByTagName("H1")[0];		logo.style.cursor = "pointer";		logo.onclick = function() { document.location.href = "index.php"; }	}}function init() {	startList();	setPNG();	setNav();	setHomeLink();}window.onload=init;