// JavaScript Document
if (document.images) {

// main menu rollover images //
	img69off = new Image();
	img69off.src = "/images/menu/bttn_products_off.gif";
	img69on = new Image();
	img69on.src = "/images/menu/bttn_products_on.gif";
	img70off = new Image();
	img70off.src = "/images/menu/bttn_about_us_off.gif";
	img70on = new Image();
	img70on.src = "/images/menu/bttn_about_us_on.gif";
	img71off = new Image();
	img71off.src = "/images/menu/bttn_contact_off.gif";
	img71on = new Image();
	img71on.src = "/images/menu/bttn_contact_on.gif";
	img72off = new Image();
	img72off.src = "/images/menu/bttn_information_off.gif";
	img72on = new Image();
	img72on.src = "/images/menu/bttn_information_on.gif";
	img96off = new Image();
	img96off.src = "/images/menu/bttn_customer_login_off.gif";
	img96on = new Image();
	img96on.src = "/images/menu/bttn_customer_login_on.gif";
	img74off = new Image();
	img74off.src = "/images/menu/bttn_my_account_off.gif";
	img74on = new Image();
	img74on.src = "/images/menu/bttn_my_account_on.gif";
	img75off = new Image();
	img75off.src = "/images/menu/bttn_shopping_list_off.gif";
	img75on = new Image();
	img75on.src = "/images/menu/bttn_shopping_list_on.gif";
// end main menu rollover images //
	imgLogoutoff = new Image();
	imgLogoutoff.src = "/images/menu/bttn_logout_off.gif";
	imgLogouton = new Image();
	imgLogouton.src = "/images/menu/bttn_logout_on.gif";
}

function img_toggle(imgName,state) {
	if (document.images) {
		document[imgName].src = eval(imgName + state + ".src");
	}
}

function toggle_mapmenu(id,li,a) {
	if(document.getElementById) {
		var el = document.getElementById(id);
		el.style.display = (el.style.display == 'none') ? 'block' : 'none';
		var el = document.getElementById(li);
		el.className = (el.className == "sitemap_sub_menu") ? "sitemap_sub_open" : "sitemap_sub_menu";
		var el = document.getElementById(a);
		el.className = (el.className == "sitemap_sub") ? "sitemap_sub_sel" : "sitemap_sub";
	}
}

function toggle_section(id,image) {
	if (document.getElementById) {
		var el = document.getElementById(id);
		el.style.display = (el.style.display == 'none') ? 'block' : 'none';
		img_state = (el.style.display == "none") ? "off" : "on";
		img_toggle(image,img_state);
	}
}

function toggle_credit_form(state) {
	if (document.getElementById) {
		el = document.getElementById('credit_form');
		el.style.display = state;
	}
}

function winOpen(addy,w,h) {
	LeftPosition = (screen.width) ? (screen.width - w)/2 : 0;
	TopPosition = (screen.height) ? ((screen.height - h)/2)-50 : 0;
	settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+",status=yes,scrollbars=yes";
	mwin = window.open(addy,'win1',settings);
}

function check_searchbox(form,element,text) {
	searchbox = document.forms[form].elements[element];
	if (searchbox.value == "") {
		searchbox.value = text;
	}
	else if (searchbox.value == text) {
		searchbox.value = "";
	}
}
