/********************************************************************************************************************************************************
	TOOLTIP
*********************************************************************************************************************************************************/

function tipz() {
	
		$$('div.tipz').each(function(element,index) {
		    var content = element.get('title');
		    element.store('tip:title', content);
		});
		
		//create the tooltips
		var tipz = new Tips('.tipz',{
		    className: 'tipz',
		    fixed: false,
		    showDelay: 0,
		    hideDelay: 0
		});
		  
}


/********************************************************************************************************************************************************
	MOVE X Y
*********************************************************************************************************************************************************/

function moveH(item,x,t){

	item.set('tween', {duration: t});
	item.tween('margin-left', x);
				
}

function moveV(item,y,t){

	item.set('tween', {duration: t});
	item.tween('margin-top', y);
				
}

/********************************************************************************************************************************************************
	GO PAGE
*********************************************************************************************************************************************************/

function goPage(p,b){
	
	if(b == 1) {
	window.open(p);
	}else {
	window.location.href=''+p+'';
	}

}

/********************************************************************************************************************************************************
	MENU
*********************************************************************************************************************************************************/

/*
var s = new Fx.Morph($('menuShadow'), {duration: 500});
s.start({'width': '500px'});
*/

function shadowInputInit() {

	for(i=0;i<10;i++) {
	
		var m = $('m'+i).offsetWidth;
		
		$('mInput'+i).value = m;
	
	}

}

function moveShadow(i,d) {

	var total = 0;
	
	for(z=0;z<i;z++) {
	
		var w = $('mInput'+z).value;
	
		total = parseFloat(total)+parseFloat(w);
	
	}
	
	var m = $('mInput'+i).value;
	
	var curWith = $('m'+i).offsetWidth;
	
	var total2 = (m-curWith) / 2; 
	
	var superTotal = parseFloat(total) + parseFloat(total2);
	
	moveH($('menuShadow'),superTotal,d);
	$('menuShadow').style.width = curWith+'px';
	
	
	
}

function changeMenuColor(i) {
	
	$('m'+i).style.color = '#000000';
}




function limiteTextArea(zone,max) 
{ 
	if(zone.value.length>=max){zone.value=zone.value.substring(0,max);} 
} 


/********************************************************************************************************************************************************
	AJAX
*********************************************************************************************************************************************************/

function lgAjax(lg) {
		
			new Request({
			url: 'setCookie.php?lg='+lg+'', 
			evalScripts: true
			}).send();
		
}





























