/* Put toghether and modified 2 different scripts for a solution right for me
/*
Browser Language Redirect script- By JavaScript Kit
For this and over 400+ free scripts, visit http://www.javascriptkit.com
This notice must stay intact
*/
// Copyright (c) 1996-1997 Tomer Shiran. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.geocities.com/~yehuda/


if (document.all) {
    brow="document.all";
    parA="[\"";
    parB="\"]";
    styleRef=".style.visibility";
    testH="\"hidden\"";
    testS="\"visible\"";
   }
  else if (document.layers){ //NN4
    brow="document.layers";
    parA="[\"";
    parB="\"]";
    styleRef=".visibility";
    testH="\"hide\"";
    testS="\"show\"";
   }
  else if (document.getElementById) { // Opera, NN6 e FF
    brow="document.getElementById";
    parA="(\"";
    parB="\")";
    styleRef=".style.visibility";
    testH="\"hidden\"";
    testS="\"visible\"";
       }
       
var stato=false;
var stato1="";
//var mailt0="<script>document.write('<a href="
//var mailt1='"mailto:' + wM + '"' + "><font color=#336666> Organizzazione Rievocazione Treponti-Castelnuovo</font></a\>')</script>"
//var mailt=mailt0 + mailt1

var advice=""
advice="@ Tutto il materiale del sito (immagini incluse) è protetto da copyright ed è di esclusiva proprietà del Circolo Patavino Autostoriche (ove non diversamente indicato)."+"<br>Eventuale uso consentito solo dopo esplicita approvazione scritta."

function getCookie(name) {
  var prefix = name + "="
  var cookieStartIndex = document.cookie.indexOf(prefix)
  if (cookieStartIndex == -1){
//   setCookie('LangCook',langredirects[langcodes.length-1],now)
   return   null //"Eng"
   }
  var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
  if (cookieEndIndex == -1){
   cookieEndIndex = document.cookie.length
   }
  return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
//  return 'Eng'
 }

function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value)  +
  ((expires) ? "; expires=" + expires.toGMTString() : "") +
  ((path) ? "; path=" + path : "") +
  ((domain) ? "; domain=" + domain : "") +
  ((secure) ? "; secure" : "")
  document.cookie = curCookie
 }

 function Hide(lname){
  eval(brow+parA+lname+parB+styleRef+"="+testH+";");

 }
 function ShowL1(lname) {
 
 eval(brow+parA+lname+parB+styleRef+"="+testS+";");
 stato1=lname
 }

function ShowHideGen(lnameS){
 
 stato=!stato; 
 stato?ShowL1(lnameS):Hide(lnameS);
 if (stato1!="" && stato1!=lnameS) {
 	Hide(stato1);
 	stato=!stato;
 	stato?ShowL1(lnameS):Hide(lnameS);
 }

}

 function MaxScr(){
  var w=screen.availWidth
  var h=screen.availHeight
  window.moveTo(0,0)
  window.resizeTo(w+2,h)
 }
 
 function Scarica(subdir,modulo){	
//	location.href="http://www.guia.padova.it/TreP/DownL.asp?subdir=" + subdir+"&modulo="+modulo
	var address="http://www.treponti-castelnuovo.it/Downl2.asp?subdir=" + subdir+"&modulo="+modulo
	location.href=address

// 	location.href="http://guia1/autostor/DownLLoc.asp?"+ modulo
 }
 
function ScaricaMdb(subdir,modulo){	
	location.href="http://www.treponti-castelnuovo.it/DownLmdb.asp?subdir=" + subdir+"&modulo="+modulo
 } 

