function httpRequest(){
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch(e)	{
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}catch(er) {
			xmlhttp = false;
		}
	}
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined'){
		try{
			xmlhttp = new XMLHttpRequest;
			xmlhttp.overrideMimeType('text/html');
		}catch(e){
			xmlhttp = false;
		}
	}
	if (!xmlhttp && window.createRequest){
		try{
			xmlhttp = window.createRequest;
		}catch(e){
			xmlhttp = false;
		}
	}
	return xmlhttp;
}

var div = 'none';
var anch ='none';
var header = 'none';

var http = new httpRequest;

function getPage(id,url,attrib_a,val_a,attrib_b,val_b,attrib_c,val_c,attrib_d,val_d,attrib_e,val_e,anchor){	
	header = url;
	div = id;
	anch = anchor;
	if (attrib_a) {header = header+'?'+attrib_a+'='+val_a;}
	if (attrib_b) {header = header+'&'+attrib_b+'='+val_b;}
	if (attrib_c) {header = header+'&'+attrib_c+'='+val_c;}
	if (attrib_d) {header = header+'&'+attrib_d+'='+val_d;}
	if (attrib_e) {header = header+'&'+attrib_e+'='+val_e;}
	//if (anchor) document.location.href = '#'+anchor;
	//http.open('GET',header,true);
	http.open('GET',header,true);
	http.onreadystatechange = handle;
	http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	http.send(null);
}

function getForm(id,url,nr,attrib_a,val_a,attrib_b,val_b,attrib_c,val_c,attrib_d,val_d,attrib_e,val_e,enctype){
	header = url;
	div = 'content';
	if (attrib_a) {header = header+'?'+attrib_a+'='+val_a;}
	if (attrib_b) {header = header+'&'+attrib_b+'='+val_b;}
	if (attrib_c) {header = header+'&'+attrib_c+'='+val_c;}
	if (attrib_d) {header = header+'&'+attrib_d+'='+val_d;}
	if (attrib_e) {header = header+'&'+attrib_e+'='+val_e;}
	//if (enctype == "multi") document.forms[nr].encoding = "multipart/form-data";
	document.forms[nr].method = "POST";
	http.open('POST',header, true);
	//alert(header);
	http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	http.onreadystatechange = handle;
	//alert(http.responseText);
	http.send(null);
}

function handle(){
	if(http.readyState == 4 && http.status != 404){
		document.getElementById(div).innerHTML = http.responseText;
		//if (anch != 'none') document.location = header+'#'+anch;
		
		//document.getElementById(div).innerHTML = 'content.html';
	}
}

/*con = getXMLRequester();
param=document.getElementById(data).name + '=' + document.getElementById(data).value;
con.open('POST',file,true);
con.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
con.setRequestHeader("Content-length", param.length);
con.open('POST',file,true);
con.send(param);
return false;*/