Njs.main(function() { var chisiamo = new NjsFlash("#dovesiamo", "http://www.holimites.com//templates/layout/holimites.swf", 198, 198, "dovesiamoflash"); var rounded = new NjsRoundedCorner(".rounded", "http://www.holimites.com//templates/layout/tl.png","http://www.holimites.com//templates/layout/tr.png","http://www.holimites.com//templates/layout/bl.png","http://www.holimites.com//templates/layout/br.png"); var twocolumns = new NjsColumnMatcher(".twocolumns", ".sameheight"); var threecolumns = new NjsColumnMatcher(".threecolumns", ".sameheight"); var toggler = new NjsToggler(".opener", ".open", "openbox", function(){twocolumns.reload();threecolumns.reload();rounded.reload();}); if(Njs.get("#skyline")[0]){ var skyline = Njs.get("#skyline $ul")[0]; var a = Njs.get("#skyline $li"); var len =a.length-1; var tooltipbox = Njs.get("#skyline-tooltip")[0]; tooltipbox.innerHTML = "

" + a[len].innerHTML + "

"; var tooltipboxp = Njs.get("#skyline-tooltip $p")[0]; function vira(){ tooltipbox.innerHTML = "

" + a[len-1].innerHTML + "

"; a[len].animation({"left":"862px","opacity":"0"},500,function(){ z = a[len].cloneNode(true); skyline.removeChild(a[len]); skyline.insertBefore(z,skyline.firstChild); a = Njs.get("#skyline $li"); a[0].setStyle("left","0px").setStyle("opacity","100"); setTimeout(vira,8000); });} setTimeout(vira,8000); } function blink(element,type,tot) { element.style.visibility=type; if(type=="hidden") type = "visible"; else type="hidden"; if(tot<=11) setTimeout(function(){blink(element,type,tot+1)},500); } blinka = document.getElementById("helpblinking"); if(blinka) blink(blinka,"visible",0); function getPageSize(){ var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = document.body.scrollWidth; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else if (document.documentElement && document.documentElement.scrollHeight > document.documentElement.offsetHeight){ // Explorer 6 strict mode xScroll = document.documentElement.scrollWidth; yScroll = document.documentElement.scrollHeight; } else { // Explorer Mac...would also work in Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } // for small pages with total width less then width of the viewport if(xScroll < windowWidth){ pageWidth = windowWidth; } else { pageWidth = xScroll; } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) return arrayPageSize; } arrayPageSize = getPageSize(); winheight=arrayPageSize[1]; var links = Njs.get("$a"); for(var x = 0; x < links.length; x++) { if(links[x].href) { exp = links[x].href.split(/\./); if( exp[exp.length-1] == "jpeg" || exp[exp.length-1] == "jpg" || exp[exp.length-1] == "png" || exp[exp.length-1] == "gif" || exp[exp.length-1] == "bmp" ) links[x].onclick=function() { var win = document.createElement("div"); win.id="imagewin"; document.body.appendChild(win); win = Njs.get("#imagewin")[0]; win.setStyle("position","absolute") .setStyle("top", "0px") .setStyle("left","0px") .setStyle("z-index","100000") .setStyle("width","100%") .setStyle("height",winheight+"px") .setStyle("background","black") .setStyle("opacity","80") .setStyle("cursor","pointer") ; var fsimage = document.createElement("img"); fsimage.id="fsimage"; document.body.appendChild(fsimage); fsimage = Njs.get("#fsimage")[0]; fsimage.setStyle("visibility","hidden"); fsimage.src = this.href; fsimage.addEvent("onload",function(){ this .setStyle("position","absolute") .setStyle("left","50%") .setStyle("margin-left","-" + (this.width/2) + "px") .setStyle("top",(window.pageYOffset+20)+"px") .setStyle("border","1px white solid") .setStyle("background","black") .setStyle("padding","1px") .setStyle("z-index","100001") .setStyle("visibility","visible") .setStyle("cursor","pointer") ; }); win.addEvent("onclick",function(){document.body.removeChild(this);document.body.removeChild(fsimage);}); fsimage.addEvent("onclick",function(){document.body.removeChild(this);document.body.removeChild(win);}); return false; } else if( exp[exp.length-1] == "pdf" || exp[exp.length-1] == "mov" || exp[exp.length-1] == "wmv" || exp[exp.length-1] == "zip" || exp[exp.length-1] == "rar" ) links[x].onclick=function() { //alert("registrato: " + this.href.replace(window.location.protocol + "//" + window.location.host, "")) pageTracker._trackPageview(this.href.replace(window.location.protocol + "//" + window.location.host, "")); }; } } function kH(e) { var pK = e ? e.which : window.event.keyCode; return pK != 13; } document.onkeypress = kH; //var ds=Njs.get("input"); //if(Njs.browser.ff || Njs.browser.ie) //for(var dds=0;dds 3 ? j % 3 : 0; return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ""); }