//Function to allow jumping to rifle pages using select box
function go()
{
window.location=document.forms[0].rifle.options[document.forms[0].rifle.selectedIndex].value
}

function lib_bwcheck(){
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=lib_bwcheck()
if(document.layers){ //NS4 resize fix...
	scrX= innerWidth; scrY= innerHeight;
	onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}

msgFont= "Times,verdana,arial,helvetiva"	// The font for the message
msgFontSize= 14				// Set the fontSize in px
msgFontColor="#000000"			// Set the fontColor
msgWidth= "400"				// Set the width of the messageblock here for netscape 4

//Set the text you want to display on mouseover here.
messages=new Array()
messages[0]='Click an image above to learn more'
messages[1]='An original Henry in solid brass with the smoothest action'
messages[2]='An all-american icon'
messages[3]='From 16" to 35" in just seconds'
messages[4]='The ultimate varmint hunting experience'
messages[5]='Official Youth Rifle of the Olympic USA Shooting Team'
messages[6]='"Guns & Ammo" Gun of the Year'
messages[7]='Load on Sunday, shoot all week long'
messages[8]='Frontier Octagon version of our popular Lever Action'
messages[9]='Great when wearing gloves in cold weather'
messages[10]='Light weight and ideal for young shooters'
messages[11]='Lever Action .22 Magnum'
messages[12]='You do not have to be wealthy to own a beautifully engraved firearm'
messages[13]='No need for a second shot'
messages[14]='Two unique new products'
messages[15]='Now with Henry\'s NEW Ocagonal barrel'
messages[16]='Inspired by the Henry rifle made for President Lincoln'

/********************************************************************************
You don't have to change anything below this
********************************************************************************/

//ChangeText object constructor.

function makeChangeTextObj(obj){
   	this.css = bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;	
   	this.writeref = bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;	
	this.writeIt = b_writeIt;					
}
function b_writeIt(text,num){
	if (bw.ns4){
		this.writeref.write(text)
		this.writeref.close()
	}
    else this.writeref.innerHTML = messages[num]
}

//The mouseover function. Calls the writeIt method to write the text to the div.

function changeText(num){
	if (self.oMessage){
	if(bw.bw) oMessage.writeIt('<span style="font-size:'+msgFontSize+'px; font-family:'+msgFont+'; color:'+msgFontColor+'">'+messages[num]+'</span>', num)
	}
}

//The init function. Calls the object constructor and initiates some properties.

function changeTextInit(){
	
	oMessage = new makeChangeTextObj('divMessage')
	oLinks = new makeChangeTextObj('divLinks')

	if(bw.dom || bw.ie4){
		with(oMessage.writeref.style){fontFamily=msgFont; fontSize=msgFontSize+"px"; color=msgFontColor}
	}
	
	oMessage.css.visibility= "visible"
	oLinks.css.visibility= "visible"
}

//If the browser is ok, the init function is called on pageload. 
if (bw.bw) onload = changeTextInit;