sbout = new Image();
sbout.src = "assets/btn_interactive_starburst.png";
sbover = new Image();
sbover.src = "assets/btn_interactive_starburst_rollover.png";

function submit_search() {
	document.search_form.submit();
}
var overpopup = false;
function popup(state) {
	if (state == false) {
		document.getElementById("popup_1").style.visibility = "hidden";
	}
	if (state == true) {
		document.getElementById("popup_1").style.visibility = "visible";
	}
	overpopup = state;
}
function sidenav_over(id) {
	document.getElementById(id).style.backgroundColor = "#fdbc67";
	if (id == "advantages_of_crinone") {
		document.getElementById("popup_1").style.visibility = "visible";		
	}
}
function sidenav_out(id) {
	document.getElementById(id).style.backgroundColor = "";
	if (id == "advantages_of_crinone" && overpopup == false) {
		document.getElementById("popup_1").style.visibility = "hidden";		
	}
	stickit();
}
function stickit() {
	var getpath = location.href;
	var getpage = getpath.substring(getpath.lastIndexOf('../index.html') + 1);
	/* popup nav section */
	if (getpage.match(/^vs_im/)) {
		document.getElementById("vs_im").style.backgroundColor = "#fdbc67";
		document.getElementById("advantages_of_crinone").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^vs_vaginals/)) {
		document.getElementById("vs_vaginals").style.backgroundColor = "#fdbc67";
		document.getElementById("advantages_of_crinone").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^vs_orals/)) {
		document.getElementById("vs_orals").style.backgroundColor = "#fdbc67";
		document.getElementById("advantages_of_crinone").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^vs_endometrin/)) {
		document.getElementById("vs_endometrin").style.backgroundColor = "#fdbc67";
		document.getElementById("advantages_of_crinone").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^adv_tissue_vs_serum_levels/)) {
		document.getElementById("adv_tissue_vs_serum_levels").style.backgroundColor = "#fdbc67";
		document.getElementById("advantages_of_crinone").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^unique_bioadhesive_gel/)) {
		document.getElementById("unique_bioadhesive_gel").style.backgroundColor = "#fdbc67";
		document.getElementById("advantages_of_crinone").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^adv_quality_assurance/)) {
		document.getElementById("adv_quality_assurance").style.backgroundColor = "#fdbc67";
		document.getElementById("advantages_of_crinone").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^adv_dosing/)) {
		document.getElementById("adv_dosing").style.backgroundColor = "#fdbc67";
		document.getElementById("advantages_of_crinone").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^adv_patient_preferred/)) {
		document.getElementById("adv_patient_preferred").style.backgroundColor = "#fdbc67";
		document.getElementById("advantages_of_crinone").style.backgroundColor = "#fdbc67";
	}
	/* end popup nav section */
	if (getpage.match(/^cep/)) {
		document.getElementById("cep").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^oi_iui/)) {
		document.getElementById("oi_iui").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^ivf_et/)) {
		document.getElementById("ivf_et").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^donor_egg/)) {
		document.getElementById("donor_egg").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^frozen_embryo_transfer/)) {
		document.getElementById("frozen_embryo_transfer").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^tissue_vs_serum_levels/)) {
		document.getElementById("tissue_vs_serum_levels").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^quality_assurance/)) {
		document.getElementById("quality_assurance").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^dosing/)) {
		document.getElementById("dosing").style.backgroundColor = "#fdbc67";
	}
	if (getpage.match(/^patient_preferred/)) {
		document.getElementById("patient_preferred").style.backgroundColor = "#fdbc67";
	}
}

