

// Source: CodeFoot.com
// block Javascript errors
//function blockError(){return true;}
//window.onerror = blockError;


// test script loading
// alert("hello")


function emailOK() 
{
var str = trim(document.subscribe.email.value);
var rex = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
    if (!str.match(rex))
	{
        alert("Verify the e-mail address format.");
		document.subscribe.email.focus();
        //setTimeout("focusElement('" + elem.form.name + "', '" + elem.name + "')", 0);
        return false;
    } 
	else 
	{
		document.subscribe.submit();
		alert("Thanks! Your submission has been recieved.");
        return true;
    }
}

function trim(string)
{
var re= /^\s|\s$/g;
return string.replace(re,"");
}
