

iens6=document.all||document.getElementById
ns4=document.layers

var titleArray = new Array
titleArray[1]="<b>video: American Queen</b>"
titleArray[2]="<b>audio: American Queen</b>"
titleArray[3]="<b>Java Resources</b>"
titleArray[4]="<b>DHTML Resources</b>"

var linkArray = new Array
linkArray[1]="<a href='http://www.rivers-rails.com/image-gallery/americanqueen/video/american-whistle.ram'><img src='http://www.rivers-rails.com/image-gallery/americanqueen/video/video-aq-whistle.jpg' border='0'></a>"
linkArray[1]+=" <a href='http://www.rivers-rails.com/image-gallery/americanqueen/video/americanqueen1.ram'><img src='http://www.rivers-rails.com/image-gallery/americanqueen/video/video-aq-1.jpg' border='0'></a><br>"
linkArray[1]+="<br> Real Player needed<br><a href='http://www.real.com'><i>&nbsp;&raquo; download</i></a><br>"

linkArray[2]="•  <a href='http://www.rivers-rails.com/image-gallery/americanqueen/audio/audio-aq-whistle.ram'>steam whistle</a><br>"
linkArray[2]+="•  <a href='http://www.rivers-rails.com/image-gallery/americanqueen/audio/audio-aq-calliope.ram'>calliope (steam piano)</a><br>"
linkArray[2]+="<br> Real Player needed<br><a href='http://www.real.com'><i>&nbsp;&raquo; download</i></a><br>"

linkArray[3]="You can provide text along with the links to either describe a link or say something"
linkArray[3]+=" interesting about a site. You can change the color of the text that you add.<br>"
linkArray[3]+="• <a href='http://www.sun.com/download/'>Sun Download Center</a><br>"

linkArray[4]="• <a href='http://www.wsabstract.com/'>Website Abstraction</a><br>"
linkArray[4]+="• <a href='http://www.dynamicdrive.com/'>Dynamic Drive</a><br>"
linkArray[4]+="• <a href='http://www.ruleweb.com/dhtml/'>Jeff Rule's DHTML</a><br>"

var thename
var theobj
var thetext
var winHeight
var winWidth
var boxPosition
var headerColor
var tableColor
var timerID
var seconds=0
var x=0
var y=0
var offsetx = 2
var offsety = 2

if(ns4) {
	document.captureEvents(Event.MOUSEMOVE)
}
document.onmousemove=getXY

function buildText(value,tcolor,bcolor) {
// CHANGE EACH ARRAY ELEMENT BELOW TO YOUR OWN CONTENT. MAKE SURE TO USE SINGLE QUOTES INSIDE DOUBLE QUOTES.
text="<table width='"+(winWidth-4)+"' height='"+(winHeight-4)+"' border='0' bgcolor='"+tableColor+"' cellspacing='2' cellpadding='2'>"

text+="<tr><td width='"+winWidth+"' align='left' valign='top'>"
text+="<font face='Arial,Helvetica' color='"+bcolor+"' SIZE='-1'><div class='bilderbox-text'>"+linkArray[value]+"</div></font>"
text+="</td></tr></table>"
return text
}

function setObj(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><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></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><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></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><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></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;
	}
}


