x = (800 - 700)/2, y = (600 - 450)/2;
if (screen) {
	y = (screen.availHeight - 450)/2;
	x = (screen.availWidth - 700)/2;
}
function popup(url,id) 
{
	window.open(url,id,'width=700,height=450,resizable=yes,scrollbars=yes,left='+x+',top='+y+',screenX='+x+',screenY='+y+',status=yes'); 
} 

function alterNate(elm){
	if (!elm.base) elm.base = elm.value
	if (elm.value == elm.base) elm.value = "";
	else if (elm.value == "") elm.value = elm.base;
}

if (screen) {
	y = (screen.availHeight - 430)/2;
	x = (screen.availWidth - 500)/2;
}
function PictureGallery(id, name, title, type) {
	galleryopen = window.open("../PictureGallery.php?HorseID="+id+"&HorseName="+name+"&HorseTitle="+title+"&HorseType="+type, "galleryopen", "height=430,resizable=yes,width=500,scrollbars=yes,top="+y+",left="+x+',screenX='+x+',screenY='+y+',status=yes');
}


if (screen) {
	y = (screen.availHeight - 430)/2;
	x = (screen.availWidth - 500)/2;
}
function VideoGallery(id, name, title, fle) {
	videoopen = window.open("HorseVideo.php?HorseID="+id+"&HorseName="+name+"&HorseTitle="+title+"&Fle="+fle, "videoopen", "height=430,resize=0,width=500,scrollbars=yes,top="+y+",left="+x+',screenX='+x+',screenY='+y+',status=yes');
}

function validate() {
	var frm = document.frmcontact;
	if(frm.txtName.value=="") {
		alert("Please enter the Name");
		frm.txtName.focus();
	} else if(frm.txtAddress1.value=="") {
		alert("Please enter the Address 1");
		frm.txtAddress1.focus();
	} else if(frm.txtCity.value=="") {
		alert("Please enter the City");
		frm.txtCity.focus();
	} else if(frm.txtState.value=="") {
		alert("Please enter the State");
		frm.txtState.focus();
	} else if(frm.txtZip.value=="") {
		alert("Please enter the Zip");
		frm.txtZip.focus();
	} else if(frm.txtEmail.value=="") {
		alert("Please enter the Email Address");
		frm.txtEmail.focus();
	} else if(frm.txtInfoRequest.value=="") {
		alert("Please enter the Information Requested");
		frm.txtInfoRequest.focus();
	} else {
		frm.hfsub.value="sendmail";
		frm.submit();
	}
}