<!--

function isEmail(string) {
if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
	return true;
else
	return false;
}

function isProper(string) {

   if (!string) return false;
   var iChars = "*|,\"<>[]{}`\';()@&$#%";

   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false;
   }
   return true;
} 
                     
function isReady(form) {
	if (isProper(form.strName.value) == false) {
        alert("Please enter your name.");
        form.strName.focus();
        return false;
    }
    if (isEmail(form.strEmail.value) == false) {
        alert("Please enter a valid email address.");
        form.strEmail.focus();
        return false;
    }
    return true;
}

function isReadyContact(form) {
	if (isProper(form.strName.value) == false) {
        alert("Please enter your name.");
        form.strName.focus();
        return false;
    }
    if (isEmail(form.strEmail.value) == false) {
        alert("Please enter a valid email address.");
        form.strEmail.focus();
        return false;
    }
	if (isProper(form.strNotes.value) == false) {
        alert("Please enter the nature of your enquiry.");
        form.strNotes.focus();
        return false;
    }
    return true;
}

function isReadyLinks(form) {
	if (isProper(form.strName.value) == false) {
        alert("Please enter your name.");
        form.strName.focus();
        return false;
    }
    if (isEmail(form.strEmail.value) == false) {
        alert("Please enter a valid email address.");
        form.strEmail.focus();
        return false;
    }
	if (isProper(form.strTitle.value) == false) {
        alert("Please enter the title of your website.");
        form.strTitle.focus();
        return false;
    }
	if (isProper(form.strNotes.value) == false) {
        alert("Please enter the nature of your enquiry.");
        form.strNotes.focus();
        return false;
    }
	if (isProper(form.strURL.value) == false) {
        alert("Please enter the URL of your website.");
        form.strURL.focus();
        return false;
    }
	if (isProper(form.strLink.value) == false) {
        alert("Please enter the URL where you link to us.");
        form.strLink.focus();
        return false;
    }
    return true;
}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open('popmatch.php?fixture='+URL, 'bettingdirectory', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=460,height=200');");
}
