var timerID = null
var timerRunning = false
function stopclock()
{
	if(timerRunning)
	clearInterval(timerID);
	timerRunning = false;
}
function startclock()
{
	// Make sure the clock is stopped
	stopclock();
	timerID = setInterval("showtime()",1000);
	timerRunning = true;
}
function showtime()
{
	var now1 = new Date();
	var now = new Date();
	now.setHours(now1.getUTCHours()+3,now1.getUTCMinutes()+30,now.getUTCSeconds());
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds();
	var timeValue = "";
	timeValue += " " + ((hours > 12) ? hours - 12 : hours);
	timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
	timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
	timeValue += (hours >= 12) ? " P.M." : " A.M.";
	clockLbl.innerHTML= timeValue;
}
function FaNumber(num)
{//  Hossein Mirzapour MA 28 July 2003

	var op = "";
	var test=""; 
	var FaNo = new Array(10);
	for( i=0; i < FaNo.length ; ++i )
	{	
		FaNo[i] = ("0x06F"+i).toString();
	}
	for ( i = 0; i < num.length ; i++ ) 
	{
		c = num.substring( i, i+1); 
		key = c.charCodeAt(0);
		if ((key - 0x0020)>15 && (key - 0x0020)<26)
		{	
			op += String.fromCharCode(FaNo[key - 0x0030]);
		}
		else
		{// if key is not Number
			op += String.fromCharCode(( key==46 )? 47 : key);
		}
	 }
	//return op;    
	/* inverse string
	for (k=op.length; k>=0;--k)
	{
		test+=op.substring(k,k-1);
	}
	op=test;
	*/
	op=op.replace( "." , "/");
	document.write("<div dir=\"ltr\">"+op+"</div>");
}
