// breakout out of frames
if (top!=self) top.location.href=location.href;

//disable right-click
IE4plus = (document.all) ? true : false;
NS4 = (document.layers) ? true : false;
function clickIE() { return false; }
function clickNS(e) { if (e.which==2 || e.which==3) { return false; } }
if (!IE4plus) {
 document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
 document.onmousedown=clickNS;
 document.onmouseup= clickNS;
 document.oncontextmenu=clickIE; // For NS 6+
} else {
 document.onmouseup=clickIE;
 document.oncontextmenu=clickIE;
}

// Ajax variable
function F_Ajax_getXMLHttpRequest() { 

	var result;
	if (window.XMLHttpRequest) {
		result=new XMLHttpRequest;
	} else {
		try {
			result=new ActiveXObject("Msxml2.XMLHTTP"); 
		} catch (e) {
			try {
				result=new ActiveXObject("Microsoft.XMLHTTP"); 
			} catch (e) {
				result=false; 
			}
		}
	}
	return result;
}

//Ajax call
function F_Ajax_callXMLHttpRequest(URL,qry,target) { 

	var xmlhttp;
	function printresult() {
		if(xmlhttp.readyState==4 && xmlhttp.status==200) {
			document.getElementById(target).innerHTML=xmlhttp.responseText;
		}
	}
	if (!xmlhttp) xmlhttp=F_Ajax_getXMLHttpRequest();
	if (!xmlhttp) output;
	//var qry='S=LF&F=RM&P=reserve|valleeo@yahoo.com|2'; 
	//var URL='F_tag_API.php'; 
	xmlhttp.open('POST',URL,true);
	xmlhttp.onreadystatechange=printresult;
	xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xmlhttp.send(qry);
	return result;
}

