var fDesignId;

function submitVote( pDesignId, pVote ) {
	fDesignId = pDesignId;

	var result = new Ajax.Request( 'ajax/submit_vote.php?id='+ pDesignId +'&vote='+ pVote, { asynchronous:true, evalScripts:true, onComplete: updateStars }); 
}

function updateStars( response ) {
	if( response.responseText == 0 ) {
		alert( "U heeft vandaag al op dit ontwerp gestemd." );
	}
	else {
		$( "currentrating"+ fDesignId ).setStyle( { width:response.responseText +"px" });
	}
}
