function getHTTP(){
var xmlhttp=false;
if (window.XMLHttpRequest)
{
  try{
  xmlhttp = new XMLHttpRequest();
  } catch(e) {
	xmlhttp = false;  
  }
} else if (window.ActiveXObject)
  {
	  try{
 		 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch(e){
		  xmlhttp = false;
	  }
  }
  return xmlhttp;
}//end of function getHTTP
function getData(url, objid){
	xmlhttp = getHTTP();
	xmlhttp.open("GET", url, true);
	ret = "";
	xmlhttp.onreadystatechange= function() {
		if (xmlhttp.readyState==4) {
			if (xmlhttp.status==200){
				obj = document.getElementById(objid);
				if (obj){
					obj.innerHTML = xmlhttp.responseText;
				}
			} else obj.innerHTML = "Can not render !";//end if status
		}//end if
	}//end of function
	xmlhttp.send(null);
}//end of getData
function refreshBlock(id, st, ed, pid){
	obj = document.getElementById("block"+id);
	if (obj){
		obj.innerHTML = "loading...";
	}
	if (!pid) pid="";
	getData("../RSS/rss.render.php?blockid="+id+"&status="+st+"&editable="+ed+"&pageid="+pid, "block"+id);	
}
function getRSSURL(id, st, ed){
	return "../RSS/rss.render.php?blockid="+id+"&status="+st+"&editable="+ed;	
}
function loadBlock(xmlobj, objid, st, ed){
	xmlobj.open("GET", "../RSS/rss.render.php?blockid="+objid+"&status="+st+"&editable="+ed, true);
	ret = "";
	xmlobj.onreadystatechange= function() {
		if (xmlobj.readyState==4) {
			if (xmlobj.status==200){
				obj = document.getElementById(objid);
				if (obj){
					obj.innerHTML = xmlobj.responseText;
				}
			} else obj.innerHTML = "Can not render !";//end if status
		}//end if
	}//end of function
	xmlobj.send(null);
}//end of loadBlock
function showData(frame, canvas){
	fobj = document.getElementById(frame);
	if (!fobj) return;
	if (fobj.contentWindow.document.body.innerHTML=="") return;
	cobj = document.getElementById(canvas);
	if (!cobj) return;
	cobj.innerHTML = fobj.contentWindow.document.body.innerHTML;
	window.scrollTo(0,0);
}
function hidestatus(){
	window.status='';
	return true;
}
function mycontext(){
	window.status='';
	return false;
}
if (document.layers) document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT | Event.MOUSEDOWN)
document.onmouseover=hidestatus;
document.onmouseout=hidestatus;
document.onmousedown=hidestatus;
document.onactivate=hidestatus;
document.onbeforeactivate=hidestatus;
document.onbeforedeactivate=hidestatus;
document.ondeactivate=hidestatus;
document.oncontextmenu = mycontext;
window.defaultStatus = "#";