/**
 * @author Luca Donazzon NEIKO Srl
 */

function caricaPrj(lang,tipo){
	
	//alert('ok')
	if(!lang || lang=='')
		alert('manca la lingua!');
	if(!tipo || tipo=='')
		alert('manca il tipo!');
	
	var pars='lang='+lang+'&cmd=caricaPrjs&tipo='+tipo;
		
	new Ajax.Updater(
		'menuDx', 
		'/include/progetti.php', 
		{
			method: 'get', 
			parameters: pars,
			onComplete: success,
			onFailure: failure,
			onException: exception 				
		}); 	
	
}

function failure(risp){
	alert("Failure\nrisp: "+risp.responseText)
}	
function exception(risp){
	alert("Exception\nrisp: "+risp.responseText)
}   
function success(risp){
	//alert( 'h:'+$('tmpContainer').offsetHeight +' - w:'+$('tmpContainer').offsetWidth );
	//alert( 'h:'+$('tpl_table').offsetHeight +' - w:'+$('tpl_table').offsetWidth );
}	
	
function schedaPrj(lang,id){
	$('prj_content').innerHTML=id;
	
	var pars='lang='+lang+'&cmd=mostraPrj&id='+id;
	//alert(pars);
	new Ajax.Updater(
		'prj_content', 
		'/include/progetti.php', 
		{
			method: 'get', 
			parameters: pars,
			onComplete: success,
			onFailure: failure,
			onException: exception 				
		}); 	
}	
function mostra(tipo){

	for(i=1;i<6;i++){
		$('og'+i).style.display='none';
	}
	$(tipo).style.display='block';
}

function showImg(k){
	for(var i=0;i<5;i++){
		if( $('img'+i) )
			$('img'+i).hide();
		if( $('labl'+i) )	
			$('labl'+i).style.backgroundColor='#414141';
	}
	$('img'+k).show();
	$('labl'+k).style.backgroundColor='#aaa';
}

