var site_url = 'http://pics.drumza.com';

function showInvHint(str)
{
if (str.length==0)
{
document.getElementById("topHint").innerHTML="";
document.getElementById("topHint").style.display="none";
return;
}
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
var url=site_url+"/includes/sfk.php";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}

function stateChanged()
{
if (xmlHttp.readyState==4)
{
document.getElementById("topHint").style.display="block";
document.getElementById("topHint").innerHTML=xmlHttp.responseText;
}
}

function invertAll(headerfield, checkform, mask)
{
for (var i = 0; i < checkform.length; i++)
{
if (typeof(checkform[i].name) == "undefined" || (typeof(mask) != "undefined" && checkform[i].name.substr(0, mask.length) != mask))
continue;
if (!checkform[i].disabled)
checkform[i].checked = headerfield.checked;
}
}

function set_done_allert(alert) {
	document.getElementById("done_alert").innerHTML="<div style='background:red;color:white;'><b>"+alert+"</b></div>";
	setTimeout("unset_done_allert()",5000);
}

function unset_done_allert() {
	document.getElementById("done_alert").innerHTML="&nbsp;";
}
