﻿
function chk_user(v){
if(frm.majhol.checked){
frm.namee.disabled="true";
frm.emaill.disabled="true";
return;
}
else{
frm.namee.disabled="";
frm.emaill.disabled="";
return;
}

}
///////////////////////////////////////////////////////////////////////////////
function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}


//////////////////////////////////////////////////////////////////////////////////////////////////
  function checkramz_art()
  {

	var emailID=document.frm.txtmail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.focus()
		return false
	}

 if(frm.txtname.value!="" && frm.txtmail.value!="" && frm.compony.value!=""){
   hid=document.frm.hidcode;
    if((document.getElementById('txtramz').name)===(document.getElementById('txtramz').value))
  {  hid.value="0"; document.frm.submit();  }
  else  {  alert(".الرجاء ادخل الكود بدقة");  hid.value="1";  }
  }//end if poor bodane text ha
  else{
   alert(". إملاء الخانات المهمة (*)");
  }
  
}//end fun
  
<!--*****************************************************************************/-->  
  function checkramz()
  {
	var emailID=document.frm.txtmail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.focus()
		return false
	}

if(frm.txtname.value!="" && frm.txtmail.value!="" && frm.editor1.value!=""){
   hid=document.frm.hidcode;
    if((document.getElementById('txtramz').name)===(document.getElementById('txtramz').value))
  {  hid.value="0"; document.frm.submit();  }
  else  {  alert(".الرجاء ادخل الكود بدقة");  hid.value="1";  }
  }//end if poor bodane text ha
  else{
   alert(". إملاء الخانات المهمة (*)");
  }

}//end fun

<!--*****************************************************************************/--> 

function checkramznazar()
{
if(frm.majhol.checked!=""){
 hid=document.frm.hidcode;
    if((document.getElementById('txtramz').name)===(document.getElementById('txtramz').value))
  {  hid.value="0"; document.frm.submit();  }
  else  {  alert(".الرجاء ادخل الكود بدقة");  hid.value="1";  }
 }//end if inke bayad mail ro bezanad
//////////////////////////////////////  
else{//else if aval


	var emailID=document.frm.emaill
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.focus()
		return false
	}

hid=document.frm.hidcode;
    if((document.getElementById('txtramz').name)===(document.getElementById('txtramz').value))
  {  hid.value="0"; document.frm.submit();  }
  else  {  alert(".الرجاء ادخل الكود بدقة");  hid.value="1";  }

}//end else if aval 
}//end fun
<!--*****************************************************************************/-->
  function checkramz_news()
  {
if(frm_n.name_n.value!="" && frm_n.mail_n.value!="" && frm_n.name_n.value!="الاسم" && frm_n.mail_n.value!="ايميل"){
	var emailID=document.frm_n.mail_n
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.focus()
		return false
	}

      hid=document.frm_n.hidcode_n;
      if((document.getElementById('txtramz_n').name)===(document.getElementById('txtramz_n').value))
      {  hid.value="0"; document.frm_n.submit();  }
      else  {  alert(".الرجاء ادخل الكود بدقة");  hid.value="1";  }

}//end if pooor text ha
else{
   alert(".الرجاء إملاء جميع الخانات");
}
}//end fun
<!--*****************************************************************************/-->

function form_delmatn(){
 hid1=document.frm_n.name_n;
 hid2=document.frm_n.mail_n;
  hid3=document.frm_n.txtramz_n;
  if(hid1.value==""){
  hid1.value="الاسم";
  }
  if(hid2.value==""){
  hid2.value="ايميل";
  }
 if(hid3.value==""){
  hid3.value="كود";
  } 
}
//*************baraye java txt sms **************************************/
function changematn(txt){
if(txt=='1'){
 hid2=document.frm_n.mail_n;
  hid3=document.frm_n.txtramz_n;
  if(hid2.value==""){
  hid2.value="ايميل";
  }
  if(hid3.value==""){
  hid4.value="كود";
  }
}

if(txt=='2'){
 hid1=document.frm_n.name_n;
  hid2=document.frm_n.txtramz_n;
 if(hid1.value==""){
  hid1.value="الاسم";
  } 
  if(hid2.value==""){
  hid2.value="كود";
  }
}
if(txt=='3'){
 hid1=document.frm_n.name_n;
  hid2=document.frm_n.mail_n;
  if(hid1.value==""){
  hid1.value="الاسم";
  }
 if(hid2.value==""){
  hid2.value="ايميل";
  } 
}
}
//////////////////////////////////////
function deletematn(txt){
 hid1=document.frm_n.name_n;
 if(txt=='1' && hid1.value=="الاسم" ){
   hid1.value="";
}
 hid2=document.frm_n.mail_n;
if(txt=='2' && hid2.value=="ايميل" ){
   hid2.value="";
}
 hid3=document.frm_n.txtramz_n;
if(txt=='3' && hid3.value=="كود"){
   hid3.value="";
}
 hid5=document.frm_sch.txtsearch;
if(txt=='5'){
   hid5.value="";
}
}
//************************************************************************************/
 function $(id)
{
    return(document.getElementById(id));
}
function fun_advert(namep,aksp,linkp,targett) 
{ 
  $('name_pic').innerHTML=namep
  if(linkp!=""){
     if(targett==1){
	    $('more_pic').innerHTML="<a href=http://www."+linkp+" target=_blank>&nbsp;المزيد...</a>"
	 }
	 else{
	    $('more_pic').innerHTML="<a href=http://www."+linkp+" >&nbsp;المزيد...</a>"
	 }
  }
  else{$('more_pic').innerHTML=""}
  $('aks_pic').innerHTML="<img src=pic/advert4part/"+aksp+" width=400 height=100 border=0>"
}

<!-- Copyright 2000, 2001, 2002, 2003 Macromedia, Inc. All rights reserved. -->
<!-- Copyright 2000, 2001, 2002, 2003 Macromedia, Inc. All rights reserved. -->
<!-- Copyright 2000, 2001, 2002, 2003 Macromedia, Inc. All rights reserved. -->
<!-- Copyright 2000, 2001, 2002, 2003 Macromedia, Inc. All rights reserved. -->
<!-- Copyright 2000, 2001, 2002, 2003 Macromedia, Inc. All rights reserved. -->
