function opinion_valid(){

	var user_name = op_form.user_name.value.length;
	if(user_name == 0){
		alert("الرجاء، قم بادخال اسمك");
		op_form.user_name.focus();
		return false;
	}
	
	var user_name = op_form.user_name.value;
	if(!CheckArabic_Not_English(user_name)){
		alert("الرجاء، قم بادخال اسمك بدون أحرف انجليزية");
		op_form.user_name.focus();
		return false;
	}	
	
	if(notValidEmail(op_form.user_email)){
		alert("الرجاء، قم بادخال بريدك الالكتروني بالشكل الصحيح");
		op_form.user_email.focus();
		return false;
	}
	
	var op_title = op_form.op_title.value.length;
	if(op_title == 0){
		alert("الرجاء، قم بادخال عنوان التعليق");
		op_form.op_title.focus();
		return false;
	}
	
	var op_title = op_form.op_title.value;
	if(!CheckArabic_Not_English(op_title)){
		alert("الرجاء، قم بادخال عنوان التعليق بدون أحرف انجليزية");
		op_form.op_title.focus();
		return false;
	}	
	
	var op_details = op_form.op_details.value.length;
	if(op_details == 0){
		alert("الرجاء، قم بادخال التعليق");
		op_form.op_details.focus();
		return false;
	}
	
	var op_details = op_form.op_details.value;
	if(!CheckArabic_Not_English(op_details)){
		alert("الرجاء، قم بادخال نص التعليق بدون أحرف انجليزية أو رموز خاصة");
		op_form.op_details.focus();
		return false;
	}	
	
	return true;
}

//-----------------------------------------------------------------------------------------

function getMail(){

	var sending_name = send_mail_form.sending_name.value;
	if(!CheckArabic_Not_English(sending_name)){
		alert("الرجاء، قم بادخال اسم المرسل بدون أحرف انجليزية");
		send_mail_form.sending_name.focus();
		return false;
	}	
	
	if(notValidEmail(send_mail_form.sending_email)){
		alert("الرجاء، قم بادخال البريد الالكتروني الخاص بك بالشكل الصحيح");
		send_mail_form.sending_email.focus();
		return false;
	}	
	
	var recive_name = send_mail_form.recive_name.value;
	if(!CheckArabic_Not_English(recive_name)){
		alert("الرجاء، قم بادخال اسم المرسل اليه بدون أحرف انجليزية");
		send_mail_form.recive_name.focus();
		return false;
	}	
	
	if(notValidEmail(send_mail_form.recive_email)){
		alert("الرجاء، قم بادخال البريد الالكتروني الخاص بالمرسل اليه");
		send_mail_form.recive_email.focus();
		return false;
	}

}

//-----------------------------------------------------------------------------------------

function toggleInstructions(div_area) {
	Istate='none';
	document.getElementById(div_area).style.display=Istate;
}

function toggleInstructionsOn(div_area) {
	Istate = document.getElementById(div_area).style.display;
    if (Istate=='none') {
    	Istate='block';
    }else {
        Istate='none';
    }
   document.getElementById(div_area).style.display=Istate;
} 

//---------------------------------------------------------------------------------------

function valid() {         
	var str = "";
	var userName = login.user_id.value;
	var password = login.pass.value;
	
	if(!((CheckAdminName(userName)) || (CheckSpace(userName)))){
		str =" الرجاء، ادخال اسم المستخدم بدون فراغات أو رموز خاصة ";
		alert(str);
		login.user_id.focus();
		return false;
	}
	
	if(!((CheckPass(password)) || (CheckSpace(password)))){
		str =" الرجاء، ادخال كلمة السر بدون فراغات أو رموز خاصة ";
		alert(str);
		login.pass.focus();
		return false;
	}
	
	return true;
}

//----------------------------------------------------------------------------------------

function redirect_city() {
	city_url = red_city.D1.value;
	window.location = city_url;
}

//----------------------------------------------------------------------------------------

function CopyCode(){
   textRange = document.msgshow.msgs.select()
   textRange = document.msgshow.msgs.focus();
   textRange = document.msgshow.msgs.createTextRange();
   textRange.execCommand("RemoveFormat");
   textRange.execCommand("Copy");
   alert("تم نسخ وحفظ الرابط في لوحة المفاتيح");
}

function Copyurl(){
   textRange = document.weburl.url.select()
   textRange = document.weburl.url.focus();
   textRange = document.weburl.url.createTextRange();
   textRange.execCommand("RemoveFormat");
   textRange.execCommand("Copy");
   alert("تم نسخ وحفظ الرابط في لوحة المفاتيح");
}

//-----------------------------------------------------------------------------------------

function valid_send_friend(){

	var sending_name = send_mail_form.sending_name.value.length;
	if(sending_name == 0){
		alert("الرجاء، قم بادخال اسم المرسل");
		send_mail_form.sending_name.focus();
		return false;
	}	
	
	if(notValidEmail(send_mail_form.recive_email)){
		alert("الرجاء، قم بادخال البريد الالكتروني الخاص بالمرسل اليه");
		send_mail_form.recive_email.focus();
		return false;
	}	
}





