home_on = new Image;
home_off = new Image;
vehicles_on = new Image;
vehicles_off = new Image;
locations_on = new Image;
locations_off = new Image;
policies_on = new Image;
policies_off = new Image;
rates_on = new Image;
rates_off = new Image;
corp_rates_on = new Image;
corp_rates_off = new Image;
ctr_on = new Image;
ctr_off = new Image;
hitches_on = new Image;
hitches_off = new Image;
car_sales_on = new Image;
car_sales_off = new Image;
ins_rep_on = new Image;
ins_rep_off = new Image;


if (document.images) {

home_on.src = docRoot + 'images/nav_buttons/home_on.gif'
home_off.src = docRoot + 'images/nav_buttons/home_off.gif'
vehicles_on.src = docRoot + 'images/nav_buttons/vehicles_on.gif'
vehicles_off.src = docRoot + 'images/nav_buttons/vehicles_off.gif'
locations_on.src = docRoot + 'images/nav_buttons/locations_on.gif'
locations_off.src = docRoot + 'images/nav_buttons/locations_off.gif'
rates_on.src = docRoot + 'images/nav_buttons/rates_on.gif'
rates_off.src = docRoot + 'images/nav_buttons/rates_off.gif'
corp_rates_on.src = docRoot + 'images/nav_buttons/corp_rates_on.gif'
corp_rates_off.src = docRoot + 'images/nav_buttons/corp_rates_off.gif'
policies_on.src = docRoot + 'images/nav_buttons/policies_on.gif'
policies_off.src = docRoot + 'images/nav_buttons/policies_off.gif'
ctr_on.src = docRoot + 'images/nav_buttons/ctr_on.gif'
ctr_off.src = docRoot + 'images/nav_buttons/ctr_off.gif'
hitches_on.src = docRoot + 'images/nav_buttons/hitches_on.gif'
hitches_off.src = docRoot + 'images/nav_buttons/hitches_off.gif'
car_sales_on.src = docRoot + 'images/nav_buttons/sales_on.gif'
car_sales_off.src = docRoot + 'images/nav_buttons/sales_off.gif'
ins_rep_off.src = docRoot + 'images/nav_buttons/ins_off.gif'
ins_rep_on.src = docRoot + 'images/nav_buttons/ins_on.gif'
}
else {
home_on.src = ''
home_off.src = ''
vehicles_on.src = ''
vehicles_off.src = ''
policies_on.src = ''
policies_off.src = ''
locations_on.src = ''
locations_off.src = ''
rates_on.src = ''
rates_off.src = ''
corp_rates_on.src = ''
corp_rates_off.src = ''
ctr_on.src = ''
ctr_off.src = ''
}

var bname=navigator.appName;
var bversion=parseInt(navigator.appVersion)
if (bname=="Netscape")
var brows=true
else
var brows=false
var x=0;
var link=new Array();

function layerinput(msg,dtop,dleft){
this.msg=msg;
this.dtop=dtop;
this.dleft=dleft;
}

function don(x)
{
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4))
	{
	//Netscape layer code
	if (brows)
		{
		with(link[x])
			{
			document.layers['linkex'].document.writeln(msg);
			document.layers['linkex'].document.close();
			document.layers['linkex'].top=dtop;
			document.layers['linkex'].left=dleft;
			}
		document.layers['linkex'].visibility="show";
		}
	//Internet Explorer division code
	else
		{
		with(link[x])
			{
			divisionex.innerHTML=msg;
			divisionex.style.top=event.clientY-15;
			divisionex.style.left=event.clientX-5;
			}
		divisionex.style.visibility="visible";
		}
	}
}

//PART4
//function for turning of the layer/division

function doff()
{
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4))
	{
	if (brows)
	document.layers['linkex'].visibility="hide";
	else
	divisionex.style.visibility="hidden";
	}
}
//PART5 Array of attributes, assigned to the link[x] object
//msg attribute is the text written to the layer.
//dtop, dleft  attributes hold pixel numers, they set the top and left alignment of the layer 
link[0]=new layerinput('<img src="' + docRoot + 'images/pop_austin.gif" border="0" ismap usemap="#austin">',275,20)
link[1]=new layerinput('<img src="' + docRoot + 'images/pop_dallas.gif" border="0" ismap usemap="#dallas">',275,20)
link[3]=new layerinput('<img src="' + docRoot + 'images/pop_el_paso.gif" border="0" ismap usemap="#el_paso">',275,20)
link[4]=new layerinput('<img src="' + docRoot + 'images/pop_ft_worth.gif" border="0" ismap usemap="#fort_worth">',275,20)
link[6]=new layerinput('<img src="' + docRoot + 'images/pop_houston.gif" border="0" ismap usemap="#houston">',275,20)
link[12]=new layerinput('<img src="' + docRoot + 'images/pop_san_antonio.gif" border="0" ismap usemap="#san_antonio">',275,20)
link[13]=new layerinput('<img src="' + docRoot + 'images/pop_tulsa.gif" border="0" ismap usemap="#tulsa">',275,20)
link[15]=new layerinput('<img src="' + docRoot + 'images/pop_albuquerque.gif" border="0" ismap usemap="#albuquerque">',275,20)
link[16]=new layerinput('<img src="' + docRoot + 'images/pop_oklahoma_city.gif" border="0" ismap usemap="#oklahoma">',275,20)
//PART6
//writing the division HTML tag, I do it here so that it is less confusing. You don't have to add separate HTML tags.
document.write("<div id=\"divisionex\" style=\"position:absolute; visibility: hidden; width=19%\">")
document.write("</div>")
//writing the layer code
document.write("<Layer name=\"linkex\" visibility=\"hide\" width=\"19%\">")
document.write("</layer>")
