function createXMLHttpRequest()
{try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){}
try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}
try{return new XMLHttpRequest();}catch(e){}
alert("XMLHttpRequest not supported");return null;}
var xhReq=createXMLHttpRequest();function fnCheck(code,site_url)
{if(code.length>=5)
{xhReq.open("GET",site_url+"checkcode.php?code="+code,true);xhReq.onreadystatechange=onSumResponse2;xhReq.send(null);}
return false;}
function onSumResponse2()
{if(xhReq.readyState!=4){return;}
var serverResponse=xhReq.responseText;if(serverResponse=='N')
{var msg="<font color=red>Security Code You Entered Was Wrong</font>";document.forms[1].seccode.value='N';var cell=document.getElementById("chg");cell.style.display='';}
else
{var msg="";document.forms[1].seccode.value='';var cell=document.getElementById("chg");cell.style.display='none';}
var cell=document.getElementById("sec");cell.innerHTML=msg;}
var num=1;function fnChange_Code(frm,site_url)
{var im=new Image(150,31);im.src=site_url+"captcha.php?num="+num;document.getElementById("ranimg").innerHTML='';document.getElementById("ranimg").appendChild(im);num++;frm.security_code.value="";document.getElementById("sec").innerHTML='';}
function fnGet_AmazonReviews(isbn,siteURL)
{var cell=document.getElementById("amazonReviews");cell.innerHTML='<table width="100%"  border="0" align="left" cellpadding="2" cellspacing="1"><tr><td colspan="3" align="center" class="white_bg" height="18"></td></tr><tr><td colspan="4" align="center" class="white_bg" height="18"><img src="http://im.xsm.us/getImage.gif" border=0></td></tr></table>';reqUrl=siteURL+"amazon_reviews.php?isbn="+isbn+"&url="+siteURL;xhReq.open("GET",reqUrl,true);xhReq.onreadystatechange=onReviewsResponse;xhReq.send(null);}
function onReviewsResponse()
{if(xhReq.readyState!=4){return;}
var serverResponse=xhReq.responseText;var cell=document.getElementById("amazonReviews");cell.innerHTML=serverResponse;}
