




function get_file(dir,file) {
  document.DL.truedir.value=dir;
  document.DL.directory.value="private";
  document.DL.fname.value=file;
  document.DL.submit();
 
}
function sposta_zoom(){
var l = screen.width;
var a = screen.height;
	dim_x=850
	dim_y=650
	var wi = (l-dim_x)/2;
	var he = (a-dim_y)/2;
	       w.focus();
       w.moveTo(wi,he)   


}
function nascondi(cosa){
var elem = document.getElementById(cosa);
elem.className="nascosto";
}
function nascondi_auth(){
var elem = document.getElementById('auth_msg');
elem.className="nascosto";
}
function rendi_visibile(cosa){
var elem = document.getElementById(cosa);
elem.className="visibile";
}
function CookieValue (offset) {
 var stringend = document.cookie.indexOf (";", offset);
 if (stringend == -1)
  stringend = document.cookie.length;
 return unescape(document.cookie.substring(offset, stringend)).replace("+"," ");
}
function get_info_area(){

 name="auth";
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var none = '';
  var i = 0;
  nascondimsg=1;
  while (i < clen) {
   var a = i + alen;
     if (document.cookie.substring(i, a) == arg) {
       if (CookieValue(a) == "si") {
	   if(document.getElementById("video") !=null){
         rendi_visibile("video");
		 }
         if (document.getElementById("fdownload") !=null) {
           rendi_visibile("fdownload");
         }
         if (document.getElementById("messaggio") !=null) {
         nascondi("messaggio");
         }
         nascondi("auth_panel");
         nascondi("auth_msg");
         nascondimsg=0;
       } else {/*se non č autorizzato*/
         rendi_visibile("auth_msg");
         Delete_Cookie("auth","/",""); 
		 /*03 02 10*/
         nascondimsg=0;
		 setTimeout("nascondi('auth_msg')",3000)
		 document.location.href="#auth_panel"
		// setTimeout(“timer()”, 5000);
       }
     } 
       //return CookieValue(a);
     i = document.cookie.indexOf(" ", i) + 1;
     if (i == 0) break;
 }
 if (nascondimsg)   {
     nascondi("auth_msg");
 }
return none; 


}
// this deletes the cookie when called
function Delete_Cookie( name, path, domain ) {
if ( Get_Cookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
function Get_Cookie( name ) {

var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
	


