var testresults
function checkemail(){
var str=document.fq.fq_mail.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
testresults=true
else{
alert("Correct Your E-mail Address")
document.fq.fq_mail.focus()
testresults=false
}
return (testresults)
}
//
function checktell()
     {
	 if(document.fq.fq_name.value=="")
	 {
	  alert (" الرجاء ادخال الاسم  ");
	  document.fq.fq_name.focus()
	  return false;
	 }
	 if(document.fq.fq_country.value==-1)
	 {
	  alert (" الرجاء اختيار الجنسية");
	  document.fq.fq_country.focus()
	  return false;
	 }
	 if(document.fq.fq_mail.value=='')
	 {
	  alert (" الرجاء ادخال البريد الالكتروني");
	  document.fq.fq_mail.focus()
	  return false;
	 }
	 
	 if(document.fq.fq_phon.value=="")
	 {
	  alert (" الرجاء ادخال رقم هاتف للتواصل");
	  document.fq.fq_phon.focus()
	  return false;
	 }
	 
	 if(document.fq.fq_kind.value==-1)
	 {
	  alert (" الرجاء اختيار فئة الموضوع ");
	  document.fq.fq_kind.focus()
	  return false;
	 }
	 
	 
	 if(document.fq.fq_title.value=="")
	 {
	  alert (" الرجاء ادخال عنوان الموضوع ");
	  document.fq.fq_title.focus()
	  return false;
	 }
	 if(document.fq.fq_text.value=="")
	 {
	  alert (" الرجاء ادخال تفاصيل الموضوع ");
	  document.fq.fq_text.focus()
	  return false;
	 }
	 fq.action.value='send';
	 fq.submit();
	 }
	 
//	 
	 function CheckContactUs()
     {
	 if(document.ContactUs.contact_name.value=="")
	 {
	  alert (" الرجاء ادخال الاسم  ");
	  document.ContactUs.contact_name.focus()
	  return false;
	 }
	
	 if(document.ContactUs.contact_mail.value=='')
	 {
	  alert (" الرجاء ادخال البريد الالكتروني");
	  document.ContactUs.contact_mail.focus()
	  return false;
	 }
	 if(document.ContactUs.contact_phone.value=="")
	 {
	  alert (" الرجاء ادخال رقم هاتف للتواصل");
	  document.ContactUs.contact_phone.focus()
	  return false;
	 }
	 if(document.ContactUs.contact_detail.value=="")
	 {
	  alert (" الرجاء ادخال تفاصيل الموضوع ");
	  document.ContactUs.contact_detail.focus()
	  return false;
	 }
	 ContactUs.Action.value='SendContact';
	 ContactUs.submit();
	 }
	 
// 
var testresults
function checkemailvote(){
var str=document.registration.email_vote.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
testresults=true
else{
alert("Correct Your E-mail Address")
document.registration.email_vote.focus()
testresults=false
}
return (testresults)
}

/////////////////////////////check text//////////////////////
function checkreg()
     {
	 if(document.registration.name_vote.value=="")
	 {
	  alert ("Please Enter Name");
	  document.registration.name_vote.focus()
	  return false;
	 }
	 if(document.registration.email_vote.value=='')
	 {
	  alert ("Please Enter E-mail");
	  document.registration.email_vote.focus()
	  return false;
	 }
	
	 if(document.registration.phon_vote.value=="")
	 {
	  alert ("Please Enter Phon");
	  document.registration.phon_vote.focus()
	  return false;
	 }
	 
	 if(document.registration.time_vote.value=="")
	 {
	  alert ("Please Enter Time");
	  document.registration.time_vote.focus()
	  return false;
	 }
	 registration.action.value='send';
	 registration.submit();
	 }

function radio_checker()
{
var radio_choice = false;
for (counter = 0; counter < refval.chvote.length; counter++)
{
if (refval.chvote[counter].checked) radio_choice = true; 
}
//-------------
if (!radio_choice)
{
alert("الرجاء اختيار التصويت")
return false;
}
//-------------
refval.Action.value='addvoteall';refval.submit();
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


