// JavaScript Document
  function submitMiniSearch() {
    document.miniSearch.submit()
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=600,height=500');");
}

function popUpMap(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1000,height=600');");
}

function RemoveContent(d) {
document.getElementById(d).style.display = "none";
}
function InsertContent(d) {
document.getElementById(d).style.display = "";
}

function Validate() {
    var failed = false;
    var message = "You must enter the following before the form can be processed \n\n";
    if (document.forum.name.value == "") {
        if (!failed){ firstfocus = document.forum.name;}
        failed = true;
        message += "Site Location \n";
    }
    if (document.forum.address.value == "") {
        if (!failed){ firstfocus = document.forum.address;}
        failed = true;
        message += "Firstname \n";
    }
	if (document.forum.email.value == "") {
        if (!failed){ firstfocus = document.forum.email;}
        failed = true;
        message += "Surname \n";
    }
    if (document.forum.postCopy.value == "") {
        if (!failed){ firstfocus = document.forum.postCopy;}
        failed = true;
        message += "Email \n";
    }
   // stick some form field validation in here
    if (failed){
        alert(message);
        firstfocus.focus();
        return false;
    }    
    return true;
} 


function valEmail() {
	if (document.advSearch.eUpdate.checked == true){
    var failed = false;
    var message = "You must enter the following before the form can be processed \n\n";
    if (document.advSearch.uFname.value == "") {
        if (!failed){ firstfocus = document.advSearch.uFname;}
        failed = true;
        message += "Firstname\n";
    }
    if (document.advSearch.uSname.value == "") {
        if (!failed){ firstfocus = document.advSearch.uSname;}
        failed = true;
        message += "Surname \n";
    }
	if (document.advSearch.uEmail.value == "") {
        if (!failed){ firstfocus = document.advSearch.uEmail;}
        failed = true;
        message += "Valid Email Address \n";
    }
	if (document.advSearch.ppolicy.checked == false){
		if (!falied){ firstfocus = document.advSearch.ppolicy;}
		failed = true;
		message += "You must agree with the privacy policy \n";
	}
   // stick some form field validation in here
    if (failed){
        alert(message);
        firstfocus.focus();
        return false;
    } return true;
}
    } 