function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

////////////////////////////////////////
// Pop new window.. 
////////////////////////////////////////
function popNewWindow(sLink,sName,iHeight,iWidth) {
	iWindowX = iWidth;
	iWindowY = iHeight;
	iScreenWidth = parseInt((screen.availWidth / 2) - (iWindowX / 2));
	iScreenHeight = parseInt((screen.availHeight / 2) - (iWindowY / 2))
	newW = window.open(sLink, sName, "width=" + iWindowX + ",height=    "+iWindowY+",left="+iScreenWidth+",top="+iScreenHeight+"status=no,scrollbars,resizable=yes,menubar=no");
	newW.focus();
}

////////////////////////////////////////
// Don't submit an empty search 
////////////////////////////////////////
function validateSearch(){
	if (document.frmSearch.searchStr.value ==''){
		alert('Please enter something to search for. Usually one or two keywords.');
		return false;
	}
}

////////////////////////////////////////
// reloads the window if Nav4 resized
////////////////////////////////////////
function MM_reloadPage(init) {  //
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

////////////////////////////////////////
// Checks contact us form
////////////////////////////////////////
function frmCheckContact(){
	var email = document.frmContact.email;
	var phone = document.frmContact.phone;
	var senderName = document.frmContact.senderName;
	if (senderName.value == ''){
		alert("Please enter a name you like to be known by");
		senderName.focus();
		return false;
	}
	if (email.value == ''){
		alert("Please enter your email address");
		email.focus();
		return false;
	}
	if (phone.value == ''){
		alert("Please enter your phone number");
		phone.focus();
		return false;
	}
}

////////////////////////////////////////
// random image picker
////////////////////////////////////////
var image = "../images/banners/";
var imgMap = new Array();
imgMap[1] = "arnotts.jpg";
imgMap[2] = "2.jpg";
imgMap[3] = "3.jpg";
imgMap[4] = "4.jpg";
imgMap[5] = "5.jpg";
var captions = new Array();
captions[1] = "Arnotts";
captions[2] = "";
captions[3] = "";
captions[4] = "";
captions[5] = "";
var rand = 1;
function pickImage() {
  rand = (new Date).getTime() / 1000;
  rand = Math.floor(((rand - Math.floor(rand)) * (captions.length-1)) + 1);
  image += imgMap[rand]+""
}
