loadingAnimation = "<div style='text-align: center;'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab<cfoutput>##</cfoutput>version=6,0,0,0' width='64' height='64'><param name='movie' value='img/loading.swf' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed name='loading' src='img/loading.swf' width='64' height='64' quality='high' wmode='transparent' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object></div>";
pendingAnimation = "<div style='float: right; text-align: center; background: transparent;'><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab<cfoutput>##</cfoutput>version=6,0,0,0' width='64' height='64'><param name='movie' value='img/loading.swf' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed name='loading' src='img/loading.swf' width='64' height='64' quality='high' wmode='transparent' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object></div>";
<!-- Begin
function uncache(url){
var d = new Date();
var time = d.getTime();

return url + "&time="+time;
}
    function makeRequest(url,loadInto,noAnimation) {
        var http_request = false;
	
	if (typeof noAnimation == "undefined") {
	    noAnimation = false;
	} else {
	    noAnimation = true;
	}

	if (!noAnimation) {
		document.getElementById(loadInto).innerHTML = loadingAnimation;
	}

        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/xml');
                // See note below about this line
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
        http_request.onreadystatechange = function() { alertContents(http_request,loadInto,noAnimation); };
        http_request.open('GET', uncache(url), true);
        http_request.send(null);
    }

    function alertContents(http_request,loadInto,noAnimation) {
        if (http_request.readyState > 0) {
            if (http_request.status == 200) {
		if (http_request.readyState == 4 && http_request.responseText.indexOf("<script") >= 0) {
		    	var scriptStart = 0;
			var scriptEnd = 0;
			script = http_request.responseText;
			scriptStart = script.indexOf(">",script.indexOf("<script")) + 1;
			scriptEnd = script.indexOf("</script",scriptStart);
			//alert(script.substring(scriptStart,scriptEnd));
			eval(script.substring(scriptStart,scriptEnd));
		}
		if (http_request.readyState < 4 && !noAnimation) {
			document.getElementById(loadInto).innerHTML = pendingAnimation + http_request.responseText;
		} else {
			document.getElementById(loadInto).innerHTML = http_request.responseText;
		}
		try {
			afterLoad();
	            } catch (e) {}
            } else {
	    	document.getElementById(loadInto).innerHTML = "<div style='height: 50%; vertical-align: bottom; font-weight: bold; color: red;'>An error has occured. <span class='jsAction' onclick='if (document.getElementById(&quot;errorDetails&quot;).style.display == &quot;none&quot;) { document.getElementById(&quot;errorDetails&quot;).style.display=&quot;block&quot; } else { document.getElementById(&quot;errorDetails&quot;).style.display=&quot;none&quot; }'>(show/hide)</span><div id='errorDetails' style='display: none;'><div><div>" + http_request.responseText + "</div></div>";
            }
	}

    }

    function closeOverlay() {
    	document.getElementById("overlay").innerHTML = "";
	document.getElementById("overlay").style.display = "none";
	document.getElementById("loading").style.display = "none";
	document.getElementById("dim").style.display = "none";
    }

function doToggle(url,elementID) {
	if (toggleElement(document.getElementById(elementID))) {
		makeRequest(url,elementID);
	}
}

function toggleElement(element) {
	if (element.style.display=="block") {
		element.style.display = "none";
		element.innerHTML = "";
		return false;
	} else {
		element.style.display = "block";
		return true;
	}
}

function toggleHide(element) {
	if (element.style.display=="block") {
		element.style.display = "none";
		return false;
	} else {
		element.style.display = "block";
		return true;
	}
}

function getForm(formName,loadInto) {
        var http_request = false;
	
        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/xml');
                // See note below about this line
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Giving up :( Cannot create an XMLHTTP instance');
            return false;
        }
	
	var submitStr = formName.elements[0].name + "=" + encodeURI(formName.elements[0].value);
	for (var x = 1; x < formName.elements.length; x++) {
		if (formName.elements[x].type != "checkbox" && formName.elements[x].type != "radio")
			submitStr += "&" + formName.elements[x].name + "=" + encodeURI(formName.elements[x].value);
		else if ((formName.elements[x].type == "checkbox" || formName.elements[x].type == "radio") && formName.elements[x].checked)
				submitStr += "&" + formName.elements[x].name + "=" + encodeURI(formName.elements[x].value);
	}
	
	document.getElementById(loadInto).innerHTML = loadingAnimation; 

        //http_request.onreadystatechange = function() { alertContents(http_request,loadInto); };
        //http_request.open('GET', uncache(url), true);
	http_request.onreadystatechange = function() { alertContents(http_request,loadInto); };
	http_request.open("POST", formName.action, true);
	http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http_request.setRequestHeader("Content-length", submitStr.length);
	http_request.setRequestHeader("Connection", "close");
	http_request.send(submitStr);
    }

// End -->
