// onresize for ns4
var origWidth, origHeight;
if (document.layers) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

var cur_lyr;	// holds id of currently visible layer
function swapLayers(id) {
  if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "visible";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "hidden";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}
<!-- Browser Check -->
iens6=document.all||document.getElementById
ns4=document.layers
var titleArray = new Array
var linkArray = new Array
linkArray[1]="Alaska<br>"
linkArray[1]+="Arizona<br>"
linkArray[1]+="California<br>"
linkArray[1]+="Colorado<br>"
linkArray[1]+="Hawaii<br>"
linkArray[1]+="Idaho<br>"
linkArray[1]+="Montana<br>"
linkArray[1]+="Nevada<br>"
linkArray[1]+="New Mexico<br>"
linkArray[1]+="Oklahoma<br>"
linkArray[1]+="Oregon<br>"
linkArray[1]+="Texas<br>"
linkArray[1]+="Washington<br>"
linkArray[1]+="Wyoming<br>"
linkArray[1]+="Utah<br>"

linkArray[2]="Illinois<br>"
linkArray[2]+="Indiana<br>"
linkArray[2]+="Iowa<br>"
linkArray[2]+="Kansas<br>"
linkArray[2]+="Michigan<br>"
linkArray[2]+="Minnesota<br>"
linkArray[2]+="Missouri<br>"
linkArray[2]+="N. Dakota<br>"
linkArray[2]+="S. Dakota<br>"
linkArray[2]+="Nebraska<br>"
linkArray[2]+="Wisconsin<br>"
 
linkArray[3]="Alabama<br>"
linkArray[3]+="Arkansas<br>"
linkArray[3]+="Florida <br>"
linkArray[3]+="Georgia<br>"
linkArray[3]+="Kentucky<br>"
linkArray[3]+="Louisiana<br>"
linkArray[3]+="Mississippi<br>"
linkArray[3]+="N. Carolina<br>"
linkArray[3]+="S. Carolina<br>"
linkArray[3]+="Tennessee<br>"
linkArray[3]+="Virginia<br>"
linkArray[3]+="W. Virginia<br>"


linkArray[4]="Connecticut<br>"
linkArray[4]+="D.C.<br>"
linkArray[4]+="Delaware<br>"
linkArray[4]+="Maine<br>"
linkArray[4]+="Maryland<br>"
linkArray[4]+="Massachusetts<br>"
linkArray[4]+="New Hampshire<br>"
linkArray[4]+="New Jersey<br>"
linkArray[4]+="New York<br>"
linkArray[4]+="Pennsylvania<br>"
linkArray[4]+="Rhode Island<br>"
linkArray[4]+="Ohio<br>"
linkArray[4]+="Vermont<br>"



linkArray[5]="Coming soon<br>"

<!--GLOBAL VARIABLES-->
var thename
var theobj
var thetext
var winHeight
var winWidth
var boxPosition
var headerColor
var tableColor
var timerID
var seconds=0
var x=90
var y=180
var offsetx = 2
var offsety = 2
<!--END GLOBAL VARIABLES-->

if(ns4) {
	document.captureEvents(Event.MOUSEMOVE)
}
document.onmousemove=getXY
<!--GLOBAL FUNCTIONS-->
function buildText(value,tcolor,bcolor) {
text="<table width='"+(winWidth-4)+"' height='"+(winHeight-4)+"' border='0' bgcolor='"+tableColor+"' cellspacing='1' cellpadding=3>"
text+="</td></tr>"
text+="<tr><td width='"+winWidth+"' align='left' valign='top'>"
text+="<span class='rt01'>"+linkArray[value]+"</span>"
text+="</td></tr></table>"
return text
}

function setObj1(textelement,inwidth,inheight,boxpos,titlecolor,boxcolor,tfontcolor,bfontcolor) {
	clearTimeout(timerID)
	boxPosition=boxpos
	tableColor=boxcolor
	headerColor=titlecolor
	winWidth=inwidth
	winHeight=inheight
	thetext=buildText(textelement,tfontcolor,bfontcolor)
	if (boxPosition == "bottomR") { // Right
		x=x+offsetx
		y=y+offsety
	}
	if (boxPosition == "bottomL") { // Left
		x=x-(offsetx+2)-winWidth
		y=y-offsety
	}
	if (boxPosition == "topR") { // Top
		x=x+offsetx
		y=y+offsety-winHeight
	}
	if (boxPosition == "topL") { // Top
		x=x-(offsetx+2)-winWidth
		y=y+offsety-winHeight
	}
	if(iens6){
		thename = "viewer"
		theobj=document.getElementById? document.getElementById(thename):document.all.thename
		theobj.style.width=winWidth
		theobj.style.height=winHeight
		theobj.style.left=x
			if(iens6&&document.all) {
			theobj.style.top=document.body.scrollTop+y				
				theobj.innerHTML = ""
				theobj.insertAdjacentHTML("BeforeEnd","<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top>"+thetext+"</td></tr></table>")
			}
			if(iens6&&!document.all) {
			theobj.style.top=window.pageYOffset+y	
				theobj.innerHTML = ""
				theobj.innerHTML="<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top>"+thetext+"</td></tr></table>"
			}
	}
	if(ns4){
		thename = "nsviewer"
		theobj = eval("document."+thename)
		theobj.left=x
		theobj.top=y
		theobj.width=winWidth
		theobj.clip.width=winWidth
		theobj.height=winHeight
		theobj.clip.height=winHeight
		theobj.document.write("<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top>"+thetext+"</td></tr></table>")
		theobj.document.close()
	}
	viewIt()

}

function viewIt() {
		if(iens6) {
			theobj.style.visibility="visible"
		}
		if(ns4) {
			theobj.visibility = "visible"
		}
}

function stopIt() {
	if(theobj) {
		if(iens6) {
		theobj.innerHTML = ""
		theobj.style.visibility="hidden"
		}
		if(ns4) {
		theobj.document.write("")
		theobj.document.close()
		theobj.visibility="hidden"
		}
	}
}

function timer(sec) {
	seconds=parseInt(sec)
	if(seconds>0) {
		seconds--
		timerID=setTimeout("timer(seconds)",1000)
	}else{
		stopIt()
	}
}

function getXY(e) {
	if (ns4) {
		x=0
		y=0
		x=e.pageX; 
		y=e.pageY;
	}
	if (iens6&&document.all) {
		x=0
		y=0
		x=event.x; 
		y=event.y;
	}
	if (iens6&&!document.all) {
		x=0
		y=0
		x=e.pageX; 
		y=e.pageY;
	}
}
<!--END GLOBAL FUNCTIONS-->
