var message="";

function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")




function resizePage () {
var screenHeight;
screenHeight = screen.height;
var rapporto;
rapporto = screen.width / screen.height;
if (screenHeight > 1200) {
window.resizeTo(1200 * rapporto,1200);
}
else {
window.resizeTo(screen.width,screen.height);
} 
}  


function homeBg () {
var screenHeight;
screenHeight = screen.height;
if (screenHeight == 600) {
document.write('<table width=100% height=100% border=0 background=img/fronte600.jpg><tr><td></td></tr></table>');
}
else if (screenHeight == 768) {
document.write('<table width=100% height=100% border=0 background=img/fronte768.jpg><tr><td></td></tr></table>');
} 
else if (screenHeight == 800) {
document.write('<table width=100% height=100% border=0 background=img/fronte800.jpg><tr><td></td></tr></table>');
} 
else if (screenHeight == 1024) {
document.write('<table width=100% height=100% border=0 background=img/fronte1024.jpg><tr><td></td></tr></table>');
} 
else if (screenHeight == 1200) {
document.write('<table width=100% height=100% border=0 background=img/fronte1200.jpg><tr><td></td></tr></table>');
} 
else {
document.write('<table width=100% height=100% border=0 background=img/fronte1200.jpg><tr><td></td></tr></table>');
} 
}  


function homeBgMostra () {
var screenHeight;
screenHeight = screen.height;
if (screenHeight == 600) {
document.write('<table width=100% height=100% border=0 background=img/mostra600.jpg><tr><td></td></tr></table>');
}
else if (screenHeight == 768) {
document.write('<table width=100% height=100% border=0 background=img/mostra768.jpg><tr><td></td></tr></table>');
} 
else if (screenHeight == 800) {
document.write('<table width=100% height=100% border=0 background=img/mostra800.jpg><tr><td></td></tr></table>');
} 
else if (screenHeight == 1024) {
document.write('<table width=100% height=100% border=0 background=img/mostra1024.jpg><tr><td></td></tr></table>');
} 
else if (screenHeight == 1200) {
document.write('<table width=100% height=100% border=0 background=img/mostra1200.jpg><tr><td></td></tr></table>');
} 
else {
document.write('<table width=100% height=100% border=0 background=img/mostra1200.jpg><tr><td></td></tr></table>');
} 
}

function scritta () {
var screenHeight;
screenHeight = screen.height;
if (screenHeight == 600) {
document.write('<img src=img/scritta600.png >');
}
else if (screenHeight == 768) {
document.write('<img src=img/scritta768.png >');
} 
else if (screenHeight == 800) {
document.write('<img src=img/scritta800.png >');angew
} 
else if (screenHeight == 1024) {
document.write('<img src=img/scritta1024.png >');
} 
else if (screenHeight == 1200) {
document.write('<img src=img/scritta1200.png >');
} 
else {
document.write('<img src=img/scritta1200.png >');
} 
}  


function divWNVsize () {
var screenWidth = (screen.width - 200) * 0.70;
var screenHeight = screen.height * 0.60;
document.write('<div id=wn style=width:'+ screenWidth + 'px;height:'+ screenHeight + 'px;>')
} 

function divSCROLLBARVsize () {
var screenHeight = screen.height * 0.60;
document.write('<div id=scrollbar style=height:' + screenHeight +';>')
} 

function divTRACKsize () {
var screenHeight = screen.height * 0.60;
//document.write('<div id=scrollbar style=height:' + screenHeight +';>')
document.write('<div id=track style=height:' + screenHeight +' background-color:#77787b;>');
} 

function divWNPsize () {
var screenWidth = (screen.width - 200) * 0.70;
var screenHeight = 100;
document.write('<div id=wn style=width:'+ screenWidth + 'px;height:'+ screenHeight + 'px;>')
} 

function divSCROLLBARPsize () {
var screenHeight = 100;
document.write('<div id=scrollbar style=height:' + screenHeight +';>')
} 

function divWNOsize () {
var screenWidth = (screen.width - 200) * 0.8;
document.write('<div id=wn style=width:'+ screenWidth + 'px;height:100px;>')
} 

function tableSCROLLBAROsize () {
var screenWidth = (screen.width - 200) * 0.8;
document.write('<table width='+ screenWidth +' border=0 cellspacing=0 cellpadding=0>')
} 

function fullImage () {

var screenHeight;
screenHeight = screen.height;
if (screenHeight == 600) {
document.getElementById('fullImage').height = 400 * 0.6;
}
else if (screenHeight == 768) {
document.getElementById('fullImage').height = 400 * 0.6;
} 
else if (screenHeight == 800) {
document.getElementById('fullImage').height = 400 * 0.6;
} 
else if (screenHeight == 1024) {
document.getElementById('fullImage').height = 400 * 1;
} 
else if (screenHeight == 1200) {
document.getElementById('fullImage').height = 400 * 1;
} 
else {
document.getElementById('fullImage').height = 400 * 1;
} 
} 


function catalogoImage (id) {

var screenHeight;
screenHeight = screen.height;
if (screenHeight == 600) {
document.getElementById('fullImage' + id).height = 400 * 0.6;
}
else if (screenHeight == 768) {
document.getElementById('fullImage' + id).height = 400 * 0.820;
} 
else if (screenHeight == 800) {
document.getElementById('fullImage' + id).height = 400 * 0.820;
} 
else if (screenHeight == 1024) {
document.getElementById('fullImage' + id).height = 400 * 1;
} 
else if (screenHeight == 1200) {
document.getElementById('fullImage' + id).height = 400 * 1;
} 
else {
document.getElementById('fullImage' + id).height = 400 * 1;
} 
} 


function mostreImage (id) {

var screenHeight;
screenHeight = screen.height;
if (screenHeight == 600) {
document.getElementById('fullImage' + id).height = 400 * 0.6;
}
else if (screenHeight == 768) {
document.getElementById('fullImage' + id).height = 400 * 0.820;
} 
else if (screenHeight == 800) {
document.getElementById('fullImage' + id).height = 400 * 0.820;
} 
else if (screenHeight == 1024) {
document.getElementById('fullImage' + id).height = 400 * 1;
} 
else if (screenHeight == 1200) {
document.getElementById('fullImage' + id).height = 400 * 1;
} 
else {
document.getElementById('fullImage' + id).height = 400 * 1;
} 
} 


function defaultImage () {

var screenHeight;
screenHeight = screen.height;
if (screenHeight == 600) {
document.getElementById('defaultImage').height = 400 * 0.6;
}
else if (screenHeight == 768) {
document.getElementById('defaultImage').height = 400 * 0.8;
} 
else if (screenHeight == 800) {
document.getElementById('defaultImage').height = 400 * 0.8;
} 
else if (screenHeight == 1024) {
document.getElementById('defaultImage').height = 400 * 1;
} 
else if (screenHeight == 1200) {
document.getElementById('defaultImage').height = 400 * 1;
} 
else {
document.getElementById('defaultImage').height = 400 * 1;
} 
} 


function mappaGoogle () {
var screenWidth = (screen.width - 200) * 0.8;;
var screenHeight = (screen.height - 200) * 0.8;;
document.write('<iframe width=' + screenWidth +' height=' + screenHeight +' frameborder=0 scrolling=no marginheight=0 marginwidth=0 src=http://maps.google.it/maps?f=q&amp;source=s_q&amp;hl=it&amp;q=Via+Sposa,+1b,+06123+Perugia+Perugia,+Umbria&amp;sll=43.112952,12.383866&amp;sspn=0.008991,0.022638&amp;ie=UTF8&amp;cd=2&amp;geocode=FeDZkQIdDve8AA&amp;split=0&amp;hq=&amp;hnear=Via+Sposa,+1,+06123+Perugia,+Umbria&amp;ll=43.121347,12.388029&amp;spn=0.006814,0.014591&amp;z=14&amp;iwloc=A&amp;output=embed></iframe>')
} 

function mappaGoogle1 () {
var screenWidth = (screen.width - 200) * 0.8;;
var screenHeight = (screen.height - 200) * 0.8;;
document.write('<iframe width=' + screenWidth +' height=' + screenHeight +' frameborder=0 scrolling=no marginheight=0 marginwidth=0 src=http://maps.google.it/maps?f=q&amp;source=s_q&amp;hl=it&amp;geocode=&amp;q=perugia+via+della+sposa+1b&amp;sll=41.442726,12.392578&amp;sspn=17.50952,43.286133&amp;ie=UTF8&amp;hq=&amp;hnear=Via+Sposa,+1b,+06123+Perugia,+Umbria&amp;ll=43.121284,12.388201&amp;spn=0.008333,0.021136&amp;z=14&amp;iwloc=A&amp;output=embed></iframe>')
} 

function mappaGoogle2 () {
var screenWidth = (screen.width - 200) * 0.8;;
var screenHeight = (screen.height - 200) * 0.8;;
document.write('<iframe width=' + screenWidth +' height=' + screenHeight +' frameborder=0 scrolling=no marginheight=0 marginwidth=0 src=http://maps.google.it/maps?f=q&amp;source=s_q&amp;hl=it&amp;geocode=&amp;q=perugia+via+san+francesco+8&amp;sll=43.113406,12.384017&amp;sspn=0.008333,0.021136&amp;ie=UTF8&amp;hq=&amp;hnear=Via+San+Francesco,+8,+06123+Perugia,+Umbria&amp;ll=43.121535,12.388372&amp;spn=0.008333,0.021136&amp;z=14&amp;output=embed></iframe>')
} 


function menu() {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" width="180" height="280">\n')
		document.write('<param name="movie" value="swf/menu.swf" />\n')
        document.write('<param name="quality" value="high" />\n')
		document.write('<param name="BGCOLOR" value="#77787b" />\n')
		//document.write('<param name="wmode" value="transparent" />\n')
        document.write('<embed src="swf/menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="180" height="280"></embed>\n')
      document.write('</object>\n')
} 

function changeImmagine(id) {
	var iframe = document.getElementById("iframe");
	iframe.setAttribute("src","immagine.asp?id=" + id);
}
function changeImmagineMostra(id) {
	var iframe = document.getElementById("iframe");
	iframe.setAttribute("src","immagine_mostra.asp?id=" + id);
}
function changeImmagineDove(id) {
	var iframe = document.getElementById("iframe");
	iframe.setAttribute("src","immagine_dove.asp?id=" + id);
}

function homeMostra(id) {
	var iframe = document.getElementById("iframe");
	iframe.setAttribute("src","mostra.asp?id=" + id);
}
function changeStoria(id) {
	var iframe = document.getElementById("iframe");
	iframe.setAttribute("src","doc_storia.asp?id=" + id);
}
function changeCatalogo(id) {
	var iframe = document.getElementById("iframe");
	iframe.setAttribute("src","doc_catalogo.asp?id=" + id);
}

function openZoomWindow(id) {
	var page = "zoom.asp?id=" + id + "&w=" + parseInt(screen.width / 1.2) + "&H=" + parseInt(screen.height / 1.2);
	var left = 1;
	var top = 1;
	if(left == 0)
		left = 1;
	if(top == 0)
		top = 1;
	window.open(page,"RobSmeets","scrollbars=0,resizable=0,width="+screen.width / 1.2 +",height="+screen.height / 1.2 +",top=" + top + ",left=" + left + ",status=0,location=0,toolbar=0");
	return false;
}

function openFullWindow(id) {
	var page = "full.asp?id=" + id + "&w=" + parseInt(screen.width / 1.2) + "&H=" + parseInt(screen.height / 1.2);
	/*var page = "full.asp?id=" + id + "&w=800&H=600";*/
	var left = 1;
	var top = 1;
	if(left == 0)
		left = 1;
	if(top == 0)
		top = 1;
	window.open(page,"RobSmeets","scrollbars=1,resizable=0,width="+screen.width / 1.2 +",height="+screen.height / 1.2 +",top=" + top + ",left=" + left + ",status=0,location=0,toolbar=0");
	return false;
}

function catalogo () {
var linkcatalogo = document.form1.linkcatalogo.value;
var screenWidth = (screen.width - 50) * 0.8;
var screenHeight = (screen.height - 50) * 0.8;
document.write('<iframe width=' + screenWidth +' height=' + screenHeight +' frameborder=0 scrolling=no marginheight=0 marginwidth=0 src=' + linkcatalogo +'/></iframe>')
} 

function openCatalogWindow(id) {

	var page = "catalogo.asp?id=" + id + "&w=" + parseInt(screen.width / 1.2) + "&H=" + parseInt(screen.height / 1.2);
	var left = 1;
	var top = 1;
	if(left == 0)
		left = 1;
	if(top == 0)
		top = 1;
	window.open(page,"RobSmeets","scrollbars=0,resizable=0,width="+screen.width / 1.2 +",height="+screen.height / 1.2 +",top=" + top + ",left=" + left + ",status=0,location=0,toolbar=0");
	return false;
}

function openStoriaWindow(id) {

	var page = "storiaPDF.asp?id=" + id + "&w=" + parseInt(screen.width / 1.2) + "&H=" + parseInt(screen.height / 1.2);
	var left = 1;
	var top = 1;
	if(left == 0)
		left = 1;
	if(top == 0)
		top = 1;
	window.open(page,"RobSmeets","scrollbars=0,resizable=0,width="+screen.width / 1.2 +",height="+screen.height / 1.2 +",top=" + top + ",left=" + left + ",status=0,location=0,toolbar=0");
	return false;
}

function openDescriptionWindow(id) {

	var page = "descrizionemostra.asp?id=" + id + "&w=" + parseInt(screen.width / 1.5) + "&H=" + parseInt(screen.height / 1.5);
	var left = 1;
	var top = 1;
	if(left == 0)
		left = 1;
	if(top == 0)
		top = 1;
	window.open(page,"RobSmeets","scrollbars=0,resizable=0,width="+screen.width / 1.5 +",height="+screen.height / 1.5 +",top=" + top + ",left=" + left + ",status=0,location=0,toolbar=0");
	return false;
}

function openDescriptionPaintWindow(id) {

	var page = "descrizionedipinto.asp?id=" + id + "&w=" + parseInt(screen.width / 1.5) + "&H=" + parseInt(screen.height / 1.5);
	var left = 1;
	var top = 1;
	if(left == 0)
		left = 1;
	if(top == 0)
		top = 1;
	window.open(page,"RobSmeets","scrollbars=0,resizable=0,width="+screen.width / 1.5 +",height="+screen.height / 1.5 +",top=" + top + ",left=" + left + ",status=0,location=0,toolbar=0");
	return false;
}

function openBiografiaWindow(id) {

	var page = "biografia.asp?id=" + id + "&w=" + parseInt(screen.width / 1.5) + "&H=" + parseInt(screen.height / 1.5);
	var left = 1;
	var top = 1;
	if(left == 0)
		left = 1;
	if(top == 0)
		top = 1;
	window.open(page,"RobSmeets","scrollbars=0,resizable=0,width="+screen.width / 1.5 +",height="+screen.height / 1.5 +",top=" + top + ",left=" + left + ",status=0,location=0,toolbar=0");
	return false;
}



function openPrivacyWindow(id) {

	var page = "privacy.asp?id=" + id + "&w=" + parseInt(screen.width / 1.5) + "&H=" + parseInt(screen.height / 1.5);
	var left = 1;
	var top = 1;
	if(left == 0)
		left = 1;
	if(top == 0)
		top = 1;
	window.open(page,"RobSmeets","scrollbars=1,resizable=0,width="+screen.width / 1.5 +",height="+screen.height / 1.5 +",top=" + top + ",left=" + left + ",status=0,location=0,toolbar=0");
	return false;
}

function intro(numero) {
	var screenH = screen.height
	var screenW = screen.width
	var swfWidth = 0
	var swfHeight = 0
	
	if(screenH == 768)
		{
			swfHeight = 1200
			swfWidth = 1500
		}
		
	if((screenH > 768) && (screenH < 1024))
		{
			swfHeight = 1200
			swfWidth = 1500
		}
		
	if(screenH >= 1024)
		{
			swfHeight = 1200
			swfWidth = 1500
		}
		
	//swfHeight = 1200
	//swfWidth = 1500
	
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" width="' + swfWidth + '" height="' + swfHeight + '">\n')
		document.write('<param name="movie" value="intro/' + numero + '.swf" />\n')
        document.write('<param name="quality" value="high" />\n')
		//document.write('<param name="wmode" value="transparent" />\n')
        document.write('<embed src="intro/' + numero + '.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + swfWidth + '" height="' + swfHeight + '" scale="noborder"></embed>\n')
      document.write('</object>\n')
}


function openHome() {
var windowName = 'userConsole'; 
var popUp = window.open('home.asp', '', 'fullscreen=yes, scrollbars=auto'); 
if (popUp == null || typeof(popUp)=='undefined' || typeof(popUp)=='object DOMWindow') {   
} 
else {   
  popUp.focus(); 
}
window.location.href = "default2.htm";
}
