function showhide(id) {
	if (document.getElementById) {
		obj = document.getElementById(id);
		if (obj.style.display == "none") { obj.style.display = "block";} else {obj.style.display = "none";}
	}
}
function hide(cosa) {document.getElementById(cosa).style.display = "none";}

function show(cosa) {document.getElementById(cosa).style.display = "block";}


imgout=new Image(4,7);
imgin=new Image(7,4);

////////INSERISCI QUI IL PERCORSO PER LE DUE IMMAGINI///////////
imgout.src="_template/template01/images/arrow1.gif";
imgin.src="_template/template01/images/arrow2.gif";
///////////////////////////////////////////////////////////////

//questo è lo switch tra le due icone aperto e chiuso
function filter(imagename,objectsrc){
    if (document.images){
        document.images[imagename].src=eval(objectsrc+".src");
    }
}

//ora in base al browser utilizzo le proprietà corrette di visibilità
function showhideimg(id) {
   
    if (document.getElementById) { // DOM3 = IE5+, NS6+, FF
        if (document.getElementById(id).style.display == "none"){
            document.getElementById(id).style.display = 'block';
            filter(("img"+id),'imgin');           
        } else {
            filter(("img"+id),'imgout');
            document.getElementById(id).style.display = 'none';           
        }   
    } else {
        if (document.layers) { // NS4.7 
            if (document.id.display == "none"){
                document.id.display = 'block';
                filter(("img"+id),'imgin');
            } else {
                filter(("img"+id),'imgout');   
                document.id.display = 'none';
            }
        } else { //IE 4
            if (document.all.id.style.visibility == "none"){
                document.all.id.style.display = 'block';
            } else {
                filter(("img"+id),'imgout');
                document.all.id.style.display = 'none';
            }
        }
    }
}

function verificaemail(str){
	var regexp=/^.+@.+\..{2,3}$/;
	return (regexp.test(str))
}

function aprichiudi( targetId ){
	if (document.getElementById){ target = document.getElementById( targetId );
		if (target.style.display == "none"){target.style.display = "block";}
		else {target.style.display = "none";}
	}
}

function Maiuscolo(stringa) {
return stringa.substr(0,1).toUpperCase()+stringa.substr(1);

}

function bigimage(image,title,wid,hgt){
sw=(screen.width-wid)/2;
sh=(screen.height-hgt)/2;
newwin=window.open('','newwin','width='+wid+',height='+hgt+',scrollbars=0,resizable=0,menubars=0,toolbars=0,loca tion=0,directories=0,status=0,top='+sh+',left='+sw+'');
newwin.document.open();
newwin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n');
newwin.document.write('"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
newwin.document.write('\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />\n');
newwin.document.write('<meta http-equiv="Imagetoolbar" content="no" />\n');
newwin.document.write('<title>'+title+'</title>\n');
newwin.document.write('</head>');
newwin.document.write('<body style="margin:0;padding:0">\n<img src="'+image+'" width="'+wid+'" height="'+hgt+'" />');
newwin.document.write('\n</body></html>');
newwin.document.close();
newwin.focus();
}


