﻿	var s = document.createElement('script');
	s.setAttribute('type', 'text/javascript');
	s.setAttribute('src', '/FastBooking/fastbooking.js');
	var head = document.getElementsByTagName('head')[0];
	if(head){
		head.appendChild(s);
	}else{
		document.body.appendChild(s);
	}






function popneon(URL,l_larghezza, l_margintop){

    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
    var ieversion=new Number(RegExp.$1)
    }
    cornice = document.getElementById('neonbox');
    contenuto=document.getElementById('neoninside');
    if (URL == '') {

    } else {
            Frame=document.getElementById('neonframe');
            Frame.src= URL ;
    }

    cornice.className = 'neonfull';
    cornice.style.display = 'block';
    contenuto.className = 'neoninside';
    contenuto.style.display = 'block';
    contenuto.style.height = '100%';
    
    if (l_larghezza > 0) {
        Frame.style.width = l_larghezza+'px';
    }
        if (l_margintop > 0) {
        Frame.style.marginTop = l_margintop+'px';
    }
    
        if (ieversion<=6) {
        
        return true;
        
        } else {
        
        return false;
    }
}

function unpopneon() {
    cornice = document.getElementById('neonbox');
    contenuto = document.getElementById('neoninside');
    cornice.style.display = 'none';
    contenuto.style.display = 'none';
}

function jsScroller(el,dr,ty,oy,spd) { 
		 var g,gg,fr,sp,pa='',slw=true,m=false,h,ly;ty=parseInt(ty);
		 if((g=document.getElementById(el))!=null){gg=(document.layers)?g:g.style;}else{return;}
		 if(dr=="Stop"){if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=false;}
		 if((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1)&& !window.opera){pa="px";}
		 if(navigator.userAgent.indexOf("NT")>-1 || navigator.userAgent.indexOf("Windows 2000")>-1){slw=false;}
		 if(spd=="Slow"){       sp=(slw)?2:1;fr=(slw)?40:30;}
		 else if(spd=="Medium"){sp=(slw)?4:1;fr=(slw)?40:10;
		 }
		 else if(spd=="Fast"){  sp=(slw)?4:4;fr=(slw)?4:4;
		 }
		 else{sp=(slw)?8:4;fr=(slw)?20:10;}
		 if(spd=="Warp"){sp=5000;}var yy=parseInt(gg.top);if(isNaN(yy)){
		 if(g.currentStyle){yy=parseInt(g.currentStyle.top);}else if(document.defaultView){
		 yy=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("top"));}else{yy=0;}}
		 if(document.all || document.getElementById){h=parseInt(g.offsetHeight);
		 if(!h){h=parseInt(g.style.pixelHeight);}
		 }else if(document.layers){h=parseInt(g.clip.height);}ly=ty+parseInt(oy)-h;
		 if(dr=="Down"){if(yy>ly){m=true;yy-=sp;if(yy<ly){yy=ly;}}}
		 if(dr=="Up"){if(yy<ty){m=true;yy+=sp;if(yy>ty){yy=ty;}}}
		 if(dr=="Reset"){gg.top=ty+pa;if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=false;}
		 if(m){gg.top=yy+pa;if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=true;
		  eval("g.p7Magic=setTimeout(\"jsScroller('"+el+"','"+dr+"',"+ty+","+oy+",'"+spd+"')\","+fr+")");
		 }else{g.toMove=false;}
	}
	
function LBD(url,alt) {
            var objLink = document.createElement('a');
            objLink.setAttribute('href',url.replace('_small', '_big'));
            objLink.setAttribute('rel','lightbox');
            objLink.setAttribute('title',alt);
            Lightbox.prototype.start(objLink);
}

function LBZ(url,alt) {
            var objLink = document.createElement('a');
            objLink.setAttribute('href',url.replace('_small.jpg', '.zip'));
            objLink.setAttribute('rel','lightbox');
            objLink.setAttribute('title',alt);
            Lightbox.prototype.start(objLink);
}

function scrollagiu() {
     var url = window.location + " ";
    var urlparts = url.split('/');
    var host = urlparts[2];

    var ref = document.referrer + " ";
    var refparts = ref.split('/');
    var refhost = refparts[2];
        if (refhost == host) {
            window.scrollTo(0,386);
        }
       /* alert(refhost + " " + host);*/
}


if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  if (myWidth < 481) {
  document.write('<link rel="stylesheet" type="text/css" href="/smallscreen.css">');
	}

