/****************************************
	COPYRIGHT BY SMACKWEB DESIGN (.NL)
*****************************************/


function clearValue(form, input, setText){
	eval ( "document." + form + "." + input + ".value='" + setText + "';" );
};


function checkBlur(form, input, current, getText){
	getValue = eval ( "document." + form + "." + input + ".value;" );

	if (getValue == "" || getValue == getText) {
		eval ( "document." + form + "." + input + ".value='" + current + "';" );
	} else {
		eval ( "document." + form + "." + input + ".value='" + getValue + "';" );
	};
};


function DropOrCrop(name){
	getStyle = eval ( "document.getElementById('" + name + "').style.display;" );

	if (getStyle == "none") {
		eval ( "document.getElementById('" + name + "').style.display='block';" );
	} else {
		eval ( "document.getElementById('" + name + "').style.display='none';" );
	};
};

function addCalendar(field, trigger, format) {
	new Calendar({
	  inputField: field,
	  dateFormat: format,
	  trigger: trigger,
	  bottomBar: false,
	  onSelect: function() {
	    var date = Calendar.intToDate(this.selection.get());
	    this.hide();
	  }
	});
}
