    var isIE = document.all?true:false;
    var isNS = document.layers?true:false;
    function ShowClock(form){
	//var appid	= document.master.appid.value;
        var openwindow;
	if (!openwindow || openwindow.closed){
		win ="window.open('/{appid}/libraries/html/clock.html?pb="+form+"','Calendar','left=200,top=200,width=150,height=125,scrollbars=no,toolbar=no,menu=no')";
		openwindow=eval(win);
	}else{openwindow.focus()}
    }
    
    function onlyDigits(e,decReq) {
	var key = (isIE) ? window.event.keyCode : e.which;
	var obj = (isIE) ? event.srcElement : e.target;
	var isNum = (key > 47 && key < 58) ? true:false;
	var dotOK = (key==46 && decReq=='decOK' && (obj.value.indexOf(".")<0 || obj.value.length==0)) ? true:false;
	window.event.keyCode = (!isNum && !dotOK && isIE) ? 0:key;
	e.which = (!isNum && !dotOK && isNS) ? 0:key;
	return (isNum || dotOK);
}