/*insert the rate into database*/
	function insertRating(val)
	{
		var temp = val.id.split("_");
	 	 var id = temp[0];
		 var starNum = temp[1];
		 var url = "insertRating.jsp";
		 var parameters ="id=" 
		 				+id
		 				+"&starNum="
		 				+starNum;
		 				
		 var xmlhttp;
		 
		 if (window.XMLHttpRequest)
		 {
		  xmlhttp=new XMLHttpRequest();
		 }
		 else
		 {
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		 }
		 xmlhttp.onreadystatechange=function()
		 {
		  if (xmlhttp.readyState==4)
		     {
			   
				  //window.location.reload();
		     }
		 }
		 xmlhttp.open("POST",url+"?"+parameters,true);
		 xmlhttp.send(); 
	}
	/*insert the rate into database*/

	/*insert view count into database*/
	function insertView(id)
	{
		var url = "insertView.jsp";
		 var parameters ="id=" 
			 				+id;
		 var xmlhttp;
		 
		 if (window.XMLHttpRequest)
		 {
		  xmlhttp=new XMLHttpRequest();
		 }
		 else
		 {
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		 }
		 xmlhttp.onreadystatechange=function()
		 {
		  if (xmlhttp.readyState==4)
		     {
			  	//document.getElementById('addcomment').innerHTML = xmlhttp.responseText;
		     }
		 }
		 xmlhttp.open("POST",url+"?"+parameters,true);
		 xmlhttp.send();
	}
	/*insert view count into database*/

