// JavaScript Document


function openCalendar(FormElement) {
	var calendarwindow; 
	url = "calendar.html?formname=resform&formelement=" + FormElement;
	calendarwindow = window.open(url,"calendar","toolbar=no,width=200,height=144,top=50,left=50,status=no,scrollbars=no,resize=no,menubar=no");
	calendarwindow.focus();
}




hs.graphicsDir = './highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.wrapperClassName = 'draggable-header';
hs.preserveContent = false;

/**
* Function to submit a HTML form into a Highslide iframe popup.
*/
function submitToHighslide(form) {

    // identify the submit button to start the animation from
    var anchor;
    for (var i = 0; i < form.elements.length; i++) {
    	if (form.elements[i].type == 'submit') {
			anchor = form.elements[i];
			break;
		}
	}

	// open an expander and submit our form when the iframe is ready
	hs.align = 'center';
        hs.showCredits = false;
        hs.overrides.push('onAfterExpand');
	hs.htmlExpand(anchor, {
		objectType: 'iframe',
		src: 'about:blank',
		width: 1000,
		height: 735,
		objectHeight: 750,
		onAfterExpand: function(expander) {
			form.target = expander.iframe.name;
			form.submit();
		}
	});

	// return false to delay the submit until the iframe is ready
	return false;
}

