
function tp_RatingClick(i,itemRating,itemID, iMaxRating, sSelectedImage, sUnselectedImage, iItemType, iItemRatingType, iTotalRatings,itemOwnerID,doVmixPost)
		{				
			$('tp_israted_'+itemID).value = "1";	
			var url = "/community/app/nf/callback/insertrating.aspx";
			var args = "r="+i+"&i="+itemID+"&ot="+iItemType+"&irt="+iItemRatingType+"&o="+itemOwnerID+"&vmix="+doVmixPost;
			//document.write (args);
			iTotalRatings = parseFloat(iTotalRatings) + 1;
			
			PostURL(url,args,0,"tp_RatingEvalResponse")
			
			if($('tp_rating_text_'+itemID)){$('tp_rating_text_'+itemID).innerHTML = 'Thank you!';}
			if($('tp_total_ratings_'+itemID)){$('tp_total_ratings_'+itemID).innerHTML = iTotalRatings + ' total ratings';}
			
			for (var x = 1; x <= iMaxRating ; x++)
			{
				var imgId = x + "_Rating_"+itemID;		
				var y = $(imgId);
				if (y) {
				    y.onclick = null;
				    y.onmouseover = null;
				    y.onmouseout = null;
    				//y.onmouseout = tp_OnMouseOut;
	    			//$(imgId).removeAttribute('onClick');
		    		//$(imgId).removeAttribute('onMouseOver');					
			    	//Element.stopObserving($(imgId),'mouseover');				
				    if (x<=i) {
					    $(imgId).src = sSelectedImage;
					    $(imgId).alt = "You have already rated this item";
					    }
				    else {
					    $(imgId).src = sUnselectedImage;
					    $(imgId).alt = "You have already rated this item";					
				      }						
				    }
			}					
		}
function tp_OnMouseOut(iMaxRating,sUnselectedImage, sItemID)
{		
	var f = $('tp_israted_'+sItemID);
	if (f.value!="1")
	{
		for (var x = 1; x <= iMaxRating ; x++)
		{
			var imgId = x+"_Rating_"+sItemID;					
			$(imgId).src = sUnselectedImage;		
		}
	}
}
function tp_RatingEvalResponse()
{
	
}
function tp_RatingMouseOver(i,iMaxRating, sSelectedImage, sUnselectedImage, sItemID)
{		
	
	for (var x = 1; x <= iMaxRating ; x++)
	{
		var imgId = x+"_Rating_"+sItemID;	
		var y = $(imgId);	
		//y.onmouseout = tp_OnMouseOut(iMaxRating,sUnselectedImage,sItemID);
		var fn = function( e ){Event.stop( e );tp_OnMouseOut(iMaxRating,sUnselectedImage,sItemID);}; Event.observe(y, 'mouseout', fn, false);
		if (x<=i)
		{
			$(imgId).src = sSelectedImage;
			$(imgId).alt = "Please click to rate this item";
		}
		else
		{
			$(imgId).src = sUnselectedImage;
			$(imgId).alt = "Please click to rate this item";
		}
	}
}
function tp_LoginRedirect(sURL)
{
	window.location = sURL;
}