// JavaScript Document

function get_url(uri){ 
	if(uri.indexOf("http://") != -1) uri = uri.split("http://")[1];
//	if(uri.indexOf("www.") != -1) uri = uri.split("www.")[1];
	return uri.split('/')[0];
}

function exec_ajax(dv,strURL){
var xmlHttp;
//	load_init(dv);
	if(window.XMLHttpRequest){ // For Mozilla, Safari, ...
		var xmlHttp = new XMLHttpRequest();
	}
	else if(window.ActiveXObject){ // For Internet Explorer
		var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlHttp.open('POST', strURL, true);
	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlHttp.onreadystatechange = function(){
		if (xmlHttp.readyState == 4){
			process(dv,xmlHttp.responseText);
		}
	}
	xmlHttp.send(strURL);
}

function loader_ajax(dv,strURL){
var xmlHttp;
//	load_init(dv);
	if(window.XMLHttpRequest){ // For Mozilla, Safari, ...
		var xmlHttp = new XMLHttpRequest();
	}
	else if(window.ActiveXObject){ // For Internet Explorer
		var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlHttp.open('POST', strURL, true);
	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlHttp.onreadystatechange = function(){

	if (xmlHttp.readyState == 4){
			process(dv,xmlHttp.responseText);
			Ajax_Callback();
		}
	}
	xmlHttp.send(strURL);
}

function display_block(x,state){
	hza = document.getElementById(x);
	hza.style.display = state;
}

function process(dv,str){
	div = document.getElementById(dv);
	div.innerHTML = str;
}

function load_init(dv){
	div = document.getElementById(dv);
	div.innerHTML = '';
}

