
var defaultMenuWidth="320px"
var menuBox;
var linkList=new Array()

var arrow="<img src=\"images/white_arrow.gif\" border=\"0\">&nbsp;"
linkList[0]='<a href="http://consumerreports.org" target="_blank">'+arrow+'Consumer Reports</a>'
//linkList[0]+='<hr>' //Optional Separator
linkList[0]+='<a href="http://informedforlife.org" target="_blank">'+arrow+'Informed for Life</a>'
linkList[0]+='<a href="http://www.epa.gov/" target="_blank">'+arrow+'U.S. E.P.A.</a>'

linkList[1]='<a href="http://pueblo.gsa.gov" target="_blank">'+arrow+'Federal Citizens Information Center</a>'
linkList[1]+='<a href="http://ftc.gov/bcp/consumer.shtm" target="_blank">'+arrow+'Federal Trade Commission</a>'
linkList[1]+='<a href="http://autofinancing101.org" target="_blank">'+arrow+'Aware</a>'

linkList[2]='<a href="http://consumeraction.gov" target="_blank">'+arrow+'Federal Citizens Information Center</a>'
linkList[2]+='<a href="http://ftc.gov/bcp/consumer.shtm" target="_blank">'+arrow+'Federal Trade Commission</a>'
linkList[2]+='<a href="http://firstgov.gov" target="_blank">'+arrow+'US Government Web Portal</a>'

linkList[3]='<a href="http://nhtsa.gov" target="_blank">'+arrow+'National Highway Traffic Safety Admin.</a>'
linkList[3]+='<a href="http://iihs.org" target="_blank">'+arrow+'Insurance Institute for Highway Safety</a>'
linkList[3]+='<a href="http://nsc.org" target="_blank">'+arrow+'National Safety Council</a>'

linkList[4]='<a href="http://pueblo.gsa.gov" target="_blank">'+arrow+'Federal Citizens Information Center</a>'
linkList[4]+='<a href="http://carcare.org" target="_blank">'+arrow+'Be Car Care Aware</a>'
linkList[4]+='<a href="http://alldata.com" target="_blank">'+arrow+'AllData</a>'

linkList[5]='<a href="http://iii.org" target="_blank">'+arrow+'Insurance-Insurance Information Institute</a>'
linkList[5]+='<a href="http://pueblo.gsa.gov" target="_blank">'+arrow+'Federal Citizens Information Center</a>'
linkList[5]+='<a href="http://bbb.org/alerts/article.asp?ID=431" target="_blank">'+arrow+'Better Business Bureau</a>'


var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popUpMenu" onMouseover="clearhideMenu();" onMouseout="fastHide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function popMenu(e, which, id, optWidth){
if (!document.all&&!document.getElementById)
	return
clearhideMenu()
//var menuBox=ie5? document.all.['popUpMenu'] : document.getElementById("popUpMenu")
menuBox=document.getElementById("popUpMenu")
var xObj=document.getElementById(id)
var coors = findPos(xObj);
// coors[0] is the LEFT edge of the table cell named by id
// coors[1] is the TOP edge of the table cell named by id

menuBox.innerHTML=which
menuBox.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
menuBox.contentwidth=menuBox.offsetWidth
menuBox.contentheight=menuBox.offsetHeight
eventX=ie5? event.clientX : e.clientX
eventY=ie5? event.clientY : e.clientY

//Find out how close the mouse is to the corner of the window
var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuBox.contentwidth)
	//move the horizontal position of the menu to the left by it's width
	//menuBox.style.left=ie5? iecompattest().scrollLeft+eventX-menuBox.contentwidth+20+"px" : window.pageXOffset+eventX-menuBox.contentwidth+20+"px"
	//menuBox.style.left=ie5? iecompattest().scrollLeft+eventX-menuBox.contentwidth+20+"px" : window.pageXOffset+eventX-menuBox.contentwidth+20+"px"
	menuBox.style.left=coors[0]-menuBox.contentwidth+"px"
else
	//position the horizontal position of the menu where the mouse was clicked
	//menuBox.style.left=ie5? iecompattest().scrollLeft+eventX+20+"px" : window.pageXOffset+eventX+20+"px"
	//menuBox.style.left=ie5? iecompattest().scrollLeft+eventX+20+"px" : coors[0]+40+"px"
	menuBox.style.left=coors[0]+40+"px"

//same concept with the vertical position
//if (bottomedge<menuBox.contentheight)
if (bottomedge<menuBox.contentheight)
	//menuBox.style.top=ie5? iecompattest().scrollTop+eventY-menuBox.contentheight+20+"px" : window.pageYOffset+eventY-menuBox.contentheight+20+"px"
	//menuBox.style.top=ie5? iecompattest().scrollTop+eventY-menuBox.contentheight+40+"px" : window.pageYOffset+eventY-menuBox.contentheight+20+"px"
	menuBox.style.top=coors[1]-menuBox.contentheight+2+"px"
else
	//menuBox.style.top=ie5? iecompattest().scrollTop+event.clientY+20+"px" : window.pageYOffset+eventY+20+"px"
	//menuBox.style.top=ie5? iecompattest().scrollTop+event.clientY+20+"px" : coors[1]+40+"px"
	menuBox.style.top=coors[1]+40+"px"
menuBox.style.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hideMenu(){
if (window.menuBox)
menuBox.style.visibility="hidden"
}

function fastHide(e){
if (ie5&&!menuBox.contains(e.toElement))
hideMenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hideMenu()
}

function pauseHideMenu(){
pauseHide=setTimeout("hideMenu()",500)
}

function clearhideMenu(){
if (window.pauseHide)
clearTimeout(pauseHide)
}

if (ie5||ns6)
document.onclick=hideMenu

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}