function focusObj(obj){
	//if(obj.value==obj.getAttribute("defaultValue"))obj.value="";
}
function blurObj(obj){
	if(obj.value=="")obj.value = obj.getAttribute("defaultValue");
}

var cObj;
var hCalInt = null;
function showCalendar(obj){
	window.clearInterval(hCalInt)
	cObj = obj;
	cBody = document.getElementById("calBody");
	cBody.style.left=absoluteLeft(obj) + 'px';//.offsetLeft;
	cBody.style.top=parseInt(parseInt(absoluteTop(obj)) + parseInt(obj.offsetHeight)) +  'px' ;
	window.frames["calBody"].selectDate(obj.value,obj.attributes["minDate"].value,obj.attributes["maxDate"].value);
	cBody.style.display='block';
	cObj.select();
}
function hideCalendar(obj){
	if(!document.all || document.activeElement.id=='calBody') return;
	window.frames["calBody"].selectDate(obj.value,obj.attributes["minDate"].value,obj.attributes["maxDate"].value);
	doHideCal(obj);
}
function doHideCal(obj){
	window.clearInterval(hCalInt)
	cBody = document.getElementById("calBody");
	cBody.style.display='none';
	cObj.value = window.frames["calBody"].selDate;
	//alert(window.frames["calBody"].selDate)
	if(cObj.attributes["raiseChangeEvent"].value=='true')calChange(cObj);
}

function absoluteLeft(object)
{
	return object ? (object.offsetLeft ? object.offsetLeft - object.scrollLeft : 0) + absoluteLeft(object.offsetParent) : 0;
}

function absoluteTop(object)
{
	return object ? (object.offsetTop ? object.offsetTop - object.scrollTop : 0) + absoluteTop(object.offsetParent) : 0;
}
