// ratings js

function resetStars( contentid ) 
{	
	for ( p = 1; p <= 5; p++ ) 
	{
		oldVal = eval( "stars" + contentid + "[ p ]" );
		changeImage( 'star' + contentid + p, oldVal );
	}
}

function selectStars( starid, contentid ) 
{
	try {xc = clearTimeout(xx)} catch(err) {}
	
	for ( p = 1; p <= 5; p++ ) 
	{
		if (p <= starid) 
			src = '/images/staronsel.gif'; 
		else 
			src ='/images/staroffsel.gif';
			
		changeImage( 'star' + contentid + p, src);
	}
}

function resetTimeout( contentid ) 
{
	resetStars( contentid )
}
	
function doRating( typeID, contentID, rating, count ) 
{
	fileload = '/custom/ratingvote.cfm?contentType=' + typeID + '&contentID=' + contentID + '&rating=' + rating + '&count=' + count + '&id=' + new Date().getTime();

	ajaxManager( fileload );
}