//var correct1=640
//if (screen.width == correct1) {
//alert('Homepage adatta la tua risoluzione inferiore a 800x600. Clicca su HOMEPAGE COMPLETA se vuoi la homepage completa');

var win = null;
var correct1=640;
var correct2=800;
var correct3=1024;
function NewWindow(mypage,myname,w,h,scroll){
if (screen.width==correct1) {
	var w=600;
	var h=440;
} else {
	if (screen.width==correct2) {
	var w=750;
	var h=550;
} else {
	if (screen.width>=correct3) {
	var w=980;
	var h=700;
}
}
}
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? ((screen.height-h)/2-20) : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

function foto(str) {
        searchWin = window.open(str,'foto','scrollbars=yes,resizable=yes,width=550,height=470,status=no,location=no,toolbar=no');
}

function chatfi(str) {
        searchWin = window.open(str,'chatfi','scrollbars=no,resizable=yes,width=575,height=555,status=no,location=no,toolbar=no');
}

function chatso(str) {
        searchWin = window.open(str,'chatso','scrollbars=no,resizable=yes,width=380,height=520,status=no,location=no,toolbar=no');
}

function full(str) {
searchWin = window.open(str,'full','scrollbars=yes, resizable=yes, fullscreen=yes, location=no, toolbar=no');
}

function tuttoschermo(){
window.open("dicono.html","","fullscreen");
}

function webcam(str) {
searchWin = window.open(str,'webcam','scrollbars=no, resizable=no, width=380, height=340, location=no, toolbar=no');
}

function chat_cla(str) {
searchWin = window.open(str,'chat_cla','scrollbars=no, resizable=no, width=540, height=420, location=no, toolbar=no');
}

function sola(str) {
searchWin = window.open(str,'sola','scrollbars=no, resizable=no, width=220, height=300, location=no, toolbar=no');
}

function piccola(str) {
searchWin = window.open(str,'piccola','scrollbars=yes, resizable=yes, width=420, height=320, location=no, status=no, toolbar=no');
}

<!--
/*************************************************************************
This code is from Dynamic Web Coding at http://www.dyn-web.com/
Copyright 2003 by Sharon Paine
See Terms of Use at http://www.dyn-web.com/bus/terms.html
regarding conditions under which you may use this code.
This notice must be retained in the code as is!
*************************************************************************/
var menuLayers = {
timer: null,
activeMenuID: null,
offX: 4, // posizione orizziontale rispetto al cursore
offY: 6, // posizione verticale rispetto al cursore
show: function(id, e) {
var mnu = document.getElementById? document.getElementById(id): null;
if (!mnu) return;
this.activeMenuID = id;
if ( mnu.onmouseout == null ) mnu.onmouseout = this.mouseoutCheck;
if ( mnu.onmouseover == null ) mnu.onmouseover = this.clearTimer;
viewport.getAll();
this.position(mnu,e);
},
hide: function() {
this.clearTimer();
if (this.activeMenuID && document.getElementById)
this.timer = setTimeout("document.getElementById('"+menuLayers.activeMenuID+"').style.visibility = 'hidden'", 200);
},
position: function(mnu, e) {
var x = e.pageX? e.pageX: e.clientX + viewport.scrollX;
var y = e.pageY? e.pageY: e.clientY + viewport.scrollY;
if ( x + mnu.offsetWidth + this.offX > viewport.width + viewport.scrollX )
x = x - mnu.offsetWidth - this.offX;
else x = x + this.offX;
if ( y + mnu.offsetHeight + this.offY > viewport.height + viewport.scrollY )
y = ( y - mnu.offsetHeight - this.offY > viewport.scrollY )? y - mnu.offsetHeight - this.offY : viewport.height + viewport.scrollY - mnu.offsetHeight;
else y = y + this.offY;
mnu.style.left = x + "px"; mnu.style.top = y + "px";
this.timer = setTimeout("document.getElementById('" + menuLayers.activeMenuID + "').style.visibility = 'visible'", 200);
},
mouseoutCheck: function(e) {
e = e? e: window.event;
var mnu = document.getElementById(menuLayers.activeMenuID);
var toEl = e.relatedTarget? e.relatedTarget: e.toElement;
if ( mnu != toEl && !menuLayers.contained(toEl, mnu) ) menuLayers.hide();
},
contained: function(oNode, oCont) {
if (!oNode) return;
while ( oNode = oNode.parentNode )
if ( oNode == oCont ) return true;
return false;
},
clearTimer: function() {
if (menuLayers.timer) clearTimeout(menuLayers.timer);
}
}



