function doPoll(){	
		$.ajax({
					type		: "POST",
					cache	: false,
					url		: "poll.php",
					data		: $("#poll_form").serializeArray(),
					success: function(data) {
						$("#pollcontent").html(data);
					}
				});
	return false;	
}

function doRegistration(){
	if (registrationCheck()){
		$.ajax({
					type		: "POST",
					cache	: false,
					url		: "reg.php",
					data		: $("#reg_form").serializeArray(),
					success: function(data) {
						$("#registration").html(data);
					}
				});	
	}
	return false;	
}

function showImage(id,url){
         $('#'+id).css({'backgroundImage' : 'url("'+url+'")'});
}
function set_Image(id,url){
//	    alert(url);
        var img = new Image();
        $(img).load(function(){
                $('#'+id).stop().animate({ opacity: 0 }, 150);
//				 alert(url);
                setTimeout("showImage('"+id+"','" + url +"')",150);
        $('#'+id).animate({ opacity: 1 } , 150);
        }).attr('src', url);
}

function showMenu(id){
	document.getElementById(id).style.display = 'block';	
}
function hideMenu(id){
	document.getElementById(id).style.display = 'none';	
}
var POSITION=0;
function gotoPostion(id,value,i){
	clearInterval(IntervalId);
	IntervalId = setInterval("nextNews(750)",5000);
	POSITION = i-1;
	$("#"+id).animate({ marginLeft: value}, 750);	
}
function nextNews(WIDTH){
	POSITION++;
	if (POSITION >= POSITIONLIMIT){
		POSITION = 0;	
	}
		gotoPostion('inscreen',-WIDTH*POSITION,POSITION+1);
	
}
