function sezione(){
	indirizzo = document.location + "";
	str_start = indirizzo.lastIndexOf("/") + 1;
	if (indirizzo.lastIndexOf("_") > 0) {
		str_end = indirizzo.lastIndexOf("_");
	}
	else {
		str_end = indirizzo.lastIndexOf(".");
	}
	
	return (indirizzo.substring(str_start,str_end));
}

function swap(which){
	menuarray = which.split("_");
	
	if (menuarray.length == 2) {
		menuname = menuarray[0];
		menustatus = menuarray[1];
		document.getElementById(menuname).src = menu[which];
	}
}

function swapimg(which){
	urlname = which.src.substring(0,which.src.lastIndexOf("."));
	urlext = which.src.substring(which.src.lastIndexOf("."),which.src.length);
	//alert(urlname.substring(urlname.length-1,urlname.length));
	if (urlname.substring(urlname.length-1,urlname.length) == '1') {
		if (which.name != sezione()){
			which.src = urlname.substring(0,urlname.length -1) + urlext
			}
			}
	else {which.src = urlname + '1' + urlext;}
	return false;
}

function start(){
	f = new Effect.Appear('conteiner', { duration: 0.4 , delay: 0.0});
	
	
	c = new Effect.Parallel(
    [ new Effect.Morph('logobox', {sync: true, style:'top:1px'}), 
      new Effect.Appear('logobox', {sync: true, to: 1.0, from: 0.0 } ) ],
    { duration: 0.7, delay: 0.2});
	
	b = new Effect.Appear('iscriviti', { duration: 0.7, delay: 0.6});
	a = new Effect.Appear('menubox', { duration: 0.5, delay: 0.8});
	
	
	/* d = new Effect.Parallel(
    [ new Effect.Morph('loghi', {sync: true, style:'top:0px;'}), 
      new Effect.Appear('loghi', {sync: true, to: 0.9, from: 0.0 } ) ],
    { duration: 0.7, delay: 0.9});
	
	*/
	
	e = new Effect.Parallel(
    [ new Effect.Morph('footerbox', {sync: true, style:'top:20px;'}), 
      new Effect.Appear('footerbox', {sync: true, to: 1.0, from: 0.0 } ) ],
    { duration: 0.7, delay: 1.1});
	
}

function startonload(){}