var xmlHttp
function showHint(username, password)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="members.php"
url=url+"?username="+username+"&password="+password
xmlHttp.onreadystatechange= function () { stateChanged ("login"); }
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
var xmlHttp
function error(){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="members.php"
url=url
xmlHttp.onreadystatechange= function () { stateChanged ("login"); }
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
var xmlHttp
function logout(){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="members.php"
url=url+"?logout=yes"
xmlHttp.onreadystatechange= function () { stateChanged ("login"); }
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
var xmlHttp
function addfaves(id, name){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="favorites.php"
url=url+"?id="+id+"&name="+name
xmlHttp.onreadystatechange= function () { stateChanged ("favegame"); }
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
var xmlHttp
function removefaves(removeid, name){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="favorites.php"
url=url+"?removeid="+removeid+"&name="+name
xmlHttp.onreadystatechange= function () { stateChanged ("favegame"); }
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
var xmlHttp
function addcom(rating, title, comment, game){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="comments.php"
url=url+"?rating="+rating+"&title="+title+"&comment="+comment+"&game="+game
xmlHttp.onreadystatechange= function () { stateChanged ("comment"); }
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
var xmlHttp
function editcomsubmit(title, comment, game, editid){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="comments.php"
url=url+"?edittitle="+title+"&editcomment="+comment+"&editgame="+game+"&editid="+editid
xmlHttp.onreadystatechange= function () { stateChanged ("commentedit"); }
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
var xmlHttp
function back(){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="comments.php"
url=url
xmlHttp.onreadystatechange= function () { stateChanged ("comment"); }
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
var xmlHttp
function deletecom(deleteid, game){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var r=confirm("Do you really wish to delete your comment?")
if (r==true)
{
var url="comments.php"
url=url+"?deleteid="+deleteid+"&game="+game
xmlHttp.onreadystatechange= function () { stateChanged ("comment"); }
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 
}
var xmlHttp
function editcom(editid, game){
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="comments.php"
url=url+"?editid="+editid+"&game="+game
xmlHttp.onreadystatechange= function () { stateChanged ("comment"); }
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function deletegame(deleteid){
var r=confirm("Do you really wish to delete this game?")
if (r==true)
{
window.location = "admin_editgame.php?deletegame="+deleteid
} 
}
function deletesrc(deleteid, src){
var r=confirm("Do you really wish to delete this games flash src?")
if (r==true)
{
window.location = "admin_editgame.php?deletesrc="+deleteid+"&game="+deleteid
} 
}
function deletethumb(deleteid, thumb){
var r=confirm("Do you really wish to delete this games thumb?")
if (r==true)
{
window.location = "admin_editgame.php?deletethumb="+deleteid+"&game="+deleteid
} 
}
function deletecomment(id){
var r=confirm("Do you really wish to delete this comment?")
if (r==true)
{
window.location = "admin_comments.php?deletecomment="+id
} 
}
function deletecategory(id){
var r=confirm("Do you really wish to delete this category?")
if (r==true)
{
window.location = "admin_editcat.php?deletecategory="+id
} 
}
function deletelink(id){
var r=confirm("Do you really wish to delete this link?")
if (r==true)
{
window.location = "admin_editlink.php?deletelink="+id
} 
}
function deleteuser(id){
var r=confirm("Do you really wish to delete this user?")
if (r==true)
{
window.location = "admin_users.php?deleteuser="+id
} 
}
function stateChanged(changelocation) 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById(changelocation).innerHTML=xmlHttp.responseText 
} 
} 
function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
} 