<!--

logohp		= new Image(70,32); logohp.src		= "images/maria_paola_conte.jpg";
logohp_r 	= new Image(70,32); logohp_r.src	= "images/maria_paola_conte_2.jpg";


function imgOn(imgX) {
	document.images [imgX].src = eval(imgX + "_r.src");
}

function imgOff(imgX) {
	document.images [imgX].src = eval(imgX + ".src");
}


function showObj(tabName) {
	if (tabName) {
		if (document.getElementById) {
			document.getElementById(tabName).style.display = "block";
		}
		else if (document.all) {
			document.all[tabName].style.display = "block";
		}
	}
}


function hiddenObj(tabName) {
	if (tabName) {
		if (document.getElementById) {
			document.getElementById(tabName).style.display = "none";
		}
		else if (document.all) {
			document.all[tabName].style.display = "none";
		}
	}
}


function vediFoto(foto,w,h) {hrefloc = location
	winCat=window.open ("", "Foto_Grande", "toolbar=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width="+ w +",height="+ h );
	winCat.document.write ("<html><head><base href=" + hrefloc + "><title></title>");
	winCat.document.write ("<body onLoad='self.focus()' bgcolor='#FFFFFF'>");
	winCat.document.write ("<p align='center'><img src='" + foto + "' border='0'></p>");
	winCat.document.write ("<form><p align='center'><input type='button' value='chiudi' onClick='window.close()' style='font-family: verdana, arial; font-size: 10px;'></p>");
	winCat.document.write ("</form></body></html>");
	winCat.document.close ();
}


// funzione che permette il cambio dlela classe di un oggetto
function cambioClasse(id,nomeClasse) {
	if ((id)&&(nomeClasse)) {
		if (document.getElementById) {
			document.getElementById(id).className = nomeClasse;
		}
		else if (document.all) {
			document.all['id'].className = nomeClasse;
		}
	}
}


function galleriaVediFoto(nomeGriffe,nomeFile) {
	var path_foto_full = 'abiti/'+ nomeGriffe +'/full/'+ nomeFile;
	var path_foto_mid = 'abiti/'+ nomeGriffe +'/'+ nomeFile;
	if (document.getElementById) {
		document.getElementById('contentAbiti').innerHTML = "<a href='#vedi_full' onClick=\"vediFoto('"+ path_foto_full +"',800,680)\"><img src='"+ path_foto_mid +"' border='0' class='bordo2' /></a>";
	}
	else if(document.all) {
		document.all['contentAbiti'].innerHTML = "<a href='#vedi_full' onClick=\"vediFoto('"+ path_foto_full +"',800,680)\"><img src='"+ path_foto_mid +"' border='0' class='bordo2' /></a>";
	}
}


function sposeVediFoto(nomeFile) {
	var path_foto_mid = 'spose/'+ nomeFile;
	if (document.getElementById) {
		document.getElementById('contentSpose').innerHTML = "<img src='"+ path_foto_mid +"' border='0' class='bordo2' />";
	}
	else if(document.all) {
		document.all['contentSpose'].innerHTML = "<img src='"+ path_foto_mid +"' border='0' class='bordo2' />";
	}
}


function eventiVediFoto(nomeFile) {
	if (document.getElementById) {
		document.getElementById('contentSpose').innerHTML = "<img src='"+ nomeFile +"' border='0' class='bordo2' />";
	}
	else if(document.all) {
		document.all['contentSpose'].innerHTML = "<img src='"+ nomeFile +"' border='0' class='bordo2' />";
	}
}





/******  DIV SCROLL  ******/

var ATCont
var ATScroll
var offsetAT

var loop, timer
var initialised,delay
var bw
delay=100

bw=new verifyCompatibleBrowser()


function iniziaAbiti() {
	ATCont=new avviaScroll('areaTesto1')
	ATScroll=new avviaScroll('areaTesto2','areaTesto1')
	ATScroll.MoveArea(0,0)
	offsetAT =oset ("ATCont","ATScroll")
	Posiziona("areaTesto1",0,0)

	initialised=true;
}

function iniziaSpose() {
	ATCont=new avviaScroll('areaSpose1')
	ATScroll=new avviaScroll('areaTesto2','areaSpose1')
	ATScroll.MoveArea(0,0)
	offsetAT =oset ("ATCont","ATScroll")
	Posiziona("areaSpose1",0,0)

	initialised=true;
}

function iniziaFoto() {
	ATCont=new avviaScroll('areaFoto1')
	ATScroll=new avviaScroll('areaTesto2','areaFoto1')
	ATScroll.MoveArea(0,0)
	offsetAT =oset ("ATCont","ATScroll")
	Posiziona("areaFoto1",0,0)

	initialised=true;
}

function verifyCompatibleBrowser() {
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ope=(this.ver.indexOf("Opera")>-1)
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ie5=((this.ver.indexOf("MSIE 5")>-1 && this.dom) || this.ie4 || this.ie6 || this.ope)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}

function avviaScroll(obj,nest) {
	nest=(!nest) ? '':'document.'+nest+'.'
//	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
//	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;

	if (document.getElementById) {
		this.el = document.getElementById(obj);
	}
	else if(document.all) {
		this.el = document.all[obj];
	}
	else if (bw.ns4) {
		this.el = eval(nest+'document.'+obj);
	}
	else {
		this.el = 0;
	}

	if (document.getElementById) {
		this.css = document.getElementById(obj).style;
	}
	else if(document.all) {
		this.css = document.all[obj].style;
	}
	else if (bw.ns4) {
		this.css = eval(nest+'document.'+obj);
	}
	else {
		this.css = 0;
	}

	this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
	this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight

	this.up=MoveAreaUp;
	this.down=MoveAreaDown;
	this.left=MoveAreaLeft;
	this.right=MoveAreaRight;
	this.MoveArea=MoveArea;
	this.x;
	this.y;
	this.obj = obj + "Object"
	eval(this.obj + "=this")
	return this
}

function MoveArea(x,y) {
	this.x=x;this.y=y
	this.css.left=this.x
	this.css.top=this.y
}
function MoveAreaUp(passo) {
	if (this.y<0) {
		this.MoveArea(0,this.y-passo)
		if(loop) setTimeout(this.obj+".up(" + passo + ")",delay)
	}
}
function MoveAreaDown(passo,altezza) {
	if (this.y>-altezza) {
		this.MoveArea(0,this.y-passo)
		if(loop) setTimeout(this.obj+".down(" + passo + "," + altezza + ")",delay)
	}
}
function MoveAreaLeft(passo,altezza) {
	if (this.x>-altezza) {
		this.MoveArea(this.x-passo,0)
		if(loop) setTimeout(this.obj+".left(" + passo + "," + altezza + ")",delay)
	}
}
function MoveAreaRight(passo) {
	if (this.x<0) {
		this.MoveArea(this.x-passo,0)
		if(loop) setTimeout(this.obj+".right(" + passo + ")",delay)
	}
}

function oset(padre, figlio) {
//	if (bw.ie5) {return eval(figlio+".el.offsetHeight-"+ padre +".el.offsetHeight-5")}
//	if (bw.ns4) {return eval(figlio+".css.document.height-"+ padre +".css.clip.height-5")}
//	if (bw.ns5) {return eval(figlio+".el.offsetHeight-"+ padre +".el.offsetHeight")}

	if (document.getElementById) {
		return eval(figlio+".el.offsetHeight-"+ padre +".el.offsetHeight");
	}
	else if(document.all) {
		return eval(figlio+".el.offsetHeight-"+ padre +".el.offsetHeight-5");
	}
	else if (bw.ns4) {
		return eval(figlio+".css.document.height-"+ padre +".css.clip.height-5");
	}
}


//vuole il nome della div, la distanza dal bordo sinistro e la distanza dal bordo destro
function Posiziona(oggetto,left,top) {
/*
	if (bw.ns4) {
		//left-=1
		eval('document.'+oggetto+'.left='+left)
		eval('document.'+oggetto+'.top='+top)
		eval("document."+oggetto+".visibility='visible'")
	}
	if (bw.ns5) {
		//left-=1
		top-=1
		document.getElementById(oggetto).style.left=left
		document.getElementById(oggetto).style.top=top
		document.getElementById(oggetto).style.visibility='visible'
	}
	if (bw.ie5 || bw.ie4) {
		document.all[oggetto].style.left=left
		document.all[oggetto].style.top=top
		document.all[oggetto].style.visibility='visible'
	}
*/
	if (document.getElementById) {
		//left-=1
		top-=1;
		document.getElementById(oggetto).style.left=left;
		document.getElementById(oggetto).style.top=top;
		document.getElementById(oggetto).style.visibility='visible';
	}
	else if(document.all) {
		document.all[oggetto].style.left=left;
		document.all[oggetto].style.top=top;
		document.all[oggetto].style.visibility='visible';
	}
	else if (bw.ns4) {
		//left-=1
		eval('document.'+oggetto+'.left='+left);
		eval('document.'+oggetto+'.top='+top);
		eval("document."+oggetto+".visibility='visible'");
	}
}

function CeaseScroll() {
	loop=false;
	if(timer) clearTimeout(timer);
}

function PerformScroll(passo,oggetto,altezza) {
	if (initialised) {
		loop=true;
		if (passo>0) {
			oggetto.down(passo,altezza);
		}
		else {
			oggetto.up(passo);
		}
	}
}

function nascondi(oggetto) {
	if (document.getElementById) {
		document.getElementById(oggetto).style.visibility='hidden';
	}
	else if(document.all) {
		document.all[oggetto].style.visibility='hidden';
	}
	else if (bw.ns4) {
		eval("document."+oggetto+".visibility='hidden'");
	}
}



//-->
