function accessCSS(layerID){
    if(document.getElementById){
      return document.getElementById(layerID).style;}
    else if(document.all){
      return document.all[layerID].style;}
    else if(document.layers){
      return document.layers[layerID];}}

function show_div(layerID){
    accessCSS(layerID).visibility="visible";}

function hide_div(layerID){
    accessCSS(layerID).visibility="hidden";}

function NavOn(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#9cbcb8";
	td.style.border="solid 2px #78a095";
	}}

function NavOut(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#fff";
	td.style.border="solid 2px #fff";
	}}

// BEGINNING NEW 11-13-2003 //
function Nav_On(layerID){
	accessCSS(layerID).background="url('/test/nav_background_on.gif') no-repeat left top";
	}

function Nav_Out(layerID){
	accessCSS(layerID).background="url('/test/nav_background.gif') no-repeat left top";
	}

function Nav_On_Sub(layerID){
	accessCSS(layerID).visibility="visible";
	}

function Nav_Out_Sub(layerID){
	accessCSS(layerID).visibility="hidden";
	}
// END NEW 11-13-2003 //

function NavOut_Sub(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#c4d4d4";
	td.style.border="solid 2px #c4d4d4";
	}}

function NavOn_Parent(layerID){
	accessCSS(layerID).backgroundColor="#c0c0c0";
	accessCSS(layerID).border="solid 2px #696969";
	}

function NavOut_Parent(layerID){
	accessCSS(layerID).backgroundColor="#fff";
	accessCSS(layerID).border="solid 2px #fff";
	}

function show_td(layerID){
	accessCSS(layerID).display="inline";}

function hide_td(layerID){
	accessCSS(layerID).display="none";}

function show_span(layerID){
	accessCSS(layerID).display="inline";}

function hide_span(layerID){
	accessCSS(layerID).display="none";}

function ehearing_assessment_score(){
	// clear counters
	iYes = 0;
	iMaybe = 0;
	
	// loop the form elements and get the count
	for (var i=0; i<document.ehearing_assessment.length; i++)
	{
		if (document.ehearing_assessment.elements[i].value.indexOf("Yes") > (-1))
		{
			if (document.ehearing_assessment.elements[i].checked)
			{
				iYes += 4;
			}
		}
		else
		if (document.ehearing_assessment.elements[i].value.indexOf("Sometimes") > (-1))
		{
			if (document.ehearing_assessment.elements[i].checked)
			{
				iMaybe += 2;
			}
		}
	}
	document.ehearing_assessment.txtScore.value = iYes + iMaybe;}

function popup_ilink(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=575,height=350');");}

function popup_elink(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=575,height=350');");}

function popup_pr(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=575,height=350');");}

function popup_at_a_glance(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=375');");}

function popup_hhabc_products(URL) {
	day = new Date();
	id = day.getTime();
	popup_Height = 400;
	popup_Width = 580;
	Top = (window.screen.availHeight - popup_Height) / 2;
	Left = (window.screen.availWidth - popup_Width) / 2;
	hhabc_products = window.open(URL, 'hhabc_products', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,height=' + popup_Height + ',width=' + popup_Width + ',top=' + Top + ',left=' + Left);
}

function popup_hhabc_info(URL) {
	day = new Date();
	id = day.getTime();
	popup_Height = 400;
	popup_Width = 275;
	Top = (window.screen.availHeight - popup_Height) / 2;
	Left = (window.screen.availWidth - popup_Width) / 2;
	hhabc_info = window.open(URL, 'hhabc_info', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,height=' + popup_Height + ',width=' + popup_Width + ',top=' + Top + ',left=' + Left);
}

function popup_hhabc_edit(URL) {
	day = new Date();
	id = day.getTime();
	popup_Height = 400;
	popup_Width = 375;
	Top = (window.screen.availHeight - popup_Height) / 2;
	Left = (window.screen.availWidth - popup_Width) / 2;
	hhabc_edit = window.open(URL, 'hhabc_edit', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,height=' + popup_Height + ',width=' + popup_Width + ',top=' + Top + ',left=' + Left);
}
function popup_hhabc_validate_cc_info(URL) {
	day = new Date();
	id = day.getTime();
	popup_Height = 400;
	popup_Width = 275;
	Top = (window.screen.availHeight - popup_Height) / 2;
	Left = (window.screen.availWidth - popup_Width) / 2;
	hhabc_cc = window.open(URL, 'hhabc_info', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,height=' + popup_Height + ',width=' + popup_Width + ',top=' + Top + ',left=' + Left);
	return false;
}

function popup_tinnitus_msgbrd(URL) {
	day = new Date();
	id = day.getTime();
	popup_Height = 400;
	popup_Width = 700;
	Top = (window.screen.availHeight - popup_Height) / 2;
	Left = (window.screen.availWidth - popup_Width) / 2;
	hhabc_edit = window.open(URL, 'tinnitus_msgbrd', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,height=' + popup_Height + ',width=' + popup_Width + ',top=' + Top + ',left=' + Left);
}

function popup_hhabc_pf(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=575,height=350');");}

function popup_nprc_pm(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=575,height=350');");}

function popup_energizer_howto(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=360,height=270');");}

function MenuOnC(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#fff"; 
	td.style.color="#000";
	td.style.border="1px solid #78a095";}}

function MenuOutC(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#c4d4d4"; 
	td.style.color="#000";
	td.style.border="1px solid #9cbcb8";}}

function MenuOnN(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#fff"; 
	td.style.color="#000";
	td.style.border="1px solid #5781AE";}}

function MenuOutN(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#CED9E7"; 
	td.style.color="#000";
	td.style.border="1px solid #97B1D0";}}

function SideMenu_On(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#c4d4d4"; 
	td.style.color="#000";}}

function SideMenu_Out(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#fff"; 
	td.style.color="#000";}}

function SideMenu_On1(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#c4d4d4"; 
	td.style.color="#000";}}

function SideMenu_On2(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#ced9e7"; 
	td.style.color="#000";}}

function SideMenu_On3(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#e0d4bb"; 
	td.style.color="#000";}}

function SideMenu_On4(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#c3c1d9"; 
	td.style.color="#000";}}

function HSVert_On(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#c3c1d9"; 
	td.style.color="#000";}}
		
function HSVert_Out(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#fff"; 
	td.style.color="#000";
	window.status="";}}

function verify_void(order_id,url) {
	var name=confirm("Do you want to void order #"+order_id+"?")
	if (name==true) {
	window.location=url+order_id;
	}
	else {}
	}