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 removeElement(div){
var d1=document.getElementById(div).parentNode;
var d2=document.getElementById(div);
d1.removeChild(d2);
} 

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.jpg border=0>'
   else document.getElementById('check'+id).innerHTML = '<img src=../images/system/fail.jpg border=0>'
  }
 }
 xmlhttp.send(null)
}

function disable(page,id) {
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", "enable.php?page="+page+"&id="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById('line'+id).style.backgroundImage = 'url(../images/system/line2.jpg)';
   document.getElementById('enimg'+id).src = '../images/system/enable.jpg';
   document.getElementById('enable'+id).onclick = function() {enable(page,id)};
  }
 }
 xmlhttp.send(null)
}

function enable(page,id) {
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", "enable.php?page="+page+"&id="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById('line'+id).style.backgroundImage = 'url(../images/system/line.jpg)';
   document.getElementById('enimg'+id).src = '../images/system/disable.jpg';
   document.getElementById('enable'+id).onclick = function() {disable(page,id)};
  }
 }
 xmlhttp.send(null)
}

function del(page,id) {
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", "delete.php?page="+page+"&id="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   var objTree = document.getElementById('box');
   objTree.removeChild(document.getElementById('li'+id));
  }
 }
 xmlhttp.send(null)
}
}

function reset(page,id) {
document.getElementById('reset'+id).innerHTML = '<img src=../images/system/load3.gif>';
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 reset the ratings?');
if(conf == true) {
 xmlhttp.open("GET", page+"_reset.php?id="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById('reset'+id).innerHTML = xmlhttp.responseText
  }
 }
 xmlhttp.send(null)
}
}

function release(id,page) {
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 release this entry?');
if(conf == true) {
 xmlhttp.open("GET", page+"_release.php?id="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   var objTree = document.getElementById('box');
   objTree.removeChild(document.getElementById('li'+id));
  }
 }
 xmlhttp.send(null)
}
}

function disable(page,id) {
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", "enable.php?page="+page+"&id="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById('line'+id).style.backgroundImage = 'url(../images/system/line2.jpg)';
   document.getElementById('enimg'+id).src = '../images/system/enable.jpg';
   document.getElementById('enable'+id).onclick = function() {enable(page,id)};
  }
 }
 xmlhttp.send(null)
}

function getcontent(id,box) {
document.getElementById('content'+box).innerHTML = '<p align=center><img src=../images/system/load.gif></p>';
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", "rsscontent_get.php?id="+id+"&boxes="+box);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById('content'+box).innerHTML = xmlhttp.responseText;
  }
 }
 xmlhttp.send(null)
}

function addcontent(id,title,link,description,rssimage,uname,box,boxes) {
var category = document.getElementById('cat'+box).value;
document.getElementById('content'+boxes).innerHTML = '<p align=center><img src=../images/system/load.gif></p>';
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", "rsscontent_get.php?id="+id+"&title="+title+"&description="+description+"&link="+link+"&rssimage="+rssimage+"&uname="+uname+"&category="+category);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById('content'+boxes).innerHTML = xmlhttp.responseText;
  }
 }
 xmlhttp.send(null)
}

function doit(page,act,id) {
document.getElementById(act+id).innerHTML = '<img src=../images/system/load3.gif>';
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", page+"_"+act+".php?id="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById(act+id).innerHTML = xmlhttp.responseText
  }
 }
 xmlhttp.send(null)
}

function doit_ask(page,act,id) {
document.getElementById(act+id).innerHTML = '<img src=../images/system/load3.gif>';
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 do this?');
if(conf == true) {
 xmlhttp.open("GET", page+"_"+act+".php?id="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById(act+id).innerHTML = xmlhttp.responseText
  }
 }
 xmlhttp.send(null)
 }
}

function blackdel(id) {
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 and blacklist this entry?');
if(conf == true) {
 xmlhttp.open("GET", "partner_blackdel.php?id="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   var objTree = document.getElementById('box');
   objTree.removeChild(document.getElementById('li'+id));
  }
 }
 xmlhttp.send(null)
}
}

function getstats(id,box,type) {
document.getElementById('content'+box).innerHTML = '<p align=center><img src=../images/system/load.gif></p>';
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", "partner_"+type+".php?id="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById('content'+box).innerHTML = xmlhttp.responseText;
  }
 }
 xmlhttp.send(null)
}

function getplugs(id,box) {
document.getElementById('content'+box).innerHTML = '<p align=center><img src=../images/system/load.gif></p>';
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", "showplugs.php?domain="+id);
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   document.getElementById('content'+box).innerHTML = xmlhttp.responseText;
  }
 }
 xmlhttp.send(null)
}

function confrm(page) {
var conf = confirm('Are you sure you want to do this?');
if(conf == true) {
var newdiv = document.createElement('div');
newdiv.setAttribute('class', 'showstatus');
newdiv.setAttribute('className', 'showstatus');
newdiv.setAttribute('id', page);
newdiv.innerHTML = '<p align=center><img src=../images/system/load4.gif></p>';
document.body.appendChild(newdiv);
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", page+".php?do=yes");
 xmlhttp.onreadystatechange=function() {
  if (xmlhttp.readyState==4) {
   newdiv.innerHTML = '<div id="statustext">'+xmlhttp.responseText+'</div><div id="closestatus"><a href="#" onclick="removeElement(\''+page+'\');" id="link">X</a></div>';
  }
 }
 xmlhttp.send(null)
}
}