function OpenCal(evt, src, title)
{
    OpenCalendarPopup(src.replace("PageBody1_Webtop_MainContent_","").replace(/_/g,":"),1, evt.screenX + 10, evt.screenY - 15, (title==null)?"Calendar":title, document.getElementById(src).value);
}
function OpenCalNoContainer(evt, src, title)
{
    OpenCalendarPopup(src.replace("PageBody1_Webtop_MainContent_","").replace(/_/g,":"),0, evt.screenX + 10, evt.screenY - 15, (title==null)?"Calendar":title, document.getElementById(src).value);
}
function OpenCalendar(evt, src, title, js)
{
	/*
	if(evt.screenY + 170 > screen.height)
		screenY = evt.screenY - 195;
	else
		screenY = evt.screenY + 15;
    OpenCalendarPopup(src,1, evt.screenX - 150, screenY, (title==null)?"Calendar":title, document.getElementById('PageBody1_Webtop_MainContent_' + src.replace(/:/g,"_")).value, js);
	*/
	currentValue=document.getElementById('PageBody1_Webtop_MainContent_' + src.replace(/:/g,"_")).value;
	url="/include/js/calendar/CalendarPopUp.aspx?src=" + src + "&c=1&current=" + currentValue + "&title=" + title + "&js=" + js;
	OpenCalendarPopup(url);
}


function OpenCalendarPopup(url){
	openPopup(url, 'no', 'yes', 170, 155);
}

/*
function OpenCalendarPopup(src, inContainer, screenX, screenY, title, currentValue, js)
{
	// inContainer = 0 --> not using webtop template control
	// inContainer = 1 --> using webtop template control
    popupWindow = window.open("/include/js/calendar/CalendarPopUp.aspx?src=" + src + "&c=" + inContainer + "&current=" + currentValue + "&title=" + title + "&js=" + js,
                "popupcal", 
                "height=155, width=170, left=" + screenX + ", top=" + screenY + ", " +
                    "location=no, menubar=no, resizable=no, " +
                    "scrollbars=no, titlebar=no, toolbar=no",
                true);
    if (popupWindow) { 
		popupWindow.focus(); 
	}else{
		alert('Please configure your popup blocker to allow popups from this site.')
	}	                
}
*/