if (window!= top)
top.location.href=location.href

function jsInsert(text) {
	if (document.comForm.comment.createTextRange && document.comForm.comment.caretPos) {
		var caretPos = document.comForm.comment.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
		document.comForm.comment.focus();
	} else {
		document.comForm.comment.value += text;
		document.comForm.comment.focus();
	}
}

function hotRate(pic,m,r,v,skin)
{
if(window.XMLHttpRequest)
{
oRequest = new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
oRequest = new ActiveXObject("Microsoft.XMLHTTP");
}

oRequest.open("POST", "inc/hot_rate.asp", true);
oRequest.onreadystatechange = wmUpdate;

document.getElementById("hot_load").innerHTML = "<div style='padding-top: 55px;'><div align='center' style='background-image:url(../themes/"+skin+"/upLoadBG.jpg); width: 62px; height: 40px;'><img src='../themes/"+skin+"/wm_load.gif' vspace='1' width='32' height='32'></div></div>";
oRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
oRequest.send('uPic='+pic+'&mark='+m+'&cur_rat='+r+'&votes='+v);
}

function wmUpdate()
{
if(oRequest.readyState == 4)
{ 
if(oRequest.status == 200)
{
document.getElementById("hot_score").innerHTML = oRequest.responseText;
}
else
{
document.getElementById("hot_score").innerHTML = "Error Occurred";
}
}
}