
function Common_is_IE4()
{
	return((document.all)?true:false);  // is the browser IE or IE compatible?
}

function Common_is_NS4()
{
	return((document.layers)? true:false); // is the browser Netscape navigator?
}

function Common_is_NS6()
{
	if (navigator.appName == "Netscape") 
		return((document.getElementById) ? true:false); // is the browser netscape 6?
	else
		return(false);
}

function Common_is_AOL()
{
	return(location.href.indexOf(".aol") != -1);
}

function Common_is_CVS()
{
	return(location.href.indexOf("cvs") != -1);
}

function Common_is_MSN()
{
	return(location.href.indexOf("msn.") != -1);
}

function Common_is_Cigna()
{
	return(location.href.indexOf("cigna") != -1);
}

function Common_is_Lycos()
{
	return(location.href.indexOf("lycos") != -1);
}

function isAZ()
{
	return(!Common_is_MSN() &&
		   !Common_is_Cigna() &&
		   !Common_is_CVS());
}


function Common_open_popup(window_name, url, ig_height, ig_width, ig_leftx, ig_topx)
{
	var newWindow= null;

	url= url.replace("pedia/", "pedia_popup/");

	//set the parameters for aol
	if (Common_is_AOL())
		newWindow= window.open(url,window_name,'width=' + ig_width + ',height=' + ig_height + ',toolbars=0,scrollbars=5,location=0,statusbars=0,menubars=0,resizable=1,screenX=' + ig_leftx + ',screenY=' + ig_topx);
	else
	{
		if (Common_is_IE4() || Common_is_NS6())
			newWindow= window.open(url,window_name,'width=' + ig_width + ',height=' + ig_height + ',toolbars=0,scrollbars=5,location=0,statusbars=0,menubars=0,resizable=1,left=' + ig_leftx + ',top=' + ig_topx);
		if (Common_is_NS4())
			newWindow= window.open(url,window_name,'width=' + ig_width + ',height=' + ig_height + ',toolbars=0,scrollbars=5,location=0,statusbars=0,menubars=0,resizable=1,screenX=' + ig_leftx + ',screenY=' + ig_topx);
	}

	if (newWindow != null)
		newWindow.focus();
}

function HWResize()
{
	if (document.all)
	{
		var i;
		for( i=0; i < document.all.tags("TABLE").length; i++ )
		{

			if (document.all.tags("TABLE")[i].id == "HWContent")
			{
			   if (document.all.tags("TABLE")[i].offsetTop <= (HWNavBox.offsetTop + HWNavBox.offsetHeight))
				document.all.tags("TABLE")[i].width= HWNavBox.offsetLeft - (document.all.tags("TABLE")[i].offsetLeft +1);
			}
		}
	}
}
