<!--


//dropdowns

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("topnav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

window.onload = function () {
	startList;
	Preload.run ();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_closeBrWindow(theURL,winName) 
		{window.close(theURL,winName);
}

// '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

function layerSetup(id,visibility){
if(document.getElementById){
this.obj = document.getElementById(id).style;
this.obj.visibility = visibility;
return this.obj;}
else if(document.all){
this.obj = document.all[id].style;
this.obj.visibility = visibility;
return this.obj;}
else if(document.layers){
this.obj = document.layers[id];
this.obj.visibility = visibility;
return this.obj;}
}
function visVisible(param){
new layerSetup(param,'visible');
}

function visHidden(param){
new layerSetup(param,'hidden');
}
// '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
// Preload Object

Preload = new Object ();
Preload.images = new Array ();

Preload.add = function (src) {
	this.images[this.images.length] = src;
}
Preload.run = function () {
	if (!document.createElement) return;
	var holder, img;
	holder = document.createElement ("div");
	document.body.appendChild (holder);
	with (holder) {
		with (style) {
			position = "absolute";
			left = "0px";
			top = "0px";
			visibility = "hidden";
		}
	}
	for (var i = 0; i < this.images.length; i++) {
		img = document.createElement ("img");
		img.setAttribute ("src", this.images[i]);
		holder.appendChild (img);
	}
}

// '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
// Swap Class

Swap = function (name) {
	this.name = name;
	this.images = new Object ();
	this.restoresrc = null;
}
Swap.prototype.add = function (state, src) {
	this.images[state] = new Image ();
	this.images[state].src = src;
	Preload.add (src);
}
Swap.prototype.swap = function (state) {
	var img = document.images[this.name];
	this.restoresrc = img.src;
	img.src = this.images[state].src;
}
Swap.prototype.restore = function () {
	if (this.restoresrc) {
		document.images[this.name].src = this.restoresrc;
		this.restoresrc = null;
	}
}

// '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
// Preload

img1 = new Swap ("home");
img1.add ("over", "images/nav/home_on.gif");

img2 = new Swap ("products");
img2.add ("over", "images/nav/products_on.gif");

img3 = new Swap ("support");
img3.add ("over", "images/nav/support_on.gif");

img4 = new Swap ("dealer");
img4.add ("over", "images/nav/dealer_on.gif");

img5 = new Swap ("about");
img5.add ("over", "images/nav/about_on.gif");

img6 = new Swap ("info");
img6.add ("over", "images/nav/info_on.gif");

img7 = new Swap ("turn");
img7.add ("over", "images/catnav/turn_on.gif");

img8 = new Swap ("rv");
img8.add ("over", "images/catnav/rv_on.gif");

img9 = new Swap ("tow");
img9.add ("over", "images/catnav/tow_on.gif");

img10 = new Swap ("beds");
img10.add ("over", "images/catnav/custom_on.gif");

// '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
// Random Images

imgswap = new Array('images/rotate/head_photo1.jpg','images/rotate/head_photo2.jpg','images/rotate/head_photo3.jpg','images/rotate/head_photo4.jpg','images/rotate/head_photo5.jpg','images/rotate/head_photo6.jpg','images/rotate/head_photo7.jpg','images/rotate/head_photo8.jpg'); 

rnd.today=new Date(); 
rnd.seed=rnd.today.getTime(); 

function rnd() { 
rnd.seed = (rnd.seed*9301+49297) % 233280; 
return rnd.seed/(233280.0); 
}; 

function rand(number) { 
return Math.ceil(rnd()*number); 
}; 

-->