var popWidth=620; var popHeight=400; function confirmDelete(href) { if(confirm("Are you sure you want to delete?")) { window.location=href; return true; } } function confirmed(href) { if(confirm("Are you sure?")) { window.location=href; return true; } } /* this function is not likely to be used so it is commented. please use openPopWin function openNewWin(url,winName,features ) { window.open(url,winName,features); } */ function closeWin() { window.close(); } function autoCloseWin(message) { alert (message); setTimeout("closeWin()",5000); } function NewWindow(mypage,myname,w,h,scroll){ LeftPosition = (screen.width) ? (screen.width-w-20) : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable' win = window.open(mypage,myname,settings) } function openPopWin(url,winName, winHeight) { if(winHeight>0) popHeight=winHeight; NewWindow(url,winName, popWidth , popHeight , 'yes'); } var xmlhttp; var cmtMsg; var ratMsg; var rateSiteID; function rateit(ratevalue,siteID) { if(window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else if (window.ActiveXObject) {// code for IE5 and IE6 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } else { alert("Your browser does not support XMLHTTP."); } ratMsg = "rateMsg"; rateSiteID=siteID; var fileurl = 'http://www.high-quality-links.com/dofollow/add-rate.php?ratevalue='+ratevalue+'&siteID='+siteID; //This is the path to the file we just finished making xmlhttp.open('GET', fileurl, true); //Open the file through GET, and add the page we want to retrieve as a GET variable updateCurrentRating(ratevalue,siteID); xmlhttp.onreadystatechange = handlehHttpReceivedata; xmlhttp.send(null); //Nullify the XMLHttpRequest } function handlehHttpReceivedata() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { results = xmlhttp.responseText; //the fields are seperated by ## if(results.match("##success##")=="##success##") { var responseText = results.replace(/##success##/, ""); document.getElementById("rateCountMsg"+rateSiteID).innerHTML = responseText; //showDiv(ratMsg,rateSiteID); alert("Thanks for rating."); //setTimeout("showDiv('rateCountMsg',rateSiteID)",1000); showDiv('rateCountMsg',rateSiteID); } else if(results.match("##error##")=="##error##") { var responseText = results.replace(/##error##/, " "); //document.getElementById(ratMsg+rateSiteID).innerHTML = responseText; //showDiv(ratMsg,rateSiteID); alert("You have already rated."); //setTimeout("showDiv('rateCountMsg',rateSiteID)",1000); } //setTimeout("fadeEffect(ratMsg)",1000); showDiv('rateCountMsg',rateSiteID); } } function updateCurrentRating(ratevalue,siteID) { var currWidth = ratevalue * 20; var elem1 = document.getElementById("deepstarrate"+siteID); elem1.style.width = parseInt(currWidth) +"%"; } function fadeEffect(val) { opacityVal = 100; element = val; interVal = setInterval("setOpacity(element)",100); setTimeout("resetOpacity(interVal,element)",950); } function setOpacity(arg) { element = arg; opacityVal -= 10; document.getElementById(element).style.opacity= opacityVal/100; document.getElementById(element).style.filter = "alpha(opacity=" + opacityVal + ")"; } function resetOpacity(interVal, element) { clearInterval(interVal); document.getElementById(element).style.filter = "alpha(opacity=100)"; document.getElementById(element).style.opacity = 1; document.getElementById(element).style.display = "None"; } function showDiv(divName,siteID) { hideDiv("signInMsg"+siteID); hideDiv("alreadyRatedMsg"+siteID); hideDiv("rateMsg"+siteID); hideDiv("rateItMsg"+siteID); hideDiv("rateCountMsg"+siteID); divName1 = document.getElementById(divName+siteID); divName1.style.display="block"; // display the notes } // this function hides the pop-up when user moves the mouse out of the link function hideDiv(divName) { divName1 = document.getElementById(divName); divName1.style.display="none"; // hide the notes }