var divResult = '';

function sendRequest(url,div_result) {
	xmlHttp = GetObject(); 
	divResult = div_result;
	xmlHttp.onreadystatechange = stateChange; 
	xmlHttp.open('GET', url, true);
	xmlHttp.send(null);
}

function GetObject() {
	var xmlHttp=null;
	try {
	// Firefox, Opera 8.0+, Safari
	xmlHttp=new XMLHttpRequest();
	} catch (e) {
		// Internet Explorer
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}

function stateChange() {

	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		responseText=xmlHttp.responseText;
		if (divResult!='')
			document.getElementById(divResult).innerHTML=responseText;
	} 
}
function chooseMenu() {
	links = document.location;
	str = new String(links);
	//alert(str);
	str_mod = str.substr(str.indexOf('#')+1, str.length);
	
	var arr_links = new Array("home", "intro", "news", "formality", "docs", "documents", "rooms_news", "contact", "achievement");
	for ( j = 0; j < arr_links.length; j++ ) {		
		document.getElementById('menu_'+arr_links[j]).className = 'menu_left_not';
	}
	document.getElementById('menu_'+str_mod).className = 'menu_left';
}
//en scroll text
	function scroll_text_left(div_text) {
		div_text.scrollLeft = 600;
	}
	function scroll_text_right(div_text) {
		div_text.scrollLeft = 0;
	}