// ------- FrameWork_X JS Functions -----------------------------------------
// --------Ajax Transport Functions -----------------------------------------
	
	function createRequestObject() {
		var ro;
		var browser = navigator.appName;
		if(browser == "Microsoft Internet Explorer"){
			ro = new ActiveXObject("Microsoft.XMLHTTP");
		}else{
			ro = new XMLHttpRequest();
		}
		return ro;
	}

	var http = createRequestObject();
	var ajaxResponse;
	var ajaxCallBack;
	var ajaxDivName;

	function sndFormReq(formName, action, divName, callBack) {
		if (formName == '') {
			return;
		}
		if (action == '') {
			return;
		}
		if (divName) {
			ajaxDivName = divName;
		}
		if (callBack) {
			ajaxCallBack = callBack;
		}
		var paramString = "";
		for(i=0; i<document.forms[formName].elements.length; i++) {
			if (document.forms[formName].elements[i].type == "radio" || document.forms[formName].elements[i].type == "checkbox") {
				if (document.forms[formName].elements[i].checked == true) {
					paramString += document.forms[formName].elements[i].name + '=' + encodeURI(document.forms[formName].elements[i].value) + encodeURI('&');
				}
			} else {
					paramString += document.forms[formName].elements[i].name + '=' + encodeURI(document.forms[formName].elements[i].value) + encodeURI('&');
			}
		}
		http.open('post', action);
		http.onreadystatechange = handleResponse;
		http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		http.setRequestHeader("Content-length", paramString.length);
		http.setRequestHeader("Connection", "close");
		http.send(paramString);
	}
	
	function sndLinkReq(action, divName, callBack) {
		if (action == '') {
			return;
		}
		if (divName) {
			ajaxDivName = divName;
		}
		if (callBack) {
			ajaxCallBack = callBack;
		}
		http.open('get', action);
		http.onreadystatechange = handleResponse;
		http.send(null);
	}
	
	function handleResponse() {
		if(http.readyState == 4){
			ajaxResponse = http.responseText;
			if(ajaxResponse && ajaxCallBack && ajaxDivName) {
				window[ajaxCallBack](ajaxResponse, ajaxDivName);
			}
		}
	}

// --------------------------------------------------------------------------

	var ajaxResponse = "false";
	
	function checkForm(data, div) {
		if (data.match("error:")) {
			document.getElementById(div).style.display = "block";
			document.getElementById(div).style.border = "1px dashed #FF0000";
			document.getElementById(div).style.padding = "10px";
			document.getElementById(div).style.margin = "5px 0 5px 0";
			document.getElementById(div).style.color = "#FF0000";
			document.getElementById(div).innerHTML = data;
		} else {
			document.forms[data].submit();
		}
	}
	
	function checkConfirm(type, url) {
		if (type) {
			if(confirm('Are you sure you want to delete this '+type+'?')) {
				location.href = url;	
			} else {
				return false;	
			}
		} else {
			return false;	
		}
	}

// --------------------------------------------------------------------------
// --------------------------------------------------------------------------

/*----------- Write your JS here -----------*/












//-------------------------------------------