function sendVote( section, rating, id, count ) { dhtml.showElem('mosVote-' + section + '-' + id + '-star-ajax'); setTimeout( "sendVote2('"+section+"','"+rating+"','"+id+"','"+count+"')", 200 ); } function sendVote2( section, rating, id, count ) { var aj = new Ajax.Request( '/ajax/d_vote.php', { method:'get', parameters: {section:section, rating:rating, id:id, count:count }, onSuccess: function(transport){ var response = transport.responseText || "no response text"; var v = dhtml.getElem('mosVote-' + section + '-' + id + '-container'); v.innerHTML = response; }, onFailure: function(){ alert('Something went wrong...') } } ); }