function open_page(new_url)
{
LeftPosition = (screen.width) ? (screen.width-600)/2 : 0;
TopPosition = (screen.height) ? (screen.height-450)/2 : 0;
settings="status=0,toolbar=0,width=600,height= 450 , top="+TopPosition+", left="+LeftPosition+", scrollbars=yes resizeable=no";
window.open (new_url,"search_result",settings);
}
//*************************************************
function is_valid_login(){
 if(document.login_form.user_name.value !="" && document.login_form.password.value !="" )
  {
   document.login_form.submit();
   return true;
  }
 else
 {
  alert("أكمل البيانات المطلوبة");return false;
 }
}
//----------------------------------------------------------
function confirm_logout(){
	if(window.confirm("هل أنت متأكد "))
      {
       top.location.href="logout.php";
	  }
}
//------------------------------------------------------------
function is_valid_change(){
 if(document.change_account_form.old_user_name.value !="" && document.change_account_form.old_pass.value !=""
 && document.change_account_form.new_user_name.value !="" && document.change_account_form.new_pass.value !=""
 && document.change_account_form.conf_new_pass.value !=""  )
  {
   if(document.change_account_form.new_pass.value == document.change_account_form.conf_new_pass.value)
    {
	 document.change_account_form.submit();
     return true;
    }
    else
	{
	 alert("كلمات المرور غير متوافقة");return false;
	}
  }
 else
 {
  alert("أكمل البيانات المطلوبة");return false;
 }
}
//------------------
function is_valid_require()
  {
	 if (req_form.name.value=="" ||req_form.domain.value=="" ||req_form.email.value=="")
	 {
	 alert(" أكمل البيانات المطلوبة ");
	 return false;
	}
	else
	 {
	    var x = req_form.email.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)==false)
		  {
		   alert('بريدك غير صحيح ');
		  }
	    else
	      {

		       req_form.submit();
		       return true;

	      }
	  }

  }