// JavaScript Document
function getOption(url,type){
	document.frmAjax.type.value=type;
	xmlhttpPost(url,type);
}
function xmlhttpPost(strURL,type,flag) {
    if(flag > 0) {
		toggle = 1;
		}
    if(!flag && toggle > 0) {
	return;
	}
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText,type);
        }
    }
    self.xmlHttpReq.send(getquerystring(type));
}

function getquerystring(type) {
	if(type == 'show_link') {
		var type = type;
		qstr = 'type=' + escape(type);  
	}
	return qstr;
}

function updatepage(str,type){
	if(type == 'show_link') {
		 document.getElementById("sublink_display").innerHTML = str;
	}
}

