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');
location.href="indexi.html";
}

var head="display:''"
foto1=new Image()
foto1.src="foto/fold.gif"
foto2=new Image()
foto2.src="foto/open.gif"
var ns6=document.getElementById&&!document.all
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
function checkcontained(e){
var iscontained=0
cur=ns6? e.target : event.srcElement
i=0
if (cur.id=="foldheader")
iscontained=1
else
while (ns6&&cur.parentNode||(ie4&&cur.parentElement)){
if (cur.id=="foldheader"||cur.id=="foldinglist"){
iscontained=(cur.id=="foldheader")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentElement
}
if (iscontained){
var foldercontent=ns6? cur.nextSibling.nextSibling : cur.all.tags("UL")[0]
if (foldercontent.style.display=="none"){
foldercontent.style.display=""
cur.style.listStyleImage="url(foto/open.gif)"
}
else{
foldercontent.style.display="none"
cur.style.listStyleImage="url(foto/fold.gif)"
}
}
}
if (ie4||ns6)
document.onclick=checkcontained
function open_page(qq){ document.all.prima.src = qq }

function PageChanger(page) {
{
window.frames['prima'].location=page;
document.rubriche.indirizzi.options[0].selected=true;
}
}

function PageChanger2(page) {
{
document.location=page;
document.rubriche2.indirizzi2.options[0].selected=true;
}
}

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)
}

var bookmarkurl="http://www.veglieonline.it"
var bookmarktitle="A - Veglie OnLine - un grande sito su Veglie"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

 		
function foto(str) {
        searchWin = window.open(str,'foto','scrollbars=no,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 formHandler(str1) {
{var str1 = form1.site.options[form1.site.selectedIndex].value;
prima = open_page(str1,'formHandler','scrollbars=yes,resizable=yes,width=440,height=420,status=no,location=no,toolbar=no');
}


function tuttoschermo(){
window.open("dicono.html","","fullscreen");
}

function grande(){
window.open("bambini/index_bambi2.html","","fullscreen");
}

function calcCharLeft1(Target1) {
  StrLen1 = Target1.value.length;
if (StrLen1 > 160 ) {
  Target1.value = Target1.value.substring(0,160)
  CharsLeft1 = 0
  window.alert("Lunghezza stringa eccessiva di: " + (StrLen1-160) + " carattere/i");
} else {
  CharsLeft = 160 - StrLen1
}
document.sms.rimasti1.value = 160 - Target1.value.length
}
}

