function pageLayout()
{
    //Called during page resize.
    //If the function exists in the local page it is called.
    if (window.setLayout)
    {
        setLayout();
    }
}

//Format a single digit date as two digits.
//For example, 9 becomes 09.
function format(value) {
	if (value < 10) {
		return "0" + value;
	} else {
		return value;
	}
}

//Display UTC and Local time updating every second.
function doTime() {
    //alert("doTime");
	months = new Array(12);
	months[0]  = "Jan";
	months[1]  = "Feb";
	months[2]  = "Mar";
	months[3]  = "Apr";
	months[4]  = "May";
	months[5]  = "Jun";
	months[6]  = "Jul";
	months[7]  = "Aug";
	months[8]  = "Sep";
	months[9]  = "Oct";
	months[10] = "Nov";
	months[11] = "Dec";

	days = new Array(7);
	days[0] = "Sun";
	days[1] = "Mon";
	days[2] = "Tue";
	days[3] = "Wed";
	days[4] = "Thu";
	days[5] = "Fri";
	days[6] = "Sat";

	strLocalTime = "YYYY-MM-DD-HH:mm:ss";
	strUTCTime = "YYYY-MM-DD-HH:mm:ss";

 	local = new Date();
 	tzOffset = local.getTimezoneOffset()/60;

	localMonth = local.getMonth();
	localDay = local.getDay();
	localDate = local.getDate();
	localYear = local.getFullYear();
	localHour = local.getHours();
	localMin = local.getMinutes();
	localSec = local.getSeconds();

	UTCDate = new Date(localYear, localMonth, localDate, localHour + (tzOffset/1), localMin + ((tzOffset%1)*60), localSec);
	UTCYear = UTCDate.getFullYear();

	//strLocalTime = format(localDate) + " " + months[localMonth] + " " + format(localYear) + " " + localHour + ":" + format(localMin) + ":" + format(localSec);
	//strUTCTime = format(UTCDate.getDate()) + " " + months[UTCDate.getMonth()] + " " + format(UTCYear) + " " + UTCDate.getHours() + ":" + format(UTCDate.getMinutes()) + ":" + format(UTCDate.getSeconds());
    
    //New
    strLocalTime = format(localYear) + "-" + format(localMonth + 1) + "-" + format(localDate) + " " + format(localHour) + ":" + format(localMin) + ":" + format(localSec);
	strUTCTime = format(UTCYear) + "-" + format(UTCDate.getMonth() + 1) + "-" + format(UTCDate.getDate()) + " " + format(UTCDate.getHours()) + ":" + format(UTCDate.getMinutes()) + ":" + format(UTCDate.getSeconds());

	
	var ctrl;
	ctrl = document.getElementById("timeLocal");
	if (ctrl != null) {
	    ctrl.innerHTML=strLocalTime;
	}
	ctrl = document.getElementById("timeUTC");
	if (ctrl != null) {
	    ctrl.innerHTML=strUTCTime;
	}
        
	setTimeout("doTime()", 1000);
}

function ax_Hide(ctrl)
{
	ctrl.style.visibility="hidden";
	ctrl.style.display="none";
}



