function forum(){
this.document.formforum.Submit();
}

function change(linguetta, scheda){
if(document.getElementById){
var linguetta_x = document.getElementById(linguetta);
var scheda_x = document.getElementById(scheda);
var linguette = document.getElementById("linguette").getElementsByTagName("li");
var schede = document.getElementById("container").getElementsByTagName("div"); 
for(var i=0; i<linguette.length; i++){
linguette[i].style.height = '30px';
linguette[i].style.background = '#fff';
}
for(var i=0; i<schede.length; i++){
schede[i].style.zIndex = 5;
}
linguetta_x.style.height = '31px';
linguetta_x.style.background = '#e5ecf9';
scheda_x.style.zIndex = 7;
}}

function runClock() {
theTime = window.setTimeout("runClock()", 200);
var today = new Date();
self.status = today.toLocaleString();
}
runClock()

function eventi(a){

b=String(a)
//alert (''+b)
refer=b.substring(40,b.length)
//alert(''+refer)
indirizzo=b
//alert(''+indirizzo)
window.open(''+indirizzo,'e','height=500,width=700,left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,location=no')
//window.navigate(indirizzo)
return false
}


function eventi2(a){

b=String(a)
refer=b.substring(40,b.length)
//alert(''+refer)
indirizzo='eventi.asp?url2='+refer
//alert(''+indirizzo)
window.navigate(indirizzo)
return false
}


function cambiafac(a){
et=this.document.ris.facolta.options.selectedIndex;
ct=this.document.ris.facolta.options[et].text;
ct=ct.replace("'","''")
//alert(''+ct);
if (a>0){
et=this.document.ris.esame.options.selectedIndex;
ct1=this.document.ris.esame.options[et].text;
ct1=ct1.replace("'","''")
window.navigate('Appunti.asp?facolta='+ct+'&esame='+ct1)
}else{
window.navigate('Appunti.asp?facolta='+ct)}
}

function cerca(){
et=this.document.ris.facolta.options.selectedIndex;
ct=this.document.ris.facolta.options[et].text;
et=this.document.ris.esame.options.selectedIndex;
ct1=this.document.ris.esame.options[et].text;
ct1=ct1.replace("'","''")
window.navigate('Appunti.asp?facolta='+ct+'&esame='+ct1+'&submit=cerca')
}

function pubbl(id){

var idfinestra = window.open('img','DESCRIZIONE','height=500,width=700,left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,location=no');
idfinestra.document.open();
idfinestra.document.write("<html><scri")
idfinestra.document.write("pt language=javascript>")
idfinestra.document.write("function ridim(){window.resizeTo(document.images[0].width+50,document.images[0].height+90)}</scri")
idfinestra.document.write("pt>")
idfinestra.document.write("<body onLoad=ridim()><center><img src='/ImgLocali/"+id+"'>");
idfinestra.document.write("</center></body></html>");
idfinestra.document.close();
return false;
}

function cambianom(a){
//alert(''+a)
//lung=this.document.cerca.elements[a].length;
//et=this.document.cerca.elements[a].options.selectedLocali;
//ct=this.document.cerca.elements[a].options[et].text;

ct=this.document.cerca.elements[a].value;
//alert(''+ct);
	if(ct!="Cerca locale" && a==0){

	window.navigate('Locali.asp?lista='+ct)
	}

	if(ct!="Tipo di locale" && a==1){

	window.navigate('Locali.asp?tipo='+ct)
	}

}

function modelesswin(url,mwidth,mheight)
{
  if (document.all&&window.print) //if ie5
     eval('window.showModelessDialog(url,"LOCALE IN EVIDENZA","dialogtop:120px;dialogleft:20px;help:0;resizable:0;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
  else
     eval('window.open(url,"LOCALE IN EVIDENZA","width='+mwidth+'px,height='+mheight+'px,resizable=0,scrollbars=0")')
}


function smista(){
window.open('SmistaIscrizione.htm','Iscrizione','height=200,width=400,left=0,top=0,resizable=yes,scrollbars=no,toolbar=no,location=no')
return false;
}

function cancella(){
d=confirm('CANCELLARE IL PROFILO?')
if (d==true) {return true}
else{return false};
}

function mercatino(id){
//alert('')+id
window.open('Mercatino/'+id,'Cittaditorino','height='+(screen.height-100)+',width='+screen.width+',left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,location=no');
}

function generale(url,titolo,larghezza,altezza){
//alert('')+titolo
window.open(url,titolo,'height='+altezza+',width='+larghezza+',left=0,top=0,resizable=yes,scrollbars=no,toolbar=no,location=no');
return false;
}

function generaleconscroll(url,titolo,larghezza,altezza){
//alert('')+titolo
window.open(url,titolo,'height='+altezza+',width='+larghezza+',left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,location=no');
return false;
}

function generaleconscrolleloc(url,titolo,larghezza,altezza){
//alert('')+titolo
window.open(url,titolo,'height='+altezza+',width='+larghezza+',left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,location=yes');
return false;
}

function messag(id){
//alert('')+id
window.open('http://www.torinoinchat.com/Messaggi.asp?ID='+id,'Cittaditorino','height='+(screen.height-50)+',width='+screen.width+',left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,location=no');
return false;
}

function control(){

ww=document.getElementById('login').value;
aa=document.getElementById('password').value;
si=document.getElementById('sessionid').value;
	if(ww=="" || aa==""){
alert('Inserire sia la login sia la password');
return (false);}else{
//window.navigate('index.asp?valida=Entra&login='+ww+'&password='+aa+'&sid='+si)
document.logg.submit()
}
	}
	
	function passw(){
window.open('http://www.torinoinchat.com/Recupero.asp','PASSWORD','height=200,width=300,left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,location=no')
return false;
}

	function segnalaci(){
window.open('http://www.torinoinchat.com/Segnalaci.asp','PASSWORD','height=400,width=400,left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,location=no')
return false;
}

	function contattaci(){
window.open('http://www.torinoinchat.com/Contattaci.asp','PASSWORD','height=400,width=400,left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,location=no')
return false;
}

function pubbl(id){

var idfinestra = window.open('pippo','DESCRIZIONE','height=500,width=700,left=0,top=0,resizable=yes,scrollbars=yes,toolbar=no,location=no');
idfinestra.document.open();
idfinestra.document.write("<html><scri")
idfinestra.document.write("pt language=javascript>")
idfinestra.document.write("function ridim(){window.resizeTo(document.images[0].width+50,document.images[0].height+90)}</scri")
idfinestra.document.write("pt>")
idfinestra.document.write("<body onLoad=ridim()><center><img src='/ImgLocali/"+id+"'>");
idfinestra.document.write("</center></body></html>");
idfinestra.document.close();
return false;
}

function cambianom(a){
//alert(''+a)
//lung=this.document.cerca.elements[a].length;
//et=this.document.cerca.elements[a].options.selectedLocali;
//ct=this.document.cerca.elements[a].options[et].text;

ct=this.document.cerca.elements[a].value;
//alert(''+ct);
	if(ct!="Cerca locale" && a==0){

	window.navigate('Locali.asp?lista='+ct)
	}

	if(ct!="Tipo di locale" && a==1){

	window.navigate('Locali.asp?tipo='+ct)
	}

}
