function switchMenu( some_url )
{
	new Ajax.Updater('content', some_url, {
	  method: 'post'
	  });

}
function submitForm( contentdiv, some_url, formId )
{
	new Ajax.Updater(contentdiv, some_url, {
	  method: 'post',
	  parameters: $(formId).serialize(true)
	  });

}
function updateDiv( contentdiv, some_url, pars )
{
	new Ajax.Updater(contentdiv, some_url, {
	  method: 'get',
	  parameters: pars
	  });

}
function simpleUpdateDiv( contentdiv, some_url )
{
// 	new Ajax.Updater(contentdiv, some_url, {
// 	  method: 'get'
// 	  });
	new Ajax.Request(some_url, {
		method: 'get',
		onLoading: function (displayRoller){
			$(contentdiv).innerHTML = '<img src="images/ajax-loading.gif" /><br / ><div style="font-size:09px;">in fase di caricamento...</div>';
		},
		onSuccess: function(transport) {
			$(contentdiv).innerHTML = transport.responseText;
		}
	});
    return false;
}
function bgchange( divid, color )
{
	$(divid).style.background = color;
}
function chColor( divid, color )
{
	$(divid).style.color = color;
}
function menuRollover( divid, imgval )
{
	$(divid).style.backgroundImage = 'url(images/'+ imgval +'_footb.gif)';
}
function menuRolloverReset(divid, imgval)
{
	$(divid).style.backgroundImage = 'url(images/'+ imgval +'_foot.gif)';
}
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Mr J | http://www.huntingground.net/ */

scrollStep=1

timerLeft=""
timerRight=""

function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}


