function wtl_Tag5_153731()
{
	var SERVER= "";
	var CONTENTGROUP= "";
	
	var wtl_URL= document.URL;
	var wtl_Title= document.title;

	function D8( d)
	{
		var fwd=6, seed= new Date('01/01/2000'), key= "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
		var s= key.charAt( d.getFullYear()-2000)+key.charAt( d.getMonth()+1)+key.charAt( d.getDate());
		s+= key.charAt( d.getHours())+key.charAt( d.getMinutes())+key.charAt( d.getSeconds());
		while( seed.getDay()!=fwd) seed= new Date(seed.getTime() + 86400000);
		var w= Math.floor( (d.getTime()-(seed.getTime()+86400000)) / 604800000 );
		s+= key.charAt( (w-(w%16))/16 );
		s+= key.charAt( w%16);
		return s;
	}



	
	function A( B, C)
	{
		W+="&"+B+"="+escape(C);
	}

	var t = new Date();
	var W="http"+(document.URL.indexOf('https:')==0?'s':'')+"://statse.webtrendslive.com/S153731/button5.asp?tagver=5&si=153731&fw=6";
	A( "server", typeof(SERVER)== "string" ? SERVER : "");
	A( "Group", typeof(CONTENTGROUP)== "string" ? CONTENTGROUP : "");
	A( "tz", t.getTimezoneOffset());
	A( "ch", t.getHours());
	A( "cl", D8(t));
	A( "ti", typeof(wtl_Title)== "string" ? wtl_Title : document.title);
	A( "url", typeof(wtl_URL)== "string" ? wtl_URL : document.URL);
	A( "rf", window.document.referrer);
	A( "js", "Yes");
	A( "ul", navigator.appName=="Netscape" ? navigator.language : navigator.userLanguage);
	if(typeof(screen)=="object")
	{
	A( "sr", screen.width+"x"+screen.height);
	A( "cd", screen.colorDepth);
	A( "jo", navigator.javaEnabled()?"Yes":"No");
	}
	if( W.length>2048 && navigator.userAgent.indexOf('MSIE')>=0)
		W= W.substring( 0, 2043)+"&tu=1";

	document.write('<IMG ID="WTL_153731" BORDER="0" WIDTH="1" HEIGHT="1" SRC="'+W+'">');
}
function callme()
{
	win1 = window.open('/arabic/print.aspx','wind','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=650,height=400')
	win1.window.moveTo(20,20);
}
function ViewImage(ifile,ix,iy,ititle) { 
var win;
var sWidth;
var sHeight;
win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,left=100,top=60,toolbar=no,scrollbars=NO");

win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("</head><body topmargin=0 leftmargin=0>");
win.document.write("<table border=0 cellpadding=0 cellspacing=0 width=250 height=250><tr><td width=100% valign=top height=250>");
win.document.write("<img border=0 src="+ifile+"></td></tr><!------tr><td width=100% valign=top height=40>1</td></tr-----></table>");
win.document.write("</body></html>");
win.document.close();
}



function preloadImage()
{
image1 = new Image();
image1.src = "/arabic/images/menu_on_ar.gif";
}

function chklength(idx)
{
	var myname=idx;
	
	myname=myname.replace(/^\s*(\b.*\b|)\s*$/, "$1");
	return myname.length;
}
function keytest()
{
if ((event.keyCode > 32 && event.keyCode < 48) || (event.keyCode > 57 && event.keyCode < 65) || (event.keyCode > 90 && event.keyCode < 97)) 

event.returnValue = false;

}

function fn_add1()
{	
var errval=0;
var str=new String(document.searchformleft.SearchString.value);
for(i=0;i<str.length-1;i++)
{
	if(str.charCodeAt(i)>=32 && str.charCodeAt(i)<=48) 
	errval=1
	if(str.charCodeAt(i)>=57 && str.charCodeAt(i)<=65)
	errval=1;
	if(str.charCodeAt(i)>=91 && str.charCodeAt(i)<=95)
	errval=1;

	if(str.charCodeAt(i)==123 || str.charCodeAt(i)==125)
	errval=1;
}

    
if(chklength(document.searchformleft.SearchString.value)==0)
{
	alert("الرجاء إدخال كلمة البحث");
	document.searchformleft.SearchString.focus();
	return false;
}	
else if(chklength(document.searchformleft.SearchString.value)==1)
{
alert("لا يسمح بالبحث بحرف واحد فقط");
return false;
}

if(errval==1)
{
alert("لا يسمح بالبحث بالرموز");
return false;
}
else
return true;
}





function golden_records_menu()
{
var sgolden_records_menu ="";
sgolden_records_menu +="<form><h5>انتقل إلى: <select name='selectmenu' onchange='go(this.form)'>";
sgolden_records_menu +="<option selected>اختر</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index.html'>الدورة السابعة عشرة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index16.html'>الدورة السادسة عشرة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index15.html'>الدورة الخامسة عشرة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index14.html'>الدورة الرابعة عشرة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index13.html'>الدورة  الثالثة عشرة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index12.html'>الدورة الثانية عشرة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index11.html'>الدورة الحادية عشرة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index10.html'>الدورة العاشرة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index9.html'>الدورة التاسعة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index8.html'>الدورة الثامنة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index7.html'>الدورة السابعة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index6.html'>الدورة السادسة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index5.html'>الدورة الخامسة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index4.html'>الدورة الرابعة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index3.html'>الدورة الثالثة</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index2.html'>الدورة الثانية</option>";
sgolden_records_menu +="<option value='/arabic/golden_records/index1.html'>الدورة الأولى</option>";
sgolden_records_menu +="</select></h5></form>";
document.write(sgolden_records_menu);
}








function Top()
{
document.writeln('<TABLE WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0 bgcolor="#6F1330" dir=ltr >');
document.writeln('	<TR>');
		document.writeln('<TD>');
			document.writeln('<embed width="370" height="122" src="/Arabic/Images/newtop/top.swf"></TD>');
		document.writeln('<TD valign=bottom rowspan=2 width=100% align=center>');
			document.writeln('<img border="0" src="/Arabic/Images/top_sdefy.gif" width="133" height="145"</TD>');
		document.writeln('<TD>');
			document.writeln('<a href="/Arabic/index.html"><IMG height="120"  SRC="/Arabic/Images/trick_neww.jpg"  ALT="" border=0></a></TD>');
	document.writeln('</TR>');
	document.writeln('<TR>');
		document.writeln('<TD  width="404" >');
			document.writeln('<img border="0" src="/Arabic/Images/newtop/index_04-2.gif" width="404" height="28"></TD>');
		document.writeln('<TD>');
			document.writeln('<img border="0" src="/Arabic/Images/trick_neww.jpg" width="376" height="1"></TD>');
	document.writeln('</TR>');
document.writeln('</TABLE>');

preloadImage()
}


function Top_Menu()
{

var sTop_Menu= "";
sTop_Menu+= "<table border='0'cellspacing='0' cellpadding='0'  style='border: 1px solid #BF8B9D'  width='100%' id='table30' bgcolor='#660033'><form name=searchformleft method=Post action=/arabic/search.asp>";
sTop_Menu+= "<tr colspan=15 height=5><td></td></tr>";
sTop_Menu+= "<tr>";

sTop_Menu+= "<td  class='mean_menu1'><table cellspacing=0 cellpadding=0 border=0><tr><td><image src='/arabic/images/newtop/header_right.jpg' ></td><td background='/arabic/images/newtop/header_bg.jpg'><a href='/Arabic/shedule/index.html' class='top_menuNew'>&nbsp;جدول المباريـات</a></td><td><image src='/arabic/images/newtop/header_left.jpg' ></td></tr></table></td>";

sTop_Menu+= "<td  class='mean_menu1'><table cellspacing=0 cellpadding=0 border=0><tr><td><image src='/arabic/images/newtop/header_right.jpg' ></td><td background='/arabic/images/newtop/header_bg.jpg'><a href='/arabic/forum/feedback.asp?2' class='top_menuNew'>&nbsp;اقتراحات واستفسارات</a></td><td><image src='/arabic/images/newtop/header_left.jpg' ></td></tr></table></td>";


sTop_Menu+= "<td  class='mean_menu1'><table cellspacing=0 cellpadding=0 border=0><tr><td><image src='/arabic/images/newtop/header_right.jpg' ></td><td background='/arabic/images/newtop/header_bg.jpg'><a class='top_menuNew' href='/arabic/gallry/tree.asp?2'>&nbsp;ألبوم الصور</a></td><td><image src='/arabic/images/newtop/header_left.jpg' ></td></tr></table></td>";


sTop_Menu+= "<td  class='mean_menu1'><table cellspacing=0 cellpadding=0 border=0><tr><td><image src='/arabic/images/newtop/header_right.jpg' ></td><td background='/arabic/images/newtop/header_bg.jpg'><a class='top_menuNew' href='/arabic/links/index.html?2'>&nbsp;روابط عالمية</a></td><td><image src='/arabic/images/newtop/header_left.jpg' ></td></tr></table></td>";


sTop_Menu+= "<td  class='mean_menu1'><table cellspacing=0 cellpadding=0 border=0><tr><td><image src='/arabic/images/newtop/header_right.jpg' ></td><td background='/arabic/images/newtop/header_bg.jpg'><a class='top_menuNew' href='/arabic/contact_us/index.html?2'>&nbsp;اتصل بنا</a></td><td><image src='/arabic/images/newtop/header_left.jpg' ></td></tr></table></td>";


sTop_Menu+= "<td  class='mean_menu1'><table cellspacing=0 cellpadding=0 border=0><tr><td><image src='/arabic/images/newtop/header_right.jpg' ></td><td background='/arabic/images/newtop/header_bg.jpg'><a class='top_menuNew' href='http://mail.gulfcup.qa:8383/' target='_blank'>&nbsp;البريد الإلكتروني</a></td><td><image src='/arabic/images/newtop/header_left.jpg' ></td></tr></table></td>";


sTop_Menu+= "<td  width='100' class='mean_menu1' style='text-align:left'>&nbsp;<input type=button class='button' value='إبحث' onclick='return fn_add1()'> &nbsp;</td>";

sTop_Menu+= "<td  class='mean_menu1'><INPUT TYPE='TEXT' NAME='SearchString' SIZE='14' MAXLENGTH='100' VALUE='' onkeypress=keytest() ></td>";
sTop_Menu+= "<tr colspan=15 height=5><td></td></tr>";
sTop_Menu+= "</tr>";
sTop_Menu+= "</form></table>";

document.write(sTop_Menu);

}


function print_out()
{
document.write("<table border='0' cellpadding='0' cellspacing='0' width='720' height=100>");
document.write("<tr><td colspan=2 height=40 style='cursor:hand' align=center><img src=/arabic/images/print.gif style='maright-left:15pt;' align='center' border=0 onclick='callme()' alt='Click Here to print the Document'></td></tr>");
document.write("</table>");
}

function print_out1()
{
document.write("<table border='1'  dir='rtl' cellpadding='0' cellspacing='0' width='720' height=100>");
document.write("<tr><td colspan=2 height=40 style='cursor:hand' align=center><img src=/arabic/images/print.gif style='maright-left:15pt;' align='center' border=0 onclick='callme()' alt='Click Here to print the Document'></td></tr>");
document.write("</table>");
}

function pop() 
{
var mywindow;
var opts = 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=567,height=451,top=20,left=20';
window.open("/arabic/map/index.html","",opts)
}

function pop1() 
{
var mywindow;
var opts = 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=950,height=510,top=10,left=5';
window.open("/arabic/index3.html","",opts)
}

function poll()
{

var sPoll = "";
sPoll+="<!-- Start poll --><tr><td><object id='OBJECT1' VIEWASTEXT><iframe align=center name='iframe1' id='pollFrame' ";
//sPoll+="bgcolor='red' width='192' height='0' frameborder='0' scrolling='no' src='/Arabic/Public/poll/poll.asp' nowrap>";
sPoll+="bgcolor='red' width='192' height='0' frameborder='0' scrolling='no' src='' nowrap>";
sPoll+="</iframe></object></td></tr><!--End Poll -->";
document.write (sPoll);
}




function scrollNews()
{
var sPoll = "";
sPoll+="<!-- Start poll --><tr><td><object id='OBJECT1' VIEWASTEXT><iframe align=center name='iframe1' id='pollFrame' src='/Arabic/scroll.htm' bgcolor='red' width='192' height='190' frameborder='0' scrolling='no' src='' nowrap>";
sPoll+="</iframe></object></td></tr><!--End Poll -->";
document.write (sPoll);
}



function pop1() 
{
var mywindow;
var opts = 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,width=544,height=446,top=10,left=40';
window.open("/arabic/index3.html","",opts)
}


function Left_Menu()
{
var sLeft_Menu=""; 

sLeft_Menu+= "<table border='0' cellpadding='0' cellspacing='0' width='100%' class='newTable' >";
sLeft_Menu+= "<tr><td class='left_background'  width='100%' colspan='2' height='15'></td></tr>";
sLeft_Menu+= "<tr><td width='100%' colspan='2' valign=top class='left_background'>";


sLeft_Menu+="<table cellspacing=0 cellpadding=0 border=0   width=100% class=newTable><tr><td width=28px><image src='/arabic/images/newtop/bigPgRight.jpg' ></td><td width=100% background='/arabic/images/newtop/bigPg.jpg' class=top_menuNew valign=top>"
sLeft_Menu+="<div style='position:relative;top:6;left:0;'><div id='DateDiv'  style='position:relative;top:0,left:0px;font-family:tahoma;font-size:10;color:#ffffff;dir:rtl;text-align:center'></div><div id='clock'  style='position:relative;top:0,left:0px;font-family:tahoma;font-size:10;color:#ffffff;direction:rtl;text-align:center' ></div></div>";
sLeft_Menu+="</td><td width=28px><image src='/arabic/images/newtop/bigPgLeft.jpg' ></td></tr></table>";




sLeft_Menu+= "</td></tr>";
sLeft_Menu+= "<tr><td class='left_background'  width='100%' colspan='2' height='10'></td></tr>";
sLeft_Menu+= "</tr></table>";


sLeft_Menu+= "<map name='FPMap0'>";
sLeft_Menu+= "<area href='http://www.soutal-khaleej.fm.qa/soutal-khaleej.asx' shape='rect' coords='129, 70, 179, 85'>";
sLeft_Menu+= "<area href='#' shape='rect' coords='13, 68, 66, 85'>";
sLeft_Menu+= "</map>";



sLeft_Menu+= "<script langauage=javascript>scrollNews()</script>";
sLeft_Menu+= "<td>";
sLeft_Menu+= "</div></td></tr>";
sLeft_Menu+= "<tr><td></td></tr>";
sLeft_Menu+= "<tr><td width='200' align='left' valign=top >";
sLeft_Menu+="<table cellspacing=0 cellpadding=0 border=0   width=100% ><tr><td height=10></td></tr><tr><td align=center>"
sLeft_Menu+="<embed width='188' height='88' src='/Arabic/images/open.swf' wmode='transparent' >";
sLeft_Menu+="</td></tr><tr><td height=10></td></tr></table>"; 
sLeft_Menu+= "<table border='0' cellpadding='0' cellspacing='0' width='194' class='newTable' >";
sLeft_Menu+= "<tr><td class='left_background'  width='100%' colspan='2' height='10'></td></tr>";
sLeft_Menu+= "<tr><td width='100%' colspan='2'>";
sLeft_Menu+="<table cellspacing=0 cellpadding=0 border=0   width=100% class=newTable><tr><td width=20px><image src='/arabic/images/newtop/sd_right.jpg' ></td><td width=100% background='/arabic/images/newtop/sd_bg.jpg' class=top_menuNew>&nbsp;فنادق و ملاعب الدولة</td><td width=27px><image src='/arabic/images/newtop/sd_left.jpg' ></td></tr></table>";
sLeft_Menu+= "</td></tr>";
sLeft_Menu+= "<tr>";
sLeft_Menu+= "	<td class=imagePaddin  align='center' dir='ltr' ><img onclick='pop1()'  border='0' src='/arabic/images/hotels1.jpg'  style=cursor:hand;><br>الاسعار خاضعة للتغير</td>";
sLeft_Menu+= "</tr>"
sLeft_Menu+= "<tr>	"
sLeft_Menu+= "	<td   height='20' valign='bottom' dir='ltr'><img border='0' src='/arabic/images/newtop/tb.jpg' width='200' height='5'></td>";

sLeft_Menu+= "</td></tr></table>";



document.write(sLeft_Menu );
}


function Buttom()
{
var sButtom= "";
sButtom+= "<table border='0' cellpadding='0' cellspacing='0' width='100%' >";
sButtom+= "<tr>";

/*sButtom+= "<!--<td class='bg_3' width='95'><a href=//www.gulfcup.com target=_blank><img border='0' src='/arabic/images/16_gulf.jpg' width='70' height='80'></a></td>-->";
sButtom+= "<td class='bg_3' width='95'>&nbsp;<!--<a href=//www.ocasia.org target=_blank><img border='0' src='/arabic/images/sun_logo.jpg' width='66' height='80'></a>--></td>";
sButtom+= "<td class='bg_3' width='95'>&nbsp;<!--<a href=//www.dohaasiangames.org target=_blank><img border='0' src='/arabic/images/asian_logo.jpg' ></a>--></td>";*/
sButtom+= "<td class='bg_3'  align=center><a href=//www.qatarolympics.org target=_blank><img border='0' src='/arabic/images/qnoc1_logo.gif'></a></td>";
/*sButtom+= "<td class='bg_3' width='95'>&nbsp;<!--<a href=//www.olympic.org/uk/index_uk.asp target=_blank><img border='0' src='/arabic/images/olympic_1.jpg' width='76' height='80'></a>--></td>";
sButtom+= "<td class='bg_3' width='95'>&nbsp;<!--<a href=//www.fifa.com target=_blank><img border='0' src='/arabic/images/fifa.jpg' width='68' height='80'></a>--></td>";
/*sButtom+= "<td width='20%' align='left'  class='bg_3'><img border='0' src='/arabic/images/buttom_left.gif'></td>";*/
sButtom+= "</tr>";
sButtom+= "<tr><td colspan='8' align='center'> ";

sButtom+= "<table border='0' cellpadding='0' style='border-collapse: collapse' width='500' >";
sButtom+= "<tr><td width='355' align='left' class='copyright'>جميع الحقوق محفوظة</td>";
sButtom+= "<td width='70' align='center' class='copyright'><img border='0' src='/arabic/images/17_gulf.gif'></td>";
sButtom+= "<td width='355' class='copyright'>2004 ©</td>";
sButtom+= "</tr>";
sButtom+= "</table>";
sButtom+= "</td>";
sButtom+= "</tr>";
sButtom+= "</table>";

document.write(sButtom);
wtl_Tag5_153731();
}

function Slider()
{
//document.write("<div style='position:absolute;top:0;left:105;' align='right'>");
}




function Right_ame()
{
var Sright= "<table cellspacing=0 cellpadding=0 border=0   width=100% ><tr><td style='height:12px'> </td></tr><tr><td width=20px><image src='/arabic/images/newtop/sd_right.jpg' ></td><td width=100% background='/arabic/images/newtop/sd_bg.jpg' class=top_menuNew>&nbsp; القائمة الرئيسية</td><td width=27px><image src='/arabic/images/newtop/sd_left.jpg' ></td></tr></table>";
Sright+= " <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> ";
Sright+= "<table  border='0' width='170' cellspacing='0'  cellpadding='0'>";


Sright+= "<tr><td><a href=http://www.gisqatar.org.qa/exploreAr/ target=_blank><img src=/arabic/images/Explore_Qatat2.gif border=0></a></td></tr>";




Sright+= "<tr><td><img src='/arabic/images/trick.jpg' width='1' height=8 border=0></td></tr>";
Sright+= "<tr><td></td></tr>";
Sright+= "<tr><td><img src='/arabic/images/trick.jpg' width='1' height=10 border=0></td></tr></table>";





/*
Sright+= "<table class='newtable' border='0' cellpadding='0' cellspacing='0' width='170'>";
Sright+= "<tr>";
Sright+= "<td   colspan=2><table cellspacing=0 cellpadding=0 border=0   width=100% class=newTable><tr><td width=20px><image src='/arabic/images/newtop/sd_right.jpg' ></td><td width=100% background='/arabic/images/newtop/sd_bg.jpg' class=top_menuNew>&nbsp;نجوم خليجي 17</td><td width=27px><image src='/arabic/images/newtop/sd_left.jpg' ></td></tr></table></td>";
Sright+= "</tr>";
Sright+= "<tr><td colspan=2><a class=star href=/Arabic/facts/stars/article29.html>عماد محمد هداف العراق:<br><div align=center> قادمون للمنافسة علي اللقب الخليجي</div></a></div></td></tr>";
Sright+= "<tr><td class='imagePaddin' align='center'  colspan=2><a class=star href=/Arabic/facts/stars/article29.html><img border='0' src='/Arabic/news/images/addnan.jpg' alt='التفاصيل'></a></td></tr>";
Sright+= "<tr><td class='imagePaddin' align='center' colspan=2><hr></td></tr>";
Sright+= "<tr><td class='imagePaddin' align='center' colspan=2><a class=star href=/Arabic/facts/stars/article28.html>خليجي 17 تعيد لهيب الكويت</a></td></tr>";
Sright+= "<tr><td class='imagePaddin' align='center' colspan=2><a class=star href=/Arabic/facts/stars/article28.html><img border='0' src='/arabic/news/images/laheb.jpg'alt='التفاصيل'></a></td></tr>";
Sright+= " <tr><td height='0' valign='bottom' dir='ltr' colspan=2><img border='0' src='/arabic/images/Newtop/tb.jpg' width='170' height='5'></td></tr>";
Sright+= " </table>";
	*/

document.write(Sright);
}

window.onload=loader 

function loader(){
//alert()
	//startit()
loadPoll()
setTimeout('loadMarquee ()',100);

//alert(getobject('DateDiv'))
//alert(window.DateDay)
if (window.DateDay && getobject('DateDiv') ){

	sClock( dateHour, dateMinute , dateSecond)
	
	}
}

function loadPoll(){
	ifram = getobject('pollFrame');
	//ifram.src= '/Arabic/Public/poll/poll.asp';
	//alert(ifram)
}

function loadMarquee (){
	
	
	marq = getobject('MARQ');
	//alert(marq);
	if (marq){
		marq.style.visibility='hidden';
		marq.style.visibility='visible';
		
		marq.start();
		
	}

}
function getobject(obj){
if (document.getElementById)
return document.getElementById(obj)
else if (document.all)
return document.all[obj]
}



var DaysA=new Array("الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت")
var MonthsA=new Array("يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر")
	
	
//<!-- Original:  Tomleung (lok_2000_tom@hotmail.com) This tag should not be removed-->
//<!--Server time ticking clock v2.0 Updated by js-x.com-->
function MakeArrayday(size)
{
  this.length = size;
  for(var i = 1; i <= size; i++)
    this[i] = "";
  return this;
}
function MakeArraymonth(size)
{
  this.length = size;
  for(var i = 1; i <= size; i++)
    this[i] = "";
  return this;
}

var hours;
var minutes;
var seconds;
var timer=null;
function sClock(h,m,s)
{
  hours=h;
  minutes=m;
  seconds=s;
  
  DateDiv1 = getobject('DateDiv');
  DateDiv1.innerHTML= DaysA[DateWeekDay-1] + "  " + DateDay + " " +MonthsA[DateMonth-1] + " "  + DateYear + "م";
  
  if(timer){clearInterval(timer);timer=null;}
  timer=setInterval("work();",1000);
}


function twoDigit(_v)
{
  if(_v<10)_v="0"+_v;
  return _v;
}

function work()
{
  if (!document.layers && !document.all && !document.getElementById) return;
  var runTime = new Date();
  var dn="صباحاً"
  var shours = hours;
  var sminutes = minutes;
  var sseconds = seconds;
  if (shours >= 12)
  {
	 dn="مساءً"
    shours-=12;
  }
  if (!shours) shours = 12;
  sminutes=twoDigit(sminutes);
  sseconds=twoDigit(sseconds);
  shours  =twoDigit(shours  );
  movingtime =  ""+ shours + ":" + sminutes +":"+sseconds+" " +dn  ;
  if (document.getElementById)
    document.getElementById("clock").innerHTML=movingtime;
  
  else if (document.all)
    clock.innerHTML = movingtime;

  if(++seconds>59)
  {
    seconds=0;
    if(++minutes>59)
    {
      minutes=0;
      if(++hours>23)
      {
        hours=0;
      }
    }
  }
}