// http://www.asptools.biz/datepicker.asp
// OpenCalendar
// The OpenCalendar function can be used as a shortcut to the actual window.open statement that 
// ultimately must be issued.  OpenCalendar includes a rudimentary popup blocker detection
// system that unfortunately won't always work because of a wide variety of methods employed
// to block popup windows.  You may want to inform your guests that popup blockers should be
// disabled for your site for proper functioning.

function OpenCalendar(inVariable, inField, inCallback, inDefault, inDayStyle, inBlnClose, inBlnWeekends)
{
	var strURL;
	var hWnd; 
	
	if (inVariable) strURL = "inVariable=" + inVariable;
	else if (inField) strURL = "inField=" + inField;
	else if (inCallback) strURL = "inCallback=" + inCallback;
	else strURL = "invalid=True";
	
	if (inDefault) strURL += "&inDefault=" + inDefault;
	if (inBlnClose) strURL += "&inBlnClose=" + inBlnClose;
	if (inBlnWeekends) strURL += "&inBlnWeekends=" + inBlnWeekends;
	if (inDayStyle) strURL += "&inDayStyle=" + inDayStyle;
	
	hWnd = window.open( "/datePicker/ASPDatePicker.asp?" + strURL, "ASPDatePicker",
		"menubar=no,toolbar=no,location=no,scrollbars=no,resizable=no,status=no,width=199,height=133");
		
	if (!hWnd) alert("Please disable popup blockers to use the Date Picker calendar.");
}

