 function view(what, elemento, flag)
 {
 	divelement = document.getElementById(what);
 	widthBigImage = 300;
 	widthThumbImage = 100;
 	//heigthThumbImage = 66;
 	heigthThumbImage = 0;
 	if(flag==1)
 	{
 		divelement.style.visibility='visible';
 		//x = findPosX(elemento)-widthBigImage/2 + widthThumbImage/2;
 		//y = findPosY(elemento) + heigthThumbImage;
 		if(what!='gommone' && what!='h2o')
 		{
 			x = findPosX(document.getElementById('th-blank'))-widthBigImage/2 + widthThumbImage/2;
 			y = findPosY(document.getElementById('th-blank')) + heigthThumbImage;
 			//alert(what + " " + x +"," +y);
 		}
 		if(what=='boss')
 		{
 			document.getElementById('boss').style.visibility='visible';
 			document.getElementById('boss').style.top=y;
 			document.getElementById('boss').style.left=x;
 		}
 		if(what=='cloro')
 		{
 			document.getElementById('cloro').style.visibility='visible';
 			document.getElementById('cloro').style.top=y;
 			document.getElementById('cloro').style.left=x;
 		}
 		if(what=='lamilanese')
 		{
 			document.getElementById('lamilanese').style.visibility='visible';
 			document.getElementById('lamilanese').style.top=y;
 			document.getElementById('lamilanese').style.left=x;
 		}
 		if(what=='esaurito')
 		{
 			document.getElementById('esaurito').style.visibility='visible';
 			document.getElementById('esaurito').style.top=y;
 			document.getElementById('esaurito').style.left=x;
 		}
 		if(what=='punito')
 		{
 			document.getElementById('punito').style.visibility='visible';
 			document.getElementById('punito').style.top=y;
 			document.getElementById('punito').style.left=x;
 		}
 		if(what=='mario')
 		{
 			document.getElementById('mario').style.visibility='visible';
 			document.getElementById('mario').style.top=y;
 			document.getElementById('mario').style.left=x;
 		}
 		if(what=='gio')
 		{
 			document.getElementById('gio').style.visibility='visible';
 			document.getElementById('gio').style.top=y;
 			document.getElementById('gio').style.left=x;
 		}
 		if(what=='stecco')
 		{
 			document.getElementById('stecco').style.visibility='visible';
 			document.getElementById('stecco').style.top=y;
 			document.getElementById('stecco').style.left=x;
 		}
 		if(what=='principessa')
 		{
 			document.getElementById('principessa').style.visibility='visible';
 			document.getElementById('principessa').style.top=y;
 			document.getElementById('principessa').style.left=x;
 		}
 		if(what=='psyko')
 		{
 			document.getElementById('psyko').style.visibility='visible';
 			document.getElementById('psyko').style.top=y;
 			document.getElementById('psyko').style.left=x;
 		}
 		if(what=='elena')
 		{
 			document.getElementById('elena').style.visibility='visible';
 			document.getElementById('elena').style.top=y;
 			document.getElementById('elena').style.left=x;
 		}
 		if(what=='principessa2')
 		{
 			document.getElementById('principessa2').style.visibility='visible';
 			document.getElementById('principessa2').style.top=y;
 			document.getElementById('principessa2').style.left=x;
 		}
 		
 		if(what=='gommone')
 		{
 			x = findPosX(elemento)-500/2 + 200/2;
 			y = findPosY(elemento) - 149/2;
 			document.getElementById('gommone').style.visibility='visible';
 			document.getElementById('gommone').style.top=y;
 			document.getElementById('gommone').style.left=x;
 		}
 		if(what=='h2o')
 		{
 			x = findPosX(elemento)-500/2 + 200/2;
 			y = findPosY(elemento) - 150/2;
 			document.getElementById('h2o').style.visibility='visible';
 			document.getElementById('h2o').style.top=y;
 			document.getElementById('h2o').style.left=x;
 		}
 	}
 	else if(flag==0)
 	{
 			//divelement.style.visibility='hidden';
 			setTimeout('off(\'' + what + '\')',100);
 	}
 }
 
 function off(what)
 {
 	//alert(what);
 	if(what=='boss')
	document.getElementById('boss').style.visibility='hidden';
	if(what=='cloro')
	document.getElementById('cloro').style.visibility='hidden';
	if(what=='lamilanese')
	document.getElementById('lamilanese').style.visibility='hidden';
	if(what=='esaurito')
	document.getElementById('esaurito').style.visibility='hidden';
	if(what=='punito')
	document.getElementById('punito').style.visibility='hidden';
	if(what=='mario')
	document.getElementById('mario').style.visibility='hidden';
	if(what=='gio')
	document.getElementById('gio').style.visibility='hidden';
	if(what=='stecco')
	document.getElementById('stecco').style.visibility='hidden';
	if(what=='principessa2')
	document.getElementById('principessa2').style.visibility='hidden';
	if(what=='psyko')
	document.getElementById('psyko').style.visibility='hidden';
	if(what=='elena')
	document.getElementById('elena').style.visibility='hidden';
	if(what=='principessa')
	document.getElementById('principessa').style.visibility='hidden';
	if(what=='gommone')
	document.getElementById('gommone').style.visibility='hidden';
	if(what=='h2o')
	document.getElementById('h2o').style.visibility='hidden';
 }
 
 function logoHP()
 {
	content = 'image0=/images/slide1.jpg&image1=/images/slide2.jpg&image2=/images/slide1.jpg&image3=/images/slide2.jpg&image4=/images/slide1.jpg&';
	document.write('<Object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="300" height="100" id="slideshow" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="/script/slideshow.swf?' + content + 'width=300" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<embed src="/script/slideshow.swf?' + content + 'width=300" quality="high" bgcolor="#ffffff" width="300" height="100" name="slideshow" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
 }
 
function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}
