﻿
function paryerTimesWindowAr()  
	{
		var theURL = 'PrayTime.aspx';
		paryerWindow = window.open(theURL,'','width=355,height=410,menubar=no,resizable=no,scrollbars=no,status=no');
	}
	function disp_alert()
    {
        alert("شكرا لاستخدامك موقع الادارة العاملة للجمارك")
    }
    function modelesswin()
	{
	    if(document.getElementById("txtMail").value=='')
	    eval(alert('برجاء إدخال البريد'));
	    else
	    {
		    var mwidth=230;
		    var mheight=130;
		    var mleft = (window.screen.width/2)-193;
		    var mtop = (window.screen.height/2)- 65;
		    var url= 'MailList.aspx?MailAdd='+document.getElementById("txtMail").value;
		    //if (document.all&&window.print) //if ie5
		    //	eval('window.showModalDialog(url,"","help:0;resizable:0;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
		    //else
			    eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,left='+mleft+',top='+mtop+',resizable=0,scrollbars=0")')
		}
	}
	function HSCode()
	{
		if((document.getElementById("Text3").value=="") & 
	    (document.getElementById("Text4").value=="") & 
	    (document.getElementById("Text5").value=="") &
	    //(document.getElementById("Text6").value==""))
	    (document.getElementById("htmlToEncode").value==""))
	    alert("برجاء كتابة أحد حقول البحث");
	    else
	    {
	    var theURL = 'HSCodePage.aspx?';
		//theURL += 'Sections='+document.getElementById("Text1").value;
		//theURL += '&Chapters='+document.getElementById("Text2").value;
		theURL += 'Headings='+document.getElementById("Text3").value;
		theURL += '&SubHeading='+document.getElementById("Text4").value;
		theURL += '&TariffItems='+document.getElementById("Text5").value;
		//theURL += '&Dis='+document.getElementById("Text6").value;
		var encodedHtml = escape(document.getElementById("htmlToEncode").value);
	    encodedHtml = encodedHtml.replace(/\//g,"%2F");
	    encodedHtml = encodedHtml.replace(/\?/g,"%3F");
	    encodedHtml = encodedHtml.replace(/=/g,"%3D");
	    encodedHtml = encodedHtml.replace(/&/g,"%26");
	    encodedHtml = encodedHtml.replace(/@/g,"%40");
	    //encodeHtml.htmlEncoded.value = encodedHtml;
		theURL += '&Dis='+encodedHtml;
		paryerWindow = window.open(theURL,'','width=555,height=610,left=150,top=50,menubar=no,resizable=no,scrollbars=yes,status=no');
		//alert(theURL);
		}
	}
    function RemoveSpaces(e)
    {
        var keynum;
	    var keychar;
	    var numcheck;
	    if(window.event) // IE
	      {
	      keynum = e.keyCode;
	      }
	    else if(e.which) // Netscape/Firefox/Opera
	      {
	      keynum = e.which;
	      }
	    keychar = String.fromCharCode(keynum);
	    numcheck = /^\s+|\s+$/g
	    return !numcheck.test(keychar);
    }
    function noStrings(e)
	{
	var keynum;
	var keychar;
	var numcheck;
	if(window.event) // IE
	  {
	  keynum = e.keyCode;
	  }
	else if(e.which) // Netscape/Firefox/Opera
	  {
	  keynum = e.which;
	  }
	keychar = String.fromCharCode(keynum);
	numcheck = /\d/;
	return numcheck.test(keychar);
	}
function disableRightClick()
    {
        if (event.button == 2)
        {
        alert("جميع الحقوق محفوظة للإدارة العامة للجمارك");
        }
    }