function flip(name,state,iterance,type) {
	iterance = (iterance) ? iterance:"";
	type = (type) ? type:"gif";
	path = document.images[name+iterance].src.split('/');
	path = path.slice(0,path.length-1);
	imgname = (iterance != "") ? name+iterance:name;
	document.images[imgname].src = path.join('/') + "/" + name + "_" + state + "."+type;
}

function popr(e,c) { 
	document.getElementById(e).className=c;
	if(navigator.appName== "Microsoft Internet Explorer") {
		if (e=="submit_recipe" && c=="showwin") document.getElementById("rec_content_wrap").style.display="none";
		if (e=="submit_recipe" && c=="hiddenw") document.getElementById("rec_content_wrap").style.display="block";
		if (e=="emailf" && c=="emailwin") document.getElementById("rd_content_wrap").style.display="none";
		if (e=="emailf" && c=="hiddenw") document.getElementById("rd_content_wrap").style.display="block";
	}
}

function printwin(t,r) {
	window.open('print.php?p='+t+'&r='+r,'printer','height=500,width=600');
}