function OpenCalendar(formfield,language,type,date,mapdir) {

	url ='js/calendar.cfm?language=' + language + '&type=' + type + '&formfield=' + formfield + '&date=' + escape(date);
	win = window.open(url,'calendar','height=240,width=290');
	win.focus();

}

function doPopup(url, name, width, height) {
	winPopup = window.open(url, name, 'height=' + height + ',width=' + width + ',menubar=yes, scrollbars=yes, resizable=yes');
	winPopup.focus();
	return false;
}
	
function doPopup2(url, name, width, height) {
	winPopup = window.open(url, name, 'height=' + height + ',width=' + width + ',menubar=yes, resizable=yes, scrollbars=yes, status=yes, Session.EditMode=0');
	winPopup.focus();
	return false;
}

function printWindow() {
	window.print();
}

// preload
img_person=new Image();
img_person.src="../images/ico/person_sc.gif";
img_institution=new Image();
img_institution.src="../images/ico/institution_sc.gif";
img_document=new Image();
img_document.src="../images/ico/document_sc.gif";
img_project=new Image();
img_project.src="../images/ico/project_sc.gif";
img_event=new Image();
img_event.src="../images/ico/event_sc.gif";

function changeImage(name,new_image,show)
{
  document.images[name].src=new_image;

	if (show)
		var String = "add " + event.srcElement.alt;
	else
		var String = "";
		
	document.getElementById("SubmitInfoCaption").innerText=String;
}

function submitForm(obj) {
	document.getElementById(obj).submit();
}
