function newWindow(map) {
		mapWindow = window.open(map, "mapWin", "width=500,height=500")
		mapWindow.focus()
	}

 function chan()
{
 eval("window.location='index.php?page=tasamem&price="+document.all.price.options[document.all.price.selectedIndex].value+"'");
}

function changed()
{
 eval("window.location='index.php?page=temp&price="+document.all.price.options[document.all.price.selectedIndex].value+"'");
}

function checkupdateindex()
{
    if(document.all.namu.value=="" || document.all.namu.value==" " )
           {
            alert("عليك تحديد اسمك")
			document.all.namu.focus();
			document.all.namu.select();
			return false;
           }
     if(document.all.namo.value=="" || document.all.namo.value==" " )
           {
            alert("فضلا حدد اسم المستخدم")
			document.all.namo.focus();
			document.all.namo.select();
			return false;
           }
    if(document.all.pass.value=="" || document.all.pass.value==" " )
           {
            alert("فضلا حدد كلمة مرورك")
			document.all.pass.focus();
			document.all.pass.select();
			return false;
           }
    if(document.all.email.value=="" || document.all.email.value==" " )
           {
            alert("فضلا حدد بريدك الإلكتروني")
			document.all.email.focus();
			document.all.email.select();
			return false;
      }

      str=document.all.namu.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في اسمك الشخصي")
			document.all.namu.focus();
			document.all.namu.select();
			return false;
            }
          }

          str=document.all.namo.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في اسم المستخدم")
			document.all.namo.focus();
			document.all.namo.select();
			return false;
            }
          }

          str=document.all.pass.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في كلمة المرور")
			document.all.pass.focus();
			document.all.pass.select();
			return false;
            }
          }



      re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/

			if (re.test(document.all.email.value))
            {
                var go=1
			}
            else
            {
			alert("بريد الكتروني غير مقبول")
			document.all.email.focus()
			document.all.email.select()
			return false
           }



           return true
 	}

   function checkcat(dd)
  {
    if(document.all.new_name.value=="" || document.all.new_name.value==" " )
           {
            alert("فضلا حدد اسم القسم")
			document.all.new_name.focus();
			document.all.new_name.select();
			return false;
           }
      if(dd==1)
      {
     if(document.all.photo1.value=="" || document.all.photo1.value==" " )
           {
            alert("فضلا حدد صورة 1 للقسم")
			document.all.photo1.focus();
			document.all.photo1.select();
			return false;
           }
    if(document.all.photo2.value=="" || document.all.photo2.value==" " )
           {
            alert("فضلا حدد صورة 2 للقسم")
			document.all.photo2.focus();
			document.all.photo2.select();
			return false;
           }
      }
    if(document.all.details.value=="" || document.all.details.value==" " )
           {
            alert("فضلا حدد التفاصيل")
			document.all.details.focus();
			document.all.details.select();
			return false;
      }

      str=document.all.new_name.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في اسم القسم")
			document.all.new_name.focus();
			document.all.new_name.select();
			return false;
            }
          }
      if(dd==1 || document.all.photo1.value!="")
      {    str=document.all.photo1.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في الصورة 1 حاول مرة اخرى")
			document.all.photo1.focus();
			document.all.photo1.select();
			return false;
            }
          }
      }
      if(dd==1 || document.all.photo2.value!="")
      {
          str=document.all.photo2.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في الصورة 2 حاول مرة اخرى")
			document.all.photo2.focus();
			document.all.photo2.select();
			return false;
            }
          }
       }
          str=document.all.details.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في التفاصيل حاول مرة اخرى")
			document.all.details.focus();
			document.all.details.select();
			return false;
            }
          }
          return true
 }



 function checktemp(mm,dd)
 {

 if(document.all.name.value=="" || document.all.name.value==" " )
           {
            alert("حدد اسم التصميم")
			document.all.name.focus();
			document.all.name.select();
			return false;
           }
    if(dd==1)
    {
     if(document.all.photo1.value=="" || document.all.photo1.value==" " )
           {
            alert("فضلا حدد صورة 1 للقسم")
			document.all.photo1.focus();
			document.all.photo1.select();
			return false;
           }
    if(document.all.photo2.value=="" || document.all.photo2.value==" " )
           {
            alert("فضلا حدد صورة 2 للقسم")
			document.all.photo2.focus();
			document.all.photo2.select();
			return false;
           }
    }
    if(document.all.download1.value=="" || document.all.download1.value==" " )
           {
             if(mm==1)
            alert("فضلا حدد السعر")
             else
            alert("فضلا حدد رابط التحميل")
			document.all.download1.focus();
			document.all.download1.select();
			return false;
      }
    if(document.all.details.value=="" || document.all.details.value==" " )
           {
            alert("فضلا حدد التفاصيل")
			document.all.details.focus();
			document.all.details.select();
			return false;
      }

      if(document.all.morein.value=="" || document.all.morein.value==" " )
           {
            alert("فضلا حدد الشرح الإضافي")
			document.all.morein.focus();
			document.all.morein.select();
			return false;
      }

      str=document.all.name.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في اسم التصميم")
			document.all.name.focus();
			document.all.name.select();
			return false;
            }
          }

          str=document.all.download1.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

             if(mm==1)
            alert("خطاء في السعر حاول مرة اخرى")
             else
            alert("خطاء في رابط التحميل حاول مره اخرى")
			document.all.download1.focus();
			document.all.download1.select();
			return false;
            }
          }
         if(dd==1 || document.all.photo1.value!="")
         {
          str=document.all.photo1.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في الصورة 1 حاول مرة اخرى")
			document.all.photo1.focus();
			document.all.photo1.select();
			return false;
            }
          }
        }
        if(dd==1 || document.all.photo2.value!="")
        {
          str=document.all.photo2.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في الصورة 2 حاول مرة اخرى")
			document.all.photo2.focus();
			document.all.photo2.select();
			return false;
            }
          }
       }
          str=document.all.details.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في التفاصيل حاول مرة اخرى")
			document.all.details.focus();
			document.all.details.select();
			return false;
            }
          }

          str=document.all.morein.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في الشرح الإضافي حاول مره اخرى")
			document.all.morein.focus();
			document.all.morein.select();
			return false;
            }
          }
          return true

 }

 function checktell()
 {
        if(document.all.fname.value=="" || document.all.fname.value==" " )
           {
            alert("عليك تحديد اسمك")
			document.all.fname.focus();
			document.all.fname.select();
			return false;
           }
            if(document.all.femail.value=="" || document.all.femail.value==" " )
           {
            alert("فضلا حدد بريدك الإلكتروني")
			document.all.femail.focus();
			document.all.femail.select();
			return false;
      }
       re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/

			if (re.test(document.all.femail.value))
            {
                var go=1
			}
            else
            {
			alert("بريد الكتروني غير مقبول")
			document.all.femail.focus()
			document.all.femail.select()
			return false
           }
           return true

 }

 function checkorder()
 {
     if(document.all.teleno.value=="" || document.all.teleno.value==" " )
           {
            alert("فضلا حدد رقم تلفونك")
			document.all.teleno.focus();
			document.all.teleno.select();
			return false;
           }
     if(document.all.town.value=="" || document.all.town.value==" " )
           {
            alert("فضلا حدد بلدك")
			document.all.town.focus();
			document.all.town.select();
			return false;
           }
     str=document.all.teleno.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في رقم التلفون")
			document.all.teleno.focus();
			document.all.teleno.select();
			return false;
            }
          }
       str=document.all.town.value
          len=str.length;
          for(i=0;i<len;i++)
          {
            if(str.charAt(i)=="'" || str.charAt(i)==";" || str.charAt(i)=='"' ||str.charAt(i)=="-" || str.charAt(i)=="+" || str.charAt(i)=="!" || str.charAt(i)=="@" || str.charAt(i)=="#" ||str.charAt(i)=="$"|| str.charAt(i)=="%" ||str.charAt(i)=="^" ||str.charAt(i)=="&"|| str.charAt(i)=="*"|| str.charAt(i)=="?"|| str.charAt(i)=="," )
            {

               alert("خطاء في اسم بلدك")
			document.all.town.focus();
			document.all.town.select();
			return false;
            }
          }
}
