

window.onload = function () {
	
}

function sifr_load() {
	if(typeof sIFR == "function"){
		sIFR.replaceElement("h1", named({sFlashSrc: "/media/swf/districtthin.swf", sColor: "#1B8BD5", sWmode: "opaque", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=5"}));
		sIFR.replaceElement("h2", named({sFlashSrc: "/media/swf/districtthin.swf", sColor: "#1B8BD5", sWmode: "opaque"}));
	};
}

thisAlertFade = function() {
	setTimeout("fade();", 2500);
}

fade = function() {
	var animOut = new YAHOO.util.Anim( 'msgdivarea', { opacity: { to: 0 } }, 0.45, YAHOO.util.Easing.easeOut);
	animOut.animate();
	//disable_form(lastform, false);
	setTimeout("$(\"#msgdivarea\").remove();", 700);
}

function processResult(content) {
	
	field1 = "insert1";
	field2 = "insert2";

	if ($.trim(content) != "") {
					
		try {
			document.getElementById(field1).innerHTML = content;
		}
		catch (e) {
			alert(document.getElementById(field1).innerHTML);
		}
		// evaluate JSON
		if (document.getElementById('jsonjs')) {
			try {
				var json = eval("(" + document.getElementById('jsonjs').innerHTML + ")");	
			} catch (e) {
				alert('Could not evaluate JSON '+e);
			}
		} // end eval JSON
		// evaluate regular JS
		if (document.getElementById('ajxjs')) {
			try {
				eval(document.getElementById('ajxjs').innerHTML);	
			}
			catch (e) {
				alert('Could not evaluate javascript '+e);
			}
		} // end eval js
		// evaluate regular JS
		if (document.getElementById('notejs')) {
			try {
				eval(document.getElementById('notejs').innerHTML);	
			}
			catch (e) {
				alert('Could not evaluate javascript '+e);
			}
		} // end eval js

		/**
		if (disable === true) {
			
			if (!document.getElementById('msgdivarea') && !document.getElementById('cbform')) {
				disable_form(f, false);
			}

			if (resetform === true){
				f.reset();
			}
		}
		**/
	}

	document.getElementById(field2).innerHTML = "";
	return;
}