var winModalWindow;
var gcModalDialogURL = "SorinCalendar.htm";
var gcModalDialogName = "Calendar";

function ShowSorinCalendar(ParamPassed)
{
	var r;
	var featuresString;
	if (document.all) {
		if (document.getElementById) {
			featuresString = "dialogHeight:225px;dialogWidth:220px;scroll:no;status:no;toolbar:no";
		}
		else
		{	
			featuresString = "dialogHeight:245px;dialogWidth:220px;scroll:no";
		}
		r = window.showModalDialog(gcModalDialogURL, 
							(typeof(ParamPassed)=="undefined" || ParamPassed=="")?
							"blank":ParamPassed, featuresString);
		return r;
	}
	else {
		alert("This feature is only available in Internet Explorer 4 and above at this stage.");
	}
}


function DateDialogClick(LP61305) {	
	var r = new String;
	var D = new Date();
	var s;

	r = LP61305.value;
	D = r.LF61305();
	
	if (navigator.appName=="Netscape"){		//NS
		// not supported at this stage - pop up a simple input box
		s=window.prompt("Please enter a date in the format dd mmm yyyy", D.LF61303(""));
		if (s!=null){
			LP61305.value = s;
			return true;
		}

	}
	else {				// IE
		r = ShowSorinCalendar(D.LF61303(""));
		if (typeof(r)=="undefined") r="";
		if (r.LF61304()) {
			D.setTime(Date.parse(r));
			LP61305.value = D.LF61303("");
			return true;
		}
		else {
			return false;
		}
	}
}