var IE = (document.all) ? 1 : 0;
var DOM = 0;
if (parseInt(navigator.appVersion) >=5) {DOM=1};

function hidespon(kvo)
{
if (DOM) {
var viewer = document.getElementById("spon"+kvo);
viewer.innerHTML="";
}
else if(IE) {
document.all["spon"+kvo].innerHTML="";
}

var xmlhttp =  new XMLHttpRequest();
xmlhttp.open('POST', 'hidespon.html', true);
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send('id='+kvo);
}

function ratesponsor(kvo,theform)
{
var selkvo=theform.rank.value;

if(selkvo==0)
 alert('Please, Select Rating value!');
else
{
if (DOM) {
var viewer = document.getElementById("spvote"+kvo);
viewer.innerHTML="<b>Vote Successfull</b>";
}
else if(IE) {
document.all["spvote"+kvo].innerHTML="<b>Vote Successfull</b>";
}

var xmlhttp =  new XMLHttpRequest();
xmlhttp.open('POST', 'votespon.html', true);
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send('id='+kvo+':'+selkvo);
}

return false;
}

function shfcomments(spid)
{
resultsWindow=window.open('sponcomments.html?id='+spid,'sp'+spid,'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=600,left = 184.5,top = 166.5');
resultsWindow.focus();
}

function check_comment()
{
if(document.myform.comments.value=='')
{
alert('Enter Your Comments');
document.myform.comments.focus();
return false;
}
else
 return true;
}

function addspon(kvo)
{
if (DOM) {
var viewer = document.getElementById("spon"+kvo);
viewer.innerHTML="";
}
else if(IE) {
document.all["spon"+kvo].innerHTML="";
}

var xmlhttp =  new XMLHttpRequest();
xmlhttp.open('POST', 'addspon.html', true);
xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlhttp.send('id='+kvo);
}