var links = new Array();
var headerLinks = new Array();
var schedule = new Array();
var scheduleYear = "2009";

//implements
//tractors
//plows
//Dearborn Equipment
//Ford Tractors
//decals
//manuals
//brochures
//tractor maintenance
//tractor restoration
//tractor parts
//farm equipment
//antique farm equipment
//antique tractors
//9N, 2N, 8N, NAA, Jubilee
//tractor literature
//shop manuals
//hood emblems

var news = new Array("Welcome!","&nbsp;","Check out our <a href='schedule.jsp'>schedule</a> for show dates!");

//Wanted
var wanted = new Array();
wanted[0] = new Array("AutomaticLockoutAssembly.jpg","Automatic Lockout Assembly Model 10-31 used with model 10-14 two way plows");
wanted[1] = new Array("1940CarCarrier1.jpg","Semi-trailer to carry 4 cars from the 1940's, similar to the ones in the photos.","1940CarCarrier.jpg");
wanted[2] = new Array("DiscTerracer.jpg","Disc Terracer Model LD-051");




//Display a message
function f_Msg(message){
	var obj = document.getElementById("msg");
	obj.style.visibility = "visible";
	if(navigator.appName == "Microsoft Internet Explorer"){
		obj.innerText = message;
	}else{
		obj.childNodes[0].nodeValue = message;
		obj.style.height = "10px";
		obj.style.textAlign = "center";
	}
	
	setTimeout("f_closeMsg()",1500); 
}
function f_closeMsg(){
	document.getElementById("msg").style.visibility = "hidden";
}

//Display disclaimer
function f_disclaimer(){
	alert(disclaimer2);
}

//Open survey window
function f_OpenSurvey(){
	window.open("survey.html","survey","width=550,height=500,menubar=no,scrollbars=yes,toolbar=no");
}

//Random file method
function f_RandomPic(){
	document.ranPic.src = picArray[Math.floor(Math.random()*2)];
}

//Change the background of main top links
function f_Change(element){
	//document.getElementById(element).style.backgroundColor = "#bfbab4";
	document.getElementById(element).style.borderColor = "#a5271b";
}
function f_ChangeBack(element){
	//document.getElementById(element).style.backgroundColor = "#ffffff"
	document.getElementById(element).style.borderColor = "white";
}

function f_ShowPicture(element){
	document.getElementById(element).style.visibility = "visible";
}

function f_HidePicture(element){
	document.getElementById(element).style.visibility = "hidden";
}

function f_OpenPictureWindow(spic,sdesc){
	newwindow2=window.open('','name','height=600,width=700,menubar=no,scrollbars=yes,toolbar=no');
	var tmp = newwindow2.document;
	tmp.write('<html><head><title>' + sdesc + '</title>');
	tmp.write('<link rel="stylesheet" href="gbt.css">');
	tmp.write('</head><body>');
	tmp.write('<p align="right"><a href="javascript:window.close();" style="color:black;font-weight:800;">CLOSE</a></p>');	
	tmp.write('<p align="center"><img src="' + spic + '"></p>');	
	tmp.write('</body></html>');
	tmp.close();
}

function f_ShowInstructions(){
	alert("On product pages, click on pictures to see larger image, click image again to return to thumbnail.\n\nIf an image is missing, click on your browser's refresh button or 'F5' on your keyboard.");
}	

function submitSearch(){
	var sCrt = document.forms[0].search.value;
	if(sCrt != null && sCrt != ""){
		window.location = "searchProducts.jsp?criteria=" + sCrt;
	}		
}
