function doClock() {
        now= new Date();

        // time 
        hours= now.getHours();
        minutes= now.getMinutes();
        seconds= now.getSeconds();
        timeStr= "" + hours;
        timeStr+= ((minutes < 10) ? ":0" : ":") + minutes;
        timeStr+= ((seconds < 10) ? ":0" : ":") + seconds;
        //document.clock.time.value = timeStr;

        // date
        date= now.getDate();
        month= now.getMonth()+1;
        year= now.getYear();

        
		dateStr =  month +"/";
		dateStr += ((date < 10) ? "0" : "") + date ;
        dateStr+= "/" + year;
		document.getElementById("spanClockPC").innerHTML = dateStr + " " + timeStr;
        Timer= setTimeout("doClock()",1000);
}	
function fncReloadIframe() {
	var f = document.forms[0];
	var o = document.getElementById('iframeMain');
	if (o) {
		//document.getElementById('iframeMain').src = 'blank.html';
		document.getElementById('iframeMain').src = 'http://ida.com.au/cfa/firemailv2.asp?rnd='+document.getElementById("spanClockPC").innerHTML;
		//document.getElementById('iframeMain1').src = 'blank.html';
		document.getElementById('iframeMain1').src = 'module_010_CheckTime.asp?dtm='+document.getElementById("spanClockPC").innerHTML;
		document.getElementById('iframeEmail').src = 'module_080_SendEmails.asp?dtm='+document.getElementById("spanClockPC").innerHTML;
		document.getElementById('iframeSMS').src   = 'module_100_SendSMS.asp?dtm='+document.getElementById("spanClockPC").innerHTML;

} else {
		alert('Not Loaded');
	}
	Timer= setTimeout("fncReloadIframe()",f.refreshRate.value * 60 * 1000);
	
}
function fncAddToLog(strAction) {
	parent.document.getElementById("spanLog").innerHTML += strAction + "<BR>";
	arrLogEntries = parent.document.getElementById("spanLog").innerHTML.split("<BR>");
	//alert(arrLogEntries.length);
	var strTemp ="";
	if (arrLogEntries.length > 34) {
		for(var i=arrLogEntries.length ;i>(arrLogEntries.length-32);i--) {
			if (arrLogEntries[i]) {
				strTemp =  arrLogEntries[i] + "<BR>" + strTemp;
			}
		}
		parent.document.getElementById("spanLog").innerHTML = strTemp;
	}
}
//-->
