<!--
//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu = function(){return false}

//Other Usefull Stuff ...
function openPlainWindow (url,w,h) {	
	var X = 0;
	var Y = 0;
	if (screen.availWidth) {
		X = (screen.availWidth / 2) - (w / 2) - 5;
		Y = (screen.availHeight / 2) - (h / 2);
	}
	popupWindow = window.open(url, 'popUp', 'left=' + X + 
		'screenX=' + X + 'screenY=' + Y + ',top=' + Y + 
		',toolbar=no, scrollbars=no, resizable=no, directories=no, location=no, status=no' + 
		',height=' + h + ',width=' + w);
	popupWindow.focus();
}

function notEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
        return false;
    else
        return true;
}

function checkForm(f)
//elements named m_ .... are mandatory fields
{	
	var msg="";
	for(var i=0; i<f.elements.length; i++){
		var e = f.elements[i];
		if (e.name.substring(0,2)=='m_' && !e.disabled
			&& ((e.type.substring(0,4)=='text' && e.value=='')
			|| (e.type.substring(0,6)=='select' && e.selectedIndex==0))) {
				if (msg=="") {e.focus();}
				msg += "Please enter " + e.name.substring(2,999).replace(/_/g," ") + "\n";
		}
	}
	if (msg!="") {
		alert(msg);
		return false;
	}
	
	if (notEmail(f.m_email_Address.value)) {
		alert("Please enter a valid email address");
		f.m_email_Address.focus();
		return false;
	}
	return true;
}


