function dax_control(this_dax,effect_type) {
	Effect.toggle(this_dax,effect_type,{duration:.5});
}

function slide_toggle(tab){
	set = tab.id.substr(0,tab.id.indexOf("_tab"));
	panel = $(set+"_panel");
	control = $(set+"_control");
	new Effect.toggle(panel,'slide');
	if(control.className.indexOf('up') >= 0){
		control.className = 'control down';
		tab.className = 'slide_header down';
	}else{
		control.className = 'control up';
		tab.className = 'slide_header up';
	}
}

changed = false;
function initialize_form_checker(form){
	for (i=0; i<$(form).elements.length; i++){
		$(form).elements[i].onchange = function(){
			changed = true;
			if (form == "contact_widget"){
				$(form).name = form;
			}
		};
	}
}

window.onbeforeunload = function(){
	//Other text in the dialogue CANNOT be changed. They are browser specific.
	if (changed == true) return "You have started filling out a form without submitting it.";
}