/* Use this syntax in the HTML:
   <a href="openWin('[url]',[width],[width])">xxx</a> */
function openWin(theURL,width,height) {
	window.open(theURL,'popup',"width="+width+",height="+height+",toolbar=no,menubar=no,status=no,scrollbars=no,resize=no,top=50,left=50");
}

function calendar(theForm,theField){
	windowURL = 'calendar.cfm?formName=' + theForm + '&fieldName=' + theField;
	if(window.screen){

    cw = Math.floor(screen.availWidth/2);
 	  ch = Math.floor(screen.availHeight/2);

		var newWind=window.open(windowURL,'remote','width=165,height=210,top=' + ch + ',left=' + cw);
		if (newWind.opener == null){ 
		newWind.opener = window;
		}
	}
}

