/* The script below adds mouseover behavior to all images in the <ul id="mouseovers">. Run init() onload and it works */

var W3CDOM = (document.createElement && document.getElementsByTagName);

var mouseOvers = new Array();
var mouseOuts = new Array();

window.onload = init;

function init()
{
	if (!W3CDOM) return;
	var nav = document.getElementById('mouseovers');
	var imgs = nav.getElementsByTagName('img');
	for (var i=0;i<imgs.length;i++)
	{
		if ((imgs[i].src.indexOf('_over') == -1) && (imgs[i].src.indexOf('blank_nav') == -1)){
			imgs[i].onmouseover = mouseGoesOver;
			imgs[i].onmouseout = mouseGoesOut;
			var suffix = imgs[i].src.substring(imgs[i].src.lastIndexOf('.'));
			mouseOuts[i] = new Image();
			mouseOuts[i].src = imgs[i].src;
			mouseOvers[i] = new Image();
			mouseOvers[i].src = imgs[i].src.substring(0,imgs[i].src.lastIndexOf('.')) + "_over" + suffix;
			imgs[i].number = i;
		}
	}
}

function mouseGoesOver()
{
	this.src = mouseOvers[this.number].src;
}

function mouseGoesOut()
{
	this.src = mouseOuts[this.number].src;
}

//open new window help page
function formsHelpPage() {
	window.open('help.do','thewindow','resizable,scrollbars,width=450,height=450,top=200,left=200,right=200');
}	


// Disable AutoComplete in all form fields for security.
function disableAutoComplete(){
	if(document.forms.length > 0){
		for (i=0; i < document.forms.length; i++) {
			document.forms[i].setAttribute("autocomplete","off");
		}
	}
	return true;
}

