var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

function submit(id,code) {
 code=escape(escape(code))
 xmlhttp.open("GET", "savecode.php?id="+id+"&code="+code);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById('show').innerHTML = xmlhttp.responseText
  }
 }
 xmlhttp.send(null)
}

function rlsrss(id,user) {
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
 xmlhttp.open("GET", "rlsrss.php?id="+id+"&username="+user);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   if(xmlhttp.responseText=='success') document.getElementById('check'+id).innerHTML = '<img src=../images/system/check.gif border=0>'
   else document.getElementById('check'+id).innerHTML = '<img src=../images/system/fail.gif border=0>'
  }
 }
 xmlhttp.send(null)
}

function del(id,type,site) {
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
 var conf = confirm('Are you sure you want to delete this entry?');
 if(conf == true) {
 xmlhttp.open("GET", type+".php?delete="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.location = type+".php?site="+site;
  }
 }
 xmlhttp.send(null)
 }
}

function activate(id,type,site) {
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
 xmlhttp.open("GET", type+".php?activate="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.location = type+".php?site="+site;
  }
 }
 xmlhttp.send(null)
}
