// JavaScript Document for get classes
var pid;
function vote_helpful(plid){
	pid=plid;
	try{
		var url = "../action/review_vote.asp?vote=helpful&plid=" +escape(plid);
		xmlHttp.open("GET", url, true);
		xmlHttp.onreadystatechange = getClassesOkItem;
		xmlHttp.send(null);	
	}catch(exception){}
}
function vote_unhelpful(plid){
	pid=plid;
	try{
		var url = "../action/review_vote.asp?vote=unhelpful&plid=" +escape(plid);
		xmlHttp.open("GET", url, true);
		xmlHttp.onreadystatechange = getClassesOkItem;
		xmlHttp.send(null);	
	}catch(exception){}
}

function getClassesOkItem(){
	if (xmlHttp.readyState == 4) {
		var response = xmlHttp.responseText;
		
		try{
			var classObj = document.getElementById("show_class"+pid);
			classObj.innerHTML=response;
		}catch(exception){}
	}	
}

function clearviewed(){
	try{
		var url = "/shop/action/clearviewed.asp";
		xmlHttp.open("GET", url, true);
		xmlHttp.onreadystatechange = getCleared;
		xmlHttp.send(null);	
	}catch(exception){}
}
function getCleared(){
	if (xmlHttp.readyState == 4) {
		var response = xmlHttp.responseText;
		
		try{
			var classObj = document.getElementById("recentviewed");
			classObj.innerHTML=response;
		}catch(exception){}
	}	
}

function AddToCompare(ppid,psid){
	try{
		var url = "/shop/action/AddCompare.asp?action=add&ppid="+escape(ppid)+"&psid="+escape(psid);
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null);	
	}catch(exception){}
}

function DelCompare(formid,ppid){
try{
		var url = "/shop/action/AddCompare.asp?action=del&ppid="+escape(ppid);
		xmlHttp.open("GET", url, true);
		xmlHttp.send(null);	
	}catch(exception){}
	
	document.getElementById(formid).style.display='none';
}