function visual(aa) {
if (document.getElementById){
	if(document.getElementById(aa).style.display=='none'){
		document.getElementById(aa).style.display='';
		SetCookie('grandearredo',aa,0);
	}else{
		document.getElementById(aa).style.display='none';
	}
}
}

function openPopup(pagina)
{
	window.open(pagina, 'Grande Arredo','scrollbars=yes,resizable=yes,width=560,height=520');
}






/**
 Script per scrollo menu laterale
 ---------------------------------
**/
// ---- Sezione personalizzabile (v. scheda nel sito: http://www.jsdir.com/staffscripts/script062.asp)
// Pixel di spostamento per ogni ciclo
var Step = 10;

// Velocita' di scorrimento: millisecond per il setInterval() - piu' piccolo il numero --> piu' veloce lo scorrimento
var Tempo = 50;

// ---- Fine sezione personalizzabile

var nn = document.layers?true:false;
var N6 = navigator.userAgent.toLowerCase().indexOf("gecko")!=-1?true:false;
var LayText=null;
var AltezzaLivello=0;
var LarghezzaLivello=0;
var Limite =0;
var texTop=0;
var DeltaTop = 0;
var timsc=null;

function Start()
	{
	LayText=nn?document.layers.textLayer:N6?document.getElementById("textLayer").style:document.all.textLayer.style;
	DeltaTop=nn?LayText.top:N6?document.getElementById("textLayer").offsetTop:document.all.textLayer.offsetTop;
	AltezzaLivello=parseInt(nn?LayText.clip.height:N6?LayText.height:LayText.height);
	LarghezzaLivello=parseInt(nn?LayText.clip.width:N6?LayText.width:LayText.width);
	Limite=-AltezzaLivello+(nn?LayText.document.height:N6?document.getElementById("divN6").offsetHeight:document.all.textLayer.clientHeight);
	}

function Move(where)
	{
	where?texTop>=Limite?null:texTop+=Step:texTop==0?null:texTop-=Step;
	LayText.top=-texTop+DeltaTop;
	if (nn)
		{
		LayText.clip.top=texTop;
		LayText.clip.bottom=eval(texTop+AltezzaLivello);
		}
		else
		LayText.clip = "rect(" + texTop + ", " + LarghezzaLivello + ", " +eval(texTop+AltezzaLivello) + ", 0)";
	}

function StartScroll(updown){timsc=setInterval(updown?"Move(true)":"Move(false)",Tempo);}
function StopScroll(){clearInterval(timsc);}

// fine Script per scrollo menu laterale



var w3c = (document.getElementById) ? 1:0;
/**

getObject: restituisce il rifeirmento ad un oggetto
---------------------------------------------------

INPUT:
sObj					id o nome dell'oggetto

OUTPUT: riferimento all'oggetto

**/
function getObject(sObj) {
	var theObj;
	if (w3c)
		theObj = document.getElementById(sObj);
	else if (ns4)
		theObj = eval("document." + sObj);
	return theObj;
}

// supporto multilingua
function MMJLanguage(sName, sLanguage, sReferer, oForm, bSelected) {
	this.mName = sName;
	this.mLanguage = sLanguage;
	this.mOwnerForm = oForm;
	this.mReferer = sReferer;
	this.mSelected = bSelected;
	this.mLastState = bSelected;
	this.click = MMJLanguage_click;
}

function MMJLanguage_click() {
	this.mSelected = true;
	this.mLastState = false;
	MMJ_updateLanguages(this.mOwnerForm, this.mName);
}

function MMJ_updateLanguages(oForm, sName) {
	if (oForm.languages) {
		for (i = 0; i < oForm.languages.length; i++) {
			lan = oForm.languages[i];
			lan.mSelected = (lan.mSelected && !lan.mLastState);
			lan.mLastState = lan.mSelected;
			if (lan.mName === sName) {
				obj = getObject(lan.mReferer);
				if (obj) obj.style.display = (lan.mSelected ? 'block' : 'none');
			}
		}
	}
}

function MMJ_getLanguage(oForm, sName, sLanguage) {
	if (oForm.languages) {
		var languageCount = oForm.languages.length;
		for (var i = 0; i < languageCount; i++) {
			var lan = oForm.languages[i];
			if (lan.mName == sName && lan.mLanguage === sLanguage) return lan;
		}
	}
	return null;
}

// fine supporto multilingua

//funzioni per le form
function CheckMail(email){
	validRegExp = /^([_\.0-9a-zA-Z-])+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i;
	strEmail1 = email;
	if (strEmail1.search(validRegExp) == -1)
	{
		alert("E-mail non valida. Reinserire valore!");
		return false;
	}else{
		return true;
	}
}

//fine funzioni form

//funzioni coookies
function SetCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
}

function ReadCookie(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return "";
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length;
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
//fine coockies

