<!-- hide from old browsers

var days = new Array();
days[0] = "Sunday";
days[1] = "Monday";
days[2] = "Tuesday";
days[3] = "Wednesday";
days[4] = "Thursday";
days[5] = "Friday";
days[6] = "Saturday";

var months = new Array();
months[0] = "January";
months[1] = "February";
months[2] = "March";
months[3] = "April";
months[4] = "May";
months[5] = "June";
months[6] = "July";
months[7] = "August";
months[8] = "September";
months[9] = "October";
months[10] = "November";
months[11] = "December";


function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 	} 
} 

try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}

window.onload = externalLinks;


function checkEmail(strng) {
	var error = "";
	var emailFilter=/^.+@.+\..{2,6}$/;
	if (!(emailFilter.test(strng))) {
		return false;
	}
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\] ']/
	if (strng.match(illegalChars)) {
		return false;
	}
	return true;
}

function formVal(thefields,emailfields) {
	thereturn = true;
	if (thefields!='') {
		fparts = thefields.split(",");
		for (i = 0; i < fparts.length; i++) {
			if (document.getElementById(fparts[i]).value=='') {
				document.getElementById(fparts[i]).style.background='#ff0000';
				thereturn = false;
			}else{
				document.getElementById(fparts[i]).style.background='#ffffff';
			}
		}
	}
	if (emailfields!='') {
		fparts = emailfields.split(",");
		for (i = 0; i < fparts.length; i++) {
			if (!checkEmail(document.getElementById(fparts[i]).value)) {
				document.getElementById(fparts[i]).style.background='#ff0000';
				thereturn = false;
			}else{
				document.getElementById(fparts[i]).style.background='#ffffff';
			}
		}
	}
	
	if (thereturn==false) { alert('You must complete all required fields'); }
	return thereturn;
}

function loadLot(lotno,row) {
	if (lotno !='') {
		var xmlhttp = false;
		/*@cc_on @*/
		/*@if (@_jscript_version >= 5)
		// JScript gives us Conditional compilation, we can cope with old IE versions.
		// and security blocked creation of the objects.
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				xmlhttp = false;
			}
		}
		@end @*/

		if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
			xmlhttp = new XMLHttpRequest();
		}

		var returnText;
		uri = "loadLot.asp?lotno=" + escape(lotno) + "&row=" + escape(row) + "&d=" + new Date().getTime();
		xmlhttp.open("GET", uri ,true);
		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) {
				returnText = xmlhttp.responseText;

				if (returnText == "EOF") {
				} else {
					newText = returnText;
					eval(returnText);
				}
			}
		}
		xmlhttp.send(null);
	}
}

// - end hiding -->