function ShowNowrooz(Obj)
{
Obj.value = "";
var curDate = new Date();
var strOut = new String();
var dateNowrooz = new Date("2006/03/20 21:55:35");
/*
21:55:35
*/
dayNowrooz = dateNowrooz.getDate(); //getDate returns DAY !!!
monthNowrooz = dateNowrooz.getMonth() + 1;
hourNowrooz = dateNowrooz.getHours();
minNowrooz = dateNowrooz.getMinutes();
secNowrooz = dateNowrooz.getSeconds();
curDay = curDate.getDate();
sumTimeNowrooz = (hourNowrooz * 3600) + (minNowrooz * 60) + secNowrooz;
curSumTime = (curDate.getHours() * 3600) + (curDate.getMinutes() * 60) + curDate.getSeconds();
sumDiff = sumTimeNowrooz - curSumTime;
dayDiff = dayNowrooz - curDay;
hourDiff = Math.floor(sumDiff / 3600);
if(hourDiff < 0)
{
dayDiff--;
sumDiff+=86400;
hourDiff+=24;
}
rDiff = sumDiff % 3600;
minDiff = Math.floor(rDiff / 60);
secDiff = rDiff % 60;
strOut = DisplayFormat.replace("#D#" , dayDiff);
strOut = strOut.replace("#H#" , hourDiff);
strOut = strOut.replace("#M#" , minDiff);
strOut = strOut.replace("#S#" , secDiff);
if(curDay > dayNowrooz)
{
strOut = "آغاز سال 1385 خورشيدي مبارك باد";
}
Obj.innerHTML = strOut;
}