// JavaScript Document

	
	function vote(websiteID) {
		
		var scoreEl 	= "score_" + websiteID.toString();
		var voteEl 		= "votes_" + websiteID.toString();
		
		//make the ajax call
		var req = new Request({
			method: 'get',
			url: '/p/vote.php?sid=' + Math.random().toString(),
			data: { 'websiteID' : websiteID},
			async:false,
			onRequest: function() {  
				$(scoreEl).set('html', "<img src=\"/images/throbber_black.gif\">");
			
			},
			onComplete: function(response) { 
				
				var components = response.split("|");
				
				$(scoreEl).set('html', components[0]);
				if(components[1])
				{
					$(voteEl).set('html', components[1]);
				}
			}
		}).send();
	}

