	function updatepage(str, divid){
		document.getElementById(divid).innerHTML = str;
	}

	function updatestate(str){
        if(document.getElementById('path_way')) document.getElementById("path_way").innerHTML = str;
	}

	function xmlhttpPost(strURL, divid) {
		var self = this;
		var XmlHttp = null;
		updatestate("<font color=#FFFFFF><B>Atidaromas puslapis...</B></font>");
		// Mozilla/Safari
		if (window.XMLHttpRequest) {
			XmlHttp = new XMLHttpRequest();
		}
		// IE
		else if (window.ActiveXObject) {
			XmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		XmlHttp.open('GET', strURL, true);
		XmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		XmlHttp.onreadystatechange = function() {
			if (XmlHttp.readyState == 4) {
				updatepage(XmlHttp.responseText, divid);
			}
		}
		XmlHttp.send(null);
	}

	function xmlhttpOpenMenu(strURL) {
		var strMenuURL;
		var strPathWayURL;		
		strMenuURL=strURL.replace('content_serv.php', 'menu_serv.php');
		strMenuURL=strMenuURL.replace('option=com_content', 'option=none');
		strMenuURL=strMenuURL.replace('option=com_search', 'option=none');
		strPathWayURL=strURL.replace('content_serv.php', 'pathway_serv.php');
		strPathWayURL=strPathWayURL.replace('option=com_content', 'option=none');		
		strPathWayURL=strPathWayURL.replace('option=com_search', 'option=none');				
        if(document.getElementById('menu_div')) xmlhttpPost(strMenuURL,"menu_div");
        if(document.getElementById('path_way')) xmlhttpPost(strPathWayURL,"path_way");
		if (strURL=="") updatestate("");
	}

    function xmlhttpOpen(strURL, divid) {
//		xmlhttpPost(strURL, divid);
		xmlhttpOpenMenu(strURL);
//		if (strURL=="")	updatestate("");
	}
	

