function showRollover(DisplayMenu) {
     //Hide all
    for (i=1;i<10;i++)
    {
               
        var tab = "RolloverNav" + i;
        
        if (document.getElementById(tab))
        {            
            if (document.layers) document.layers[''+tab+''].visibility = "hide"
            else if (document.all) document.all[''+tab+''].style.visibility = "hidden"
            else if (document.getElementById) document.getElementById(''+tab+'').style.visibility = "hidden"
        }
        else
        {
            i = 100;
        }   
                 
    } 
   

     if (document.getElementById(DisplayMenu))
    {            
        //if (document.layers) document.layers[''+tab+''].visibility = "show"
        //else if (document.all) document.all[''+tab+''].style.visibility = "visible"
        //else 
        if (document.getElementById) 
        {
        var obj = document.getElementById(''+DisplayMenu+'');
        obj.style.display = "";
        document.getElementById(''+DisplayMenu+'').style.visibility = "visible";
        }
    }
    
}
function funcShowRollover2(tab2, NavItem)
{
//Hide all
    for (i=1;i<10;i++)
    {
               
        var tab = "RolloverNav" + i;
        var nav = "Nav" + i;
        
        if (document.getElementById(tab))
        {            
            if (document.layers) document.layers[''+tab+''].visibility = "hide"
            else if (document.all) document.all[''+tab+''].style.visibility = "hidden"
            else if (document.getElementById) document.getElementById(''+tab+'').style.visibility = "hidden"
            
            document.getElementById(nav).className = "";
        }
        else
        {
            i = 100;
        }  
        
                 
    } 

var obj = document.getElementById(''+tab2+'');
obj.style.display = "";
if (document.getElementById(tab2))
        {            
            if (document.layers) document.layers[''+tab2+''].visibility = "show"
            else if (document.all) document.all[''+tab2+''].style.visibility = "visible"
            else if (document.getElementById) document.getElementById(''+tab2+'').style.visibility = "visible"
        }
document.getElementById(NavItem).className = "Active";

}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function lightNav(currentMenu)
{
	var menuArray = new Array("home","products","news","store");

	for (var i=0; i < menuArray.length; i++)
	{
		if(menuArray[i] != activeMenu)
		{
			if (menuArray[i] == currentMenu)
			{
				document.getElementById('menu_' + menuArray[i]).className = "navHover";
			}
			else
			{
				document.getElementById('menu_' + menuArray[i]).className = "navNover";
			}
		}
		else
		{
			document.getElementById('menu_' + activeMenu).className = "navActive";
		}
	}
}

function popup(URL, height, width)
{
	window.open(URL, null, 'resizable=no,menubar=no,toolbar=no,scrollbars=yes,status=no,directories=no,location=no,left=0,top=0,height=' + height + ', width=' + width);
}

function ShowStoreMessageandRedirect(Mode, URL)
{
	if (Mode == 'view')
	{
		alert('You are being redirected to the Online Store to view the cart. Please use the browser back button to come back to our website.');
	}
	else
	{
		alert('We are taking you to the Online Store to add the item to the cart and display it. Please use the browser back button to come back to our website.');
	}

	redirect(URL);
}

function AddtoCart(URL)
{
	alert('You are being redirected to the Online Store to add items to the cart. Please use the navigation buttons provided at the top to come back to this website / product page.');
	redirect(URL);
}

function ViewCart(URL)
{
	alert('You are being redirected to the Online Store to view the cart. Please use the navigation buttons provided at the top to come back to this website / product page.');
	redirect(URL);
}

function redirect(URL)
{
	location.href = URL;
}

function AddtoFavorites(URL, Descr)
{
	if (URL == "")
	{
		URL = location.href;
	}
	if (Descr == "")
	{
		Descr = document.title;
	}

	if (navigator.appName == "Netscape")
	{
		alert("Please use CTRL + D to bookmark this page.");
		return;		
	}
	else
	{
		window.external.AddFavorite(URL, Descr);
	}
}

function EmailPage(URL)
{
	var strEmailPage;
	if (URL == "")
	{
		URL = location.href;
	}
	//if (Title == "")
	//{
		//Title = document.title;
	//}

	strEmailPage = "/email-friend.asp?URL=" + URL

	redirect(strEmailPage);
}

function PrintPage()
{
	window.print();
}

function PrinterFriendlyPage()
{
	BeforePrint();
	PrintPage();
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		AfterPrint();
	}
	else
	{
		setTimeout("AfterPrint()", 1000);	
	}
}

function BeforePrint() //window.onbeforeprint()
{
	document.body.className = "print";
}

function AfterPrint() //window.onafterprint()
{
	document.body.className = "";
}


function rSubscribeToNews()
{
	rSubscribeToNewsWithChannel("");
}

function rSubscribeToNewsWithChannel(WhichChannel)
{
	var TheURL = "http://hr.cch.com/thenews&CloseOnExit=True&" + Math.random() + "&Channel=" + WhichChannel + "&";
	var Width  = ( navigator.appName != "Netscape" ) ? "426" : "450";
	rSubscribe( "CCH NetNews Subscription Options", "HNSWindow", TheURL, Width );
}

function rPopUpTrial(WhichOffer)
{
	rPopUpTrialWithChannel(WhichOffer, "");
}

function rPopUpTrialWithChannel(WhichOffer, WhichChannel)
{
	var TheURL = "http://health.cch.com/trydemo&CloseOnExit=True&wo=" + WhichOffer + "&" + Math.random() + "&Channel=" + WhichChannel + "&";
	rSubscribe( "CCH Trial ID Offer", "HTRWindow", TheURL, 590 );
}

function rSubscribe(WindowTitle, WindowName, TheURL, TheWidth)
{
	var TheWindow;
	var TheDocument;
	var Width;

	TheWindow = window.open( "", WindowName, "resizable=yes,menubar=no,toolbar=no,scrollbars=yes,status=no,directories=no,location=no,width=" + TheWidth + ",height=600" );
	TheDocument = TheWindow.document;
	TheDocument.close();
	TheDocument.open("text/html", "replace");
	TheDocument.write("<HTML><HEAD><TITLE>Please wait:  Loading " + WindowTitle + "</TITLE></HEAD><BODY BGCOLOR=#FFFFFF><TABLE BORDER=0 WIDTH=100% HEIGHT=100% ><TR><TD VALIGN=CENTER ALIGN=CENTER><FONT FACE=Arial SIZE=2 COLOR=#000080><STRONG>Please wait:  Loading " + WindowTitle + ". . .</STRONG></FONT></TD></TR></TABLE></BODY></HTML>");
	TheDocument.close();
	TheWindow.focus();
	TheWindow.location = TheURL;
}

function mainNavHighlight(what) {
	if (what!='') {
		what.style.color = "yellow";
	}
}


function setEvenBox() {
	// for making green boxes on serveral pages even height
	if (document.getElementById('1') != null) setEvenBoxDetail ('1', '2');
	if (document.getElementById('3') != null) setEvenBoxDetail ('3', '4');
	if (document.getElementById('5') != null) setEvenBoxDetail ('5', '6');	
	if (document.getElementById('7') != null) setEvenBoxDetail ('7', '8');		
}


function setEvenBoxDetail (id1, id2) {
	var a, b
	a = document.getElementById(id1).offsetHeight;
	b = document.getElementById(id2).offsetHeight;
	if (a>b) {
		document.getElementById(id2).style.height=a+'px';
	} else {
		document.getElementById(id1).style.height=b+'px';
	}
}














