﻿// ++++++++++++++++++ this part is responsible for display date on site ++++++++
	var _time,_weekDay,_day,_month,_year,_hday,_hmonth,_hyear
	var marqNews;
	function showDate()
	{
		/*_time=new Date();
		_weekDay=_time.getDay();
		_day=_time.getDate();
		_month=_time.getMonth();
		_year=_time.getYear();
		_month=_month+1;
		chrToIsl(_day,_month,_year);
		if(document.getElementById("lblDate")!=null)document.getElementById("lblDate").innerText=arabicWeekDay(_weekDay) + " " + _hday + " " + arabicHmonth(_hmonth) + " " + _hyear  + " - " +_day + " "+ arabicChmonth(_month) + " " + _year ;*/
		ummalqura();
		
		if(document.getElementById("td")!=null)
		{
			var tdHeight=document.getElementById("tdFrame1").scrollHeight - document.getElementById("tdFrame2").scrollHeight
			document.getElementById("td").height= (tdHeight < 0)?50:tdHeight+50
		}

	}
	function querystring(name)
	{
		var tmp = ( location.search.substring(1) );
		var i   = tmp.toUpperCase().indexOf(name.toUpperCase()+"=");

		if ( i >= 0 )
		{
			tmp = tmp.substring( name.length+i+1 );
			i = tmp.indexOf("&");
			return unescape( tmp = tmp.substring( 0, (i>=0) ? i : tmp.length ));
		}

		return("");
	}
		
	function showAdv(adv)
	{	
		document.write(adv);
		//document.write("<EMBED style='BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' src='"+url+"' width='"+width+"' height='"+height+"' type='application/x-shockwave-flash' quality='high'>");
	}
	function sendMessagePopup(url,height,width)
	{
		var new_width = 0;
		var new_heigh = 0;
		
		new_width = 520;//490 ;
		new_height = 446;//520 ;
		base = " " 
		
		urlWindow = window.open(base + url, 'Source', 'width=' + new_width + ',height=' + new_height + ', top='+(screen.height-new_height)/2+' , left='+(screen.width-new_width)/2+' ,scrollbars=no');
		
		urlWindow.focus;
	}
	function intPart(floatNum)
	{
		if (floatNum< -0.0000001)
		{
			return Math.ceil(floatNum-0.0000001)
		}
		return Math.floor(floatNum+0.0000001)	
	}
	function chrToIsl(day,month,year) 
	{
		d=day
		m=month
		y=year
		if ((y>1582)||((y==1582)&&(m>10))||((y==1582)&&(m==10)&&(d>14))) 
		{
			jd=intPart((1461*(y+4800+intPart((m-14)/12)))/4)+intPart((367*(m-2-12*(intPart((m-14)/12))))/12)-
			intPart( (3* (intPart(  (y+4900+    intPart( (m-14)/12)     )/100)    )   ) /4)+d-32075
		}
		else
		{
			jd = 367*y-intPart((7*(y+5001+intPart((m-9)/7)))/4)+intPart((275*m)/9)+d+1729777
		}
		l=jd-1948440+10632
		n=intPart((l-1)/10631)
		l=l-10631*n+354
		j=(intPart((10985-l)/5316))*(intPart((50*l)/17719))+(intPart(l/5670))*(intPart((43*l)/15238))
		l=l-(intPart((30-j)/15))*(intPart((17719*j)/50))-(intPart(j/16))*(intPart((15238*j)/43))+29
		m=intPart((24*l)/709)
		d=l-intPart((709*m)/24)
		y=30*n+j-30
		_hday=d
		_hmonth=m
		_hyear=y
	}
	function arabicWeekDay(day)
	{
		if(day==0)return "الاحد" ;
		if(day==1)return "الاثنين";
		if(day==2)return "الثلاثاء" ;
		if(day==3)return "الاربعاء" ;
		if(day==4)return "الخميس" ;
		if(day==5)return "الجمعة" ;
		if(day==6)return "السبت" ;
	}
	function arabicHmonth(month)
	{
		if(month==1)return "محرم";
		if(month==2)return "صفر";
		if(month==3)return "ربيع الأول";
		if(month==4)return "ربيع الثانى";
		if(month==5)return "جمادى الاولى";
		if(month==6)return "جمادى الثانية";
		if(month==7)return "رجب";
		if(month==8)return "شعبان";
		if(month==9)return "رمضان";
		if(month==10)return "شوال";
		if(month==11)return "ذو القعدة";
		if(month==12)return "ذو الحجة";
	}
	function arabicChmonth(month)
	{
		if(month==1)return "يناير";
		if(month==2)return "فبراير";
		if(month==3)return "مارس";
		if(month==4)return "ابريل";
		if(month==5)return "مايو";
		if(month==6)return "يونيو";
		if(month==7)return "يوليو";
		if(month==8)return "اغسطس";
		if(month==9)return "سبتمبر";
		if(month==10)return "اكتوبر";
		if(month==11)return "نوفمبر";
		if(month==12)return "ديسمبر";
	}	
//+++++++++++++++++++ End Date Part ++++++++++++++++++++++++++++++++++++++++++

	function checkParent()
	{
		return;
		if(window.location == window.parent.location)
		{
			window.location.href="home.html"
		}
	}
	function changeCountry()
	{
		if(document.getElementById("dropCountry").value==0)
		{
			document.getElementById("linkGo").href="home.html";
			return;
		}
		document.getElementById("linkGo").href="country"+document.getElementById("dropCountry").value+".html";
	}
	function getCookieVal (offset) 
	{
		var endstr = document.cookie.indexOf (";", offset);
		if (endstr == -1)
			endstr = document.cookie.length;
		return unescape(document.cookie.substring(offset, endstr));
	}

	function GetCookie (name) 
	{
		var arg = name + "=";
		var alen = arg.length;
		var clen = document.cookie.length;
		var i = 0;
		while (i < clen) 
		{
			var j = i + alen;
			if (document.cookie.substring(i, j) == arg)
				return getCookieVal (j);
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
		return null;
	}
	function SetCookie (name, value) 
	{
		var argv = SetCookie.arguments;
		var argc = SetCookie.arguments.length;
		var expires = (argc > 2) ? argv[2] : null;
		var path = (argc > 3) ? argv[3] : null;
		var domain = (argc > 4) ? argv[4] : null;
		var secure = (argc > 5) ? argv[5] : false;
		document.cookie = name + "=" + escape (value) +
				((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
				((path == null) ? "" : ("; path=" + path)) +
				((domain == null) ? "" : ("; domain=" + domain)) +
				((secure == true) ? "; secure" : "");
	}
	function setCookieColor(color,groupColor)
	{
		color=color.replace("#","").toLowerCase();
		groupColor=groupColor.replace("#","").toLowerCase();
		var expdate = new Date (); 
		expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365)); 
		SetCookie("pgColor",color,expdate);
		SetCookie("pgGroupColor",groupColor,expdate);
	}
	function openPopup(url,height,width)
	{
		var new_width = 0;
		var new_heigh = 0;
		
		new_width = parseInt(width) ;
		new_height = parseInt(height) ;
		base = " " 
		
		urlWindow = window.open(base + url, 'Source', 'width=' + new_width + ',height=' + new_height + ', top='+(screen.height-new_height)/2+' , left='+(screen.width-new_width)/2+' ,scrollbars=no');
		
		urlWindow.focus;
	}
	
	
	
	
	function ummalqura(){

  mjd0 = new Array(28606,28635,28664,28694,28723,28753,28782,28812,28842,28871,28900,28930,
  28959,28989,29018,29048,29077,29107,29136,29166,29195,29225,29254,29284,29314,29344,29374,
  29403,29433,29462,29491,29521,29550,29579,29609,29639,29668,29698,29728,29758,29787,29817,
  29846,29875,29905,29934,29963,29993,30022,30052,30081,30111,30140,30170,30199,30229,30258,
  30288,30317,30347,30377,30407,30436,30466,30495,30525,30554,30584,30613,30643,30672,30702,
  30731,30761,30790,30820,30849,30879,30908,30938,30967,30997,31026,31056,31085,31115,31144,
  31174,31203,31233,31262,31292,31321,31351,31380,31410,31440,31470,31499,31529,31558,31588,
  31617,31647,31675,31705,31735,31765,31794,31824,31853,31883,31912,31942,31971,32001,32030,
  32060,32089,32119,32149,32179,32208,32238,32267,32297,32326,32356,32385,32415,32444,32474,
  32503,32533,32562,32592,32621,32651,32680,32710,32739,32769,32798,32828,32857,32887,32916,
  32946,32975,33005,33034,33064,33093,33123,33152,33182,33212,33242,33271,33301,33330,33360,
  33389,33419,33449,33478,33508,33538,33567,33597,33626,33656,33685,33715,33744,33774,33803,
  33833,33862,33892,33921,33951,33980,34010,34039,34068,34098,34127,34157,34186,34216,34246,
  34276,34305,34335,34364,34394,34423,34453,34482,34511,34541,34570,34600,34630,34659,34689,
  34718,34748,34777,34807,34836,34866,34895,34925,34954,34984,35014,35043,35073,35102,35132,
  35161,35191,35221,35250,35279,35309,35339,35369,35398,35428,35457,35487,35516,35546,35575,
  35604,35634,35664,35693,35722,35752,35781,35810,35840,35870,35900,35929,35959,35988,36018,
  36047,36077,36106,36135,36165,36194,36224,36253,36283,36313,36342,36372,36402,36432,36461,
  36491,36520,36550,36579,36609,36638,36668,36697,36727,36756,36785,36815,36844,36874,36903,
  36933,36962,36992,37021,37051,37080,37110,37140,37169,37199,37228,37258,37287,37317,37346,
  37376,37405,37435,37464,37494,37523,37553,37583,37612,37642,37671,37700,37730,37759,37789,
  37818,37848,37877,37907,37937,37966,37996,38026,38055,38084,38114,38143,38173,38202,38232,
  38261,38291,38321,38350,38380,38409,38439,38468,38498,38527,38557,38586,38616,38645,38675,
  38704,38734,38763,38793,38822,38852,38881,38911,38940,38970,39000,39029,39058,39088,39117,
  39147,39177,39207,39236,39266,39296,39325,39354,39384,39413,39443,39472,39502,39531,39561,
  39591,39620,39649,39679,39708,39738,39767,39797,39826,39856,39885,39915,39945,39974,40004,
  40034,40063,40093,40122,40152,40181,40211,40240,40270,40299,40329,40358,40388,40417,40447,
  40476,40506,40535,40565,40594,40624,40654,40684,40713,40743,40772,40802,40831,40861,40891,
  40920,40950,40979,41008,41038,41067,41097,41126,41156,41185,41215,41244,41274,41303,41333,
  41363,41392,41421,41451,41480,41510,41539,41569,41598,41628,41657,41687,41717,41747,41776,
  41806,41835,41864,41893,41923,41952,41982,42011,42041,42071,42101,42130,42160,42189,42219,
  42248,42278,42307,42336,42366,42396,42425,42455,42484,42514,42544,42573,42603,42632,42661,
  42691,42720,42750,42779,42809,42838,42868,42898,42928,42957,42987,43016,43045,43075,43104,
  43134,43163,43193,43222,43252,43282,43311,43341,43370,43400,43429,43459,43488,43518,43547,
  43577,43606,43636,43665,43695,43725,43754,43784,43813,43843,43872,43902,43931,43961,43990,
  44020,44049,44079,44108,44138,44168,44197,44227,44257,44286,44316,44345,44374,44404,44433,
  44463,44492,44522,44552,44581,44611,44640,44670,44699,44729,44758,44787,44817,44846,44876,
  44905,44935,44965,44995,45024,45054,45083,45113,45142,45171,45201,45230,45260,45289,45319,
  45349,45379,45408,45438,45467,45497,45526,45555,45585,45614,45643,45673,45703,45732,45762,
  45792,45822,45851,45881,45910,45939,45969,45998,46027,46057,46087,46116,46146,46176,46205,
  46235,46264,46294,46323,46353,46382,46412,46441,46471,46500,46530,46559,46589,46619,46648,
  46678,46707,46737,46766,46796,46825,46855,46884,46914,46943,46973,47002,47032,47062,47091,
  47121,47150,47180,47209,47239,47268,47297,47327,47356,47386,47416,47445,47475,47505,47534,
  47564,47593,47623,47652,47681,47711,47740,47770,47799,47829,47859,47889,47918,47948,47977,
  48007,48036,48065,48095,48124,48154,48183,48213,48243,48272,48302,48332,48361,48391,48420,
  48449,48479,48508,48537,48567,48597,48626,48656,48686,48716,48745,48775,48804,48833,48863,
  48892,48921,48951,48981,49010,49040,49070,49099,49129,49159,49188,49217,49247,49276,49305,
  49335,49364,49394,49424,49454,49483,49513,49542,49572,49601,49631,49660,49689,49719,49748,
  49778,49808,49837,49867,49897,49926,49956,49985,50015,50044,50074,50103,50132,50162,50191,
  50221,50251,50280,50310,50339,50369,50399,50428,50458,50487,50517,50546,50575,50605,50634,
  50664,50693,50723,50753,50783,50812,50842,50871,50901,50930,50959,50989,51018,51048,51077,
  51107,51137,51166,51196,51226,51255,51285,51314,51344,51373,51402,51432,51461,51491,51521,
  51551,51581,51610,51640,51669,51698,51728,51757,51786,51815,51845,51875,51905,51935,51964,
  51994,52024,52053,52082,52112,52141,52170,52199,52229,52259,52289,52318,52348,52378,52407,
  52437,52466,52496,52525,52554,52584,52613,52643,52672,52702,52732,52761,52791,52821,52850,
  52880,52909,52938,52968,52997,53027,53056,53086,53115,53145,53175,53204,53234,53263,53293,
  53323,53352,53382,53411,53440,53470,53499,53529,53558,53588,53618,53647,53677,53707,53736,
  53766,53795,53824,53854,53883,53912,53942,53972,54002,54031,54061,54091,54120,54150,54179,
  54208,54238,54267,54296,54326,54356,54386,54415,54445,54475,54504,54534,54563,54592,54622,
  54651,54680,54710,54740,54769,54799,54829,54858,54888,54918,54947,54976,55006,55035,55065,
  55094,55124,55153,55183,55212,55242,55272,55301,55331,55360,55390,55419,55449,55478,55507,
  55537,55566,55596,55626,55656,55685,55715,55744,55774,55803,55833,55862,55891,55921,55950,
  55980,56010,56039,56069,56099,56128,56158,56187,56217,56246,56275,56305,56334,56364,56393,
  56423,56453,56482,56512,56542,56571,56600,56630,56659,56689,56718,56748,56777,56807,56836,
  56866,56896,56925,56955,56984,57014,57043,57073,57102,57132,57161,57191,57220,57250,57279,
  57309,57339,57368,57398,57428,57457,57486,57516,57545,57575,57604,57633,57663,57693,57722,
  57752,57782,57812,57841,57870,57900,57929,57958,57988,58017,58047,58076,58106,58136,58166,
  58195,58225,58254,58284,58313,58342,58372,58401,58431,58460,58490,58520,58550,58579,58609,
  58638,58668,58697,58726,58756,58785,58815,58844,58874,58904,58933,58963,58993,59022,59052,
  59081,59110,59140,59169,59199,59228,59258,59287,59317,59347,59376,59406,59435,59465,59494,
  59524,59553,59583,59612,59642,59671,59701,59730,59760,59790,59819,59849,59878,59908,59938,
  59967,59996,60026,60055,60085,60114,60144,60173,60203,60233,60263,60292,60322,60351,60380,
  60410,60439,60468,60498,60527,60557,60587,60617,60647,60676,60706,60735,60764,60794,60823,
  60852,60882,60911,60941,60971,61001,61030,61060,61089,61119,61148,61178,61207,61236,61266,
  61295,61325,61355,61384,61414,61444,61473,61503,61532,61562,61591,61620,61650,61679,61709,
  61738,61768,61798,61827,61857,61887,61916,61946,61975,62005,62034,62063,62093,62122,62152,
  62181,62211,62241,62270,62300,62330,62359,62389,62418,62447,62477,62506,62536,62565,62595,
  62624,62654,62684,62714,62743,62773,62802,62831,62861,62890,62920,62949,62979,63008,63038,
  63068,63098,63127,63156,63186,63215,63245,63274,63304,63333,63362,63392,63422,63452,63481,
  63511,63540,63570,63599,63629,63658,63688,63717,63746,63776,63806,63835,63865,63894,63924,
  63954,63983,64013,64042,64072,64101,64130,64160,64189,64219,64248,64278,64308,64338,64367,
  64397,64426,64456,64485,64514,64544,64573,64602,64632,64662,64691,64721,64751,64781,64810,
  64840,64869,64898,64928,64957,64986,65016,65046,65075,65105,65135,65165,65194,65224,65253,
  65282,65312,65341,65370,65400,65430,65459,65489,65519,65548,65578,65607,65637,65666,65696,
  65725,65754,65784,65814,65843,65873,65902,65932,65962,65991,66021,66050,66080,66109,66139,
  66168,66198,66227,66257,66286,66316,66345,66375,66404,66434,66464,66493,66523,66552,66582,
  66611,66640,66670,66699,66729,66759,66788,66818,66848,66877,66907,66936,66966,66995,67024,
  67054,67083,67113,67142,67172,67202,67232,67261,67291,67320,67350,67379,67408,67438,67467,
  67496,67526,67556,67586,67616,67645,67675,67704,67734,67763,67792,67822,67851,67881,67910,
  67940,67970,67999,68029,68059,68088,68118,68147,68176,68206,68235,68265,68294,68324,68353,
  68383,68413,68442,68472,68501,68531,68560,68590,68619,68649,68678,68707,68737,68767,68796,
  68826,68856,68885,68915,68945,68974,69003,69033,69062,69091,69121,69151,69180,69210,69239,
  69269,69299,69329,69358,69387,69417,69446,69475,69505,69534,69564,69594,69623,69653,69683,
  69712,69742,69771,69801,69830,69860,69889,69918,69948,69977,70007,70037,70066,70096,70125,
  70155,70185,70214,70244,70273,70302,70332,70361,70391,70420,70450,70480,70509,70539,70569,
  70598,70628,70657,70686,70716,70745,70775,70804,70834,70863,70893,70923,70953,70982,71012,
  71041,71070,71100,71129,71158,71188,71217,71247,71277,71307,71336,71366,71396,71425,71454,
  71484,71513,71542,71572,71601,71631,71661,71690,71720,71750,71780,71809,71838,71868,71897,
  71926,71956,71985,72015,72045,72074,72104,72134,72163,72193,72222,72252,72281,72310,72340,
  72369,72399,72428,72458,72488,72517,72547,72576,72606,72636,72665,72694,72724,72753,72783,
  72812,72842,72871,72901,72930,72960,72990,73019,73049,73079,73108,73138,73167,73196,73226,
  73255,73285,73314,73344,73374,73403,73433,73463,73492,73522,73551,73580,73610,73639,73668,
  73698,73728,73757,73787,73817,73847,73876,73906,73935,73964,73994,74023,74052,74082,74112,
  74141,74171,74201,74230,74260,74290,74319,74348,74378,74407,74436,74466,74496,74525,74555,
  74585,74614,74644,74674,74703,74732,74762,74791,74821,74850,74880,74909,74939,74968,74998,
  75028,75057,75087,75116,75146,75175,75205,75234,75263,75293,75322,75352,75382,75411,75441,
  75471,75500,75530,75559,75589,75618,75647,75677,75706,75736,75765,75795,75825,75855,75884,
  75914,75943,75973,76002,76031,76061,76090,76120,76149,76179,76209,76238,76268,76298,76327,
  76357,76386,76415,76445,76474,76504,76533,76563,76592,76622,76652,76681,76711,76740,76770,
  76800,76829,76858,76888,76917,76947,76976,77006,77035,77065,77095,77124,77154,77184,77213,
  77242,77272,77301,77331,77360,77389,77419,77449,77478,77508,77538,77568,77597,77626,77656,
  77685,77714,77744,77773,77803,77832,77862,77892,77922,77951,77981,78010,78040,78069,78098,
  78128,78157,78187,78216,78246,78276,78306,78335,78365,78394,78424,78453,78482,78512,78541,
  78571,78600,78630,78660,78689,78719,78749,78778,78807,78837,78866,78896,78925,78955,78984,
  79014,79043,79073,79103,79132,79162,79191,79221,79250,79280,79309,79339,79368,79398,79427,
  79457,79486,79516,79545,79575,79605,79634,79664,79694,79723,79752,79782,79811,79840,79870,
  79899,79929,79959,79989);
  
  
  _time=new Date();
  _weekDay=_time.getDay();
		_day=_time.getDate();
		_month=_time.getMonth();
		_year=_time.getYear();
		_month = _month + 1;
		
		
		
  day=_day;
  month=_month - 1;
  year=_year;

  m=month+1;
  y=year;
  if(m<3) {
    m=m+12;
    y=y-1;
    }
  
  c=Math.floor(y/100.);
  jgc=c-Math.floor(c/4.)-2;
    
  jd=Math.floor(365.25*(y+4716))+Math.floor(30.6001*(m+1))+day-jgc-1524;
  
  c=Math.floor((jd-1867216.25)/36524.25);
  jgc=1+c-Math.floor(c/4.);
  b=jd+jgc+1524;
  cc=Math.floor((b-122.1)/365.25);
  d=Math.floor(365.25*cc);
  month=Math.floor((b-d)/30.6001);
  day=(b-d)-Math.floor(30.6001*month);
  if(month>13) {
    cc=cc+1;
    month=month-12;
    }
  year=cc-4716;  
  month=month-1;

  /*document.calendar.day.value=day;
  document.calendar.month.selectedIndex=month-1;
  document.calendar.year.value=year;*/

  wd=Math.floor((Math.floor((jd+1.)%7.)+7.)%7.)+1;  
  
  /*document.calendar.julday.value=jd;
  document.calendar.wkday.selectedIndex=wd-1;*/

  mjd=jd-2400000;
  
  for(var i=0;i<mjd0.length; i++){
    if(mjd0[i]>(mjd-1))
    break;
  }
    
  iln=i+16260;
  ii=Math.floor((i-1)/12);
  iy=1356+ii;
  im=i-12*ii;
  id=mjd-mjd0[i-1];
  ml=mjd0[i]-mjd0[i-1];

		
		chrToIsl(_day,_month,_year);
		if(document.getElementById("lblDate")!=null)document.getElementById("lblDate").innerText=arabicWeekDay(_weekDay) + " " + id + " " + arabicHmonth(im) + " " + iy  + " - " +_day + " "+ arabicChmonth(_month) + " " + _year ;

  
}
