
function GetInput(id) {
    ind = document.getElementById(id).value;
    return ind;
}

function OnSubm() {

    if( IsSpam() ) {
	  alert("You have included a web address in your message.\nPlease remove it.");
        return;
    }
    
    document.getElementById("theform").setAttribute("action", "http://www.mhc.se/cgi-bin/FormMail.pl");
    document.getElementById('theform').submit();
}

function IsSpam() {

    theq = GetInput("theQ");
    if( theq.match('www') != null ) return true;
    if( theq.match('ringtones') != null ) return true;
    if( theq.match('http') != null ) return true;
    return false;
}

