///// ALLOWS PNGS IN IE4+

if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
	document.writeln('<style type="text/css">img { visibility:hidden; } </style>');
	window.attachEvent("onload", fnLoadPngs);
}

function fnLoadPngs() {
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
		if (itsAllGood && img.src.match(/\.png$/i) != null) {
			var src = img.src;
			img.style.width = img.width + "px";
			img.style.height = img.height + "px";
			img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
			img.src = "/shared/spacer.gif";
		}
		img.style.visibility = "visible";
	}
	///// ANY PNGS USED AS ROLLOVERS MUST BE DONE MANUALLY HERE


}

function redirect(newPage){
	window.location = newPage;
}


function jumpTo(newPage){
	window.location = "/" + newPage + "/";
}

//validation for forms
function validate(){
    for(var i=0; i < fields.length; i++){
        /// Validate the form elements
        element = document.getElementById(fields[i][0]);
        
        if(element.value == ''){
            alert("I am sorry, but you must enter " + fields[i][1]);
            element.focus();
            return false;
        }
    }
    return true;    
}


function openWindow(page,name,width,height){
    window.open(page,name,'width='+width+',height='+height+',top=100,left=100,scrollbars=yes,status=false,resizable=1');
}