function ajax(data,url,div){

	/* ajax replace element text */
	
	//$('ajax-replace').addEvent('click', function(event) {
		//prevent the page from changing
		//event.stop();
		//make the ajax call, replace text
		if(data){
		
			url +='?'+data;
		
		}
		
				
		//(function wait() {
	
			new Request({
			url: url, 
			evalScripts: true,
			onRequest	: function() { 
				
				$(div).set('html', '<div style="width:100%;text-align:center;margin-top:40px;"><img src="images/ajax-loader.gif"></div>');
			},
			
			onComplete: function(response) {
			    
			     $(div).set('html', response);
			    
			}}).send();
	
		//}).delay(300);

		
		
		
		
	//});

}

function newsClick(id,type){


	
	new Request({
			url: 'newsClick.php',
			data:{'newsPtrID':id,'type':type},
			evalScripts: true,
						
			/*onRequest	: function() { 
				
				$(div).set('html', '<div style="width:100%;text-align:center;margin-top:40px;"><img src="images/ajax-loader.gif"></div>');
			},
			
			onComplete: function(response) {
			    
			    // $(div).set('html', response);
			     
			     alert("response :"+response);
			    
			}*/
	}).send();


}
