
      reqw = null;
      var reqw;

	 var cookieKey;
	  var paperid,artid,nodeid,isnodecomm,pointtype,attr,title,papername,paperdate;

	  function createStarsPage()
	  {  
	     
		 
	      myCreateCookieKey();
		  var url,isexist;
		  var ck = GetCookie(cookieKey);
		  if (ck == cookieKey)
		  {
		    isexist = 1;
			url = "/comment/ShowCommentPointResult.jsp";
	       document.all.pointsform.action=url;
	       document.all.pointsform.submit();
	       document.all.pointsRsultDiv.style.display="none";
	       document.all.pointsIframe.height = 70;
		   document.all.pointsIframe.width = 280;
		   document.all.pointsIframe.frameborder = 0;
		  }else{
			}
	  }
	  function myCreateCookieKey()
	  {   
	      
		  attr = document.all.pointsform.attr.value;
		  
		  paperdate = document.getElementById("paperdatediv").innerText;
		   
		  if (attr == 2)
		  {
		      paperid = document.all.pointsform.channelid.value;

			  //artid = document.all.pointsform.articleid.value;
			  papername = document.all.pointsform.channelname.value;
			  
			 
		  }else{
		      paperid = document.all.pointsform.siteid.value;
			  //artid = document.all.pointsform.nsid.value;
			  papername = document.all.pointsform.sitename.value;
		  }
		  
		  nodeid = document.all.pointsform.nodeid.value ;
		  isnodecomm = document.all.pointsform.isnodecomm.value;
		  pointtype  = document.all.pointsform.pointtype.value;
		  //title =  document.all.pointsform.title.value;
		  pointtype = document.all.pointsform.pointtype.value;
	     cookieKey = attr + "#" + paperid + "#" + nodeid + "#" + isnodecomm + "#" + pointtype + "#" + getPaperDate(paperdate) + "#";
	 
	  //alert(cookieKey);
	  }
	function SetCookie(){
		
	    myCreateCookieKey();
		
		var expires = new Date ();
		expires.setTime(expires.getTime() + 31 * (24 * 60 * 60 * 1000));
		document.cookie = cookieKey + "=" + escape(cookieKey) + "; expires=" + expires.toGMTString();
	}
	function GetCookie(name) {
		var dc = document.cookie;
		var prefix = name + "=";
		var begin = dc.indexOf("; " + prefix);
		if (begin == -1)
		{
			begin = dc.indexOf(prefix);
			if (begin != 0) return null;
		}
		else
		{
			begin += 2;
		}
		var end = document.cookie.indexOf(";", begin);
		if (end == -1)
		{
			end = dc.length;
		}
		return unescape(dc.substring(begin + prefix.length, end));
	} 
	
	function submitPoints(pval)
	{ 
	 
	   var pval = pval/10;
	    
	   SetCookie();
	   
	   var weburl = '/comment/commentPoint.jsp';
	   var attr = document.all.pointsform.attr.value;
	   var isnodecomm = document.all.pointsform.isnodecomm.value;
	   var pointtype = document.all.pointsform.pointtype.value;
	   var rank = pval;
	   var articleid  = null;
	   var channelid = null;
	   var channelname = null;
	   if (attr == 2)
	   {
	   	  //articleid = document.all.pointsform.articleid.value;
	   	  channelid = document.all.pointsform.channelid.value;
	   	  channelname = escape(document.all.pointsform.channelname.value);
	     }
	    else
	   {
	      //articleid = document.all.pointsform.nsid.value;
	      channelid = document.all.pointsform.siteid.value;
	      channelname = escape(document.all.pointsform.sitename.value);
	   }
	   //var arttitle = document.all.pointsform.title.value;
	   var nodeid = document.all.pointsform.nodeid.value;
	  var url = weburl+ '?rank='+rank+'&nouse=0';
	
	   document.all.pointsform.action=url;
	   document.all.pointsform.submit();
	   document.all.pointsRsultDiv.style.display="none";
	   document.all.pointsIframe.height = 70;
	   document.all.pointsIframe.width = 280;
	   document.all.pointsIframe.frameborder = 0;
	   }
	   
	   function getPaperDate(datestr)
      {
        var dstr = datestr.replace(/(^\s*)|(\s*$)/g, "");
        return dstr;
      }

