// JavaScript Document
function send_data(url){
	createXMLHttpRequest();
	pForm = document.forms[0];
	var pBody = getValueElement(pForm);
	xmlHttp.open("post",url,true);
	xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = function(){
		if(xmlHttp.readyState == 4){
			if(xmlHttp.status == 200){
				document.getElementById('result_box').innerHTML = xmlHttp.responseText;
			}
		}
	};
	xmlHttp.send(pBody);
}
function getValueElement(pForm){
	var len = pForm.elements.length;
	var nParams = new Array();
	for(i=0; i<len; i++){
		var pParam = encodeURIComponent(pForm.elements[i].name);
		pParam += '=';
		pParam += encodeURIComponent(pForm.elements[i].value);
		nParams.push(pParam);
	}
	return nParams.join('&');
}

function getData(url){
	createXMLHttpRequest();
	xmlHttp.open("GET", url, true);
	xmlHttp.onreadystatechange = function(){
		if(xmlHttp.readyState == 4){
			if(xmlHttp.status == 200){
				showLightbox(xmlHttp.responseText);
			}
		}
	};
	xmlHttp.send(null);
}
