<!--
// Reloads the window if Nav4 resized
function MM_reloadPage(init) {
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// Variables
var emptySearch		= "خطأ:\nالرجاء كتابة كلمة للبحث في الموقع.";
var emptyMList		= "خطأ:\nالرجاء كتابة عنوان البريد الإلكتروني.";
var wrongEmail		= "خطأ:\nالرجاء تصحيح عنوان البريد الإلكتروني.";

// Functions
function doClear(theText) {
    if (theText.value == theText.defaultValue) {
        theText.value = ""
    }
}
function unClear(theText) {
    if (theText.value == "") {
        theText.value = theText.defaultValue
    }
}
function warnEmpty (theField, s)
{   theField.focus();
    alert(s);
    return false;
}

function Validate(searchSTR){
	if (searchSTR.value == "" || searchSTR.value == searchSTR.defaultValue) {
		warnEmpty(searchSTR, emptySearch);
	    return false;
	}
}

function mValidate(emailSTR) {
	if (emailSTR.value == "" || emailSTR.value == emailSTR.defaultValue) {
		warnEmpty(emailSTR, emptyMList);
	    return false;
	}
	// /^+([\.-]?+)*@+([\.-]?+)*(\.\{2,3})+$/
	if (/^(.+)@(.+)$/.test(emailSTR.value)) {
		return (true);
	}
	warnEmpty(emailSTR, wrongEmail);
	return (false);
}

// -->