/* Nifty Corners Cube - rounded corners with CSS and Javascript - Copyright 2006 Alessandro Fulciniti (a.fulciniti@html.it) - GNU General Public License */
var niftyOk=(document.getElementById && document.createElement && Array.prototype.push); var niftyCss=false; String.prototype.find=function(what){ return(this.indexOf(what)>=0 ? true : false);}
var oldonload=window.onload; if(typeof(NiftyLoad)!='function') NiftyLoad=function(){}; if(typeof(oldonload)=='function')
window.onload=function(){oldonload();AddCss();NiftyLoad()}; else window.onload=function(){AddCss();NiftyLoad()}; function AddCss(){ niftyCss=true; var l=CreateEl("link"); l.setAttribute("type","text/css"); l.setAttribute("rel","stylesheet"); l.setAttribute("href","css/niftyCorners.css"); l.setAttribute("media","screen"); document.getElementsByTagName("head")[0].appendChild(l);}
function Nifty(selector,options){ if(niftyOk==false) return; if(niftyCss==false) AddCss(); var i,v=selector.split(","),h=0; if(options==null) options=""; if(options.find("fixed-height"))
h=getElementsBySelector(v[0])[0].offsetHeight; for(i=0;i<v.length;i++)
Rounded(v[i],options); if(options.find("height")) SameHeight(selector,h);}
function Rounded(selector,options){ var i,top="",bottom="",v=new Array(); if(options!=""){ options=options.replace("left","tl bl"); options=options.replace("right","tr br"); options=options.replace("top","tr tl"); options=options.replace("bottom","br bl"); options=options.replace("transparent","alias"); if(options.find("tl")){ top="both"; if(!options.find("tr")) top="left";}
else if(options.find("tr")) top="right"; if(options.find("bl")){ bottom="both"; if(!options.find("br")) bottom="left";}
else if(options.find("br")) bottom="right";}
if(top=="" && bottom=="" && !options.find("none")){top="both";bottom="both";}
v=getElementsBySelector(selector); for(i=0;i<v.length;i++){ FixIE(v[i]); if(top!="") AddTop(v[i],top,options); if(bottom!="") AddBottom(v[i],bottom,options);}
}
function AddTop(el,side,options){ var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color; d.style.marginLeft="-"+getPadding(el,"Left")+"px"; d.style.marginRight="-"+getPadding(el,"Right")+"px"; if(options.find("alias") || (color=getBk(el))=="transparent"){ color="transparent";bk="transparent"; border=getParentBk(el);btype="t";}
else{ bk=getParentBk(el); border=Mix(color,bk);}
d.style.background=bk; d.className="niftycorners"; p=getPadding(el,"Top"); if(options.find("small")){ d.style.marginBottom=(p-2)+"px"; btype+="s"; lim=2;}
else if(options.find("big")){ d.style.marginBottom=(p-10)+"px"; btype+="b"; lim=8;}
else d.style.marginBottom=(p-5)+"px"; for(i=1;i<=lim;i++)
d.appendChild(CreateStrip(i,side,color,border,btype)); el.style.paddingTop="0"; el.insertBefore(d,el.firstChild);}
function AddBottom(el,side,options){ var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color; d.style.marginLeft="-"+getPadding(el,"Left")+"px"; d.style.marginRight="-"+getPadding(el,"Right")+"px"; if(options.find("alias") || (color=getBk(el))=="transparent"){ color="transparent";bk="transparent"; border=getParentBk(el);btype="t";}
else{ bk=getParentBk(el); border=Mix(color,bk);}
d.style.background=bk; d.className="niftycorners"; p=getPadding(el,"Bottom"); if(options.find("small")){ d.style.marginTop=(p-2)+"px"; btype+="s"; lim=2;}
else if(options.find("big")){ d.style.marginTop=(p-10)+"px"; btype+="b"; lim=8;}
else d.style.marginTop=(p-5)+"px"; for(i=lim;i>0;i--)
d.appendChild(CreateStrip(i,side,color,border,btype)); el.style.paddingBottom=0; el.appendChild(d);}
function CreateStrip(index,side,color,border,btype){ var x=CreateEl("b"); x.className=btype+index; x.style.backgroundColor=color; x.style.borderColor=border; if(side=="left"){ x.style.borderRightWidth="0"; x.style.marginRight="0";}
else if(side=="right"){ x.style.borderLeftWidth="0"; x.style.marginLeft="0";}
return(x);}
function CreateEl(x){ return(document.createElement(x));}
function FixIE(el){ if(el.currentStyle!=null && el.currentStyle.hasLayout!=null && el.currentStyle.hasLayout==false)
el.style.display="inline-block";}
function SameHeight(selector,maxh){ var i,v=selector.split(","),t,j,els=[],gap; for(i=0;i<v.length;i++){ t=getElementsBySelector(v[i]); els=els.concat(t);}
for(i=0;i<els.length;i++){ if(els[i].offsetHeight>maxh) maxh=els[i].offsetHeight; els[i].style.height="auto";}
for(i=0;i<els.length;i++){ gap=maxh-els[i].offsetHeight; if(gap>0){ t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px"; nc=els[i].lastChild; if(nc.className=="niftycorners")
els[i].insertBefore(t,nc); else els[i].appendChild(t);}
}
}
function getElementsBySelector(selector){ var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c; if(selector.find("#")){ if(selector.find(" ")){ s=selector.split(" "); var fs=s[0].split("#"); if(fs.length==1) return(objlist); f=document.getElementById(fs[1]); if(f){ v=f.getElementsByTagName(s[1]); for(i=0;i<v.length;i++) objlist.push(v[i]);}
return(objlist);}
else{ s=selector.split("#"); tag=s[0]; selid=s[1]; if(selid!=""){ f=document.getElementById(selid); if(f) objlist.push(f); return(objlist);}
}
}
if(selector.find(".")){ s=selector.split("."); tag=s[0]; selclass=s[1]; if(selclass.find(" ")){ s=selclass.split(" "); selclass=s[0]; tag2=s[1];}
}
var v=document.getElementsByTagName(tag); if(selclass==""){ for(i=0;i<v.length;i++) objlist.push(v[i]); return(objlist);}
for(i=0;i<v.length;i++){ c=v[i].className.split(" "); for(j=0;j<c.length;j++){ if(c[j]==selclass){ if(tag2=="") objlist.push(v[i]); else{ v2=v[i].getElementsByTagName(tag2); for(k=0;k<v2.length;k++) objlist.push(v2[k]);}
}
}
}
return(objlist);}
function getParentBk(x){ var el=x.parentNode,c; while(el.tagName.toUpperCase()!="HTML" && (c=getBk(el))=="transparent")
el=el.parentNode; if(c=="transparent") c="#FFFFFF"; return(c);}
function getBk(x){ var c=getStyleProp(x,"backgroundColor"); if(c==null || c=="transparent" || c.find("rgba(0, 0, 0, 0)"))
return("transparent"); if(c.find("rgb")) c=rgb2hex(c); return(c);}
function getPadding(x,side){ var p=getStyleProp(x,"padding"+side); if(p==null || !p.find("px")) return(0); return(parseInt(p));}
function getStyleProp(x,prop){ if(x.currentStyle)
return(x.currentStyle[prop]); if(document.defaultView.getComputedStyle)
return(document.defaultView.getComputedStyle(x,'')[prop]); return(null);}
function rgb2hex(value){ var hex="",v,h,i; var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/; var h=regexp.exec(value); for(i=1;i<4;i++){ v=parseInt(h[i]).toString(16); if(v.length==1) hex+="0"+v; else hex+=v;}
return("#"+hex);}
function Mix(c1,c2){ var i,step1,step2,x,y,r=new Array(3); if(c1.length==4)step1=1; else step1=2; if(c2.length==4) step2=1; else step2=2; for(i=0;i<3;i++){ x=parseInt(c1.substr(1+step1*i,step1),16); if(step1==1) x=16*x+x; y=parseInt(c2.substr(1+step2*i,step2),16); if(step2==1) y=16*y+y; r[i]=Math.floor((x*50+y*50)/100); r[i]=r[i].toString(16); if(r[i].length==1) r[i]="0"+r[i];}
return("#"+r[0]+r[1]+r[2]);}
/* SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ - (c) 2007 Geoff Stearns - MIT License */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
var iBox=function(){var _pub={close_label:"Close",padding:100,inherit_frames:false,fade_in_speed:0,attribute_name:"rel",tags_to_hide:["select","embed","object"],default_width:450,is_opera:navigator.userAgent.indexOf("Opera/9")!=-1,is_ie:navigator.userAgent.indexOf("MSIE ")!=-1,is_ie6:false,is_firefox:navigator.appName=="Netscape"&&navigator.userAgent.indexOf("Gecko")!=-1&&navigator.userAgent.indexOf("Netscape")==-1,is_mac:navigator.userAgent.indexOf("Macintosh")!=-1,base_url:"",setPath:function(path){_pub.base_url=path},bind:function(fn){var args=[];for(var n=1;n<arguments.length;n++){args.push(arguments[n])}return function(e){return fn.apply(this,[e].concat(args))}},html:function(content,params){if(content===undefined){return els.content}if(cancelled){return }_pub.clear();els.wrapper.style.display="block";els.wrapper.style.visibility="hidden";els.content.style.height="auto";if(typeof (content)=="string"){els.content.innerHTML=content}else{els.content.appendChild(content)}var elemSize=_pub.getElementSize(els.content);var pageSize=_pub.getPageSize();if(params.can_resize===undefined){params.can_resize=true}if(params.fade_in===undefined){params.use_fade=true}if(params.width){var width=parseInt(params.width)}else{var width=_pub.default_width}if(params.height){var height=parseInt(params.height)}else{var height=elemSize.height}els.wrapper.style.width=width+"px";els.wrapper.style.height=height+"px";if(!params.height){var elemSize=_pub.getElementSize(els.content);var height=elemSize.height}if(params.can_resize){_pub.resizeObjectToScreen(els.content,width,height,params.constrain)}else{els.content.style.width=width+"px";els.content.style.height=height+"px"}var elemSize=_pub.getElementSize(els.content);els.wrapper.style.width=elemSize.width+"px";els.wrapper.style.height=elemSize.height+"px";_pub.reposition();els.wrapper.style.visibility="visible";_pub.fadeIn(els.wrapper,10,params.fade_in?_pub.fade_in_speed:0)},clear:function(){els.loading.style.display="none";while(els.content.firstChild){els.content.removeChild(els.content.firstChild)}},show:function(text,title,params){_pub.hide();showInit(title,params,function(){_pub.html(text,params)})},showURL:function(url,title,params){showInit(title,params,function(){cancelled=false;for(var i=0;i<_pub.plugins.list.length;i++){var plugin=_pub.plugins.list[i];if(plugin.match(url)){active_plugin=plugin;plugin.render(url,params);break}}})},hide:function(){if(active_plugin){if(active_plugin.unload){active_plugin.unload()}active_plugin=null}window.onscroll=null;_pub.clear();for(var i=0;i<_pub.tags_to_hide.length;i++){showTags(_pub.tags_to_hide[i])}els.loading.style.display="none";els.overlay.style.display="none";els.wrapper.style.display="none";_pub.fireEvent("hide")},resizeObjectToScreen:function(obj,width,height,constrain){var pagesize=_pub.getPageSize();var x=pagesize.width-_pub.padding;var y=pagesize.height-_pub.padding;if(!height){var height=obj.height}if(!width){var width=obj.width}if(width>x){if(constrain){height=height*(x/width)}width=x}if(height>y){if(constrain){width=width*(y/height)}height=y}obj.style.width=width+"px";obj.style.height=height+"px"},reposition:function(e){_pub.center(els.loading);_pub.center(els.wrapper);var pageSize=_pub.getPageSize();var scrollPos=_pub.getScrollPos();if(_pub.is_ie6){els.overlay.style.width=document.documentElement.clientWidth+"px"}var height=Math.max(document.documentElement.clientHeight,document.body.clientHeight);els.overlay.style.height=height+"px"},center:function(obj){var pageSize=_pub.getPageSize();var scrollPos=_pub.getScrollPos();var emSize=_pub.getElementSize(obj);var x=Math.round((pageSize.width-emSize.width)/2+scrollPos.scrollX);var y=Math.round((pageSize.height-emSize.height)/2+scrollPos.scrollY);obj.style.left=x+"px";obj.style.top=y+"px"},getStyle:function(obj,styleProp){if(obj.currentStyle){return obj.currentStyle[styleProp]}else{if(window.getComputedStyle){return document.defaultView.getComputedStyle(obj,null).getPropertyValue(styleProp)}}},getScrollPos:function(){var docElem=document.documentElement;return{scrollX:document.body.scrollLeft||window.pageXOffset||(docElem&&docElem.scrollLeft),scrollY:document.body.scrollTop||window.pageYOffset||(docElem&&docElem.scrollTop)}},getPageSize:function(){return{width:window.innerWidth||(document.documentElement&&document.documentElement.clientWidth)||document.body.clientWidth,height:window.innerHeight||(document.documentElement&&document.documentElement.clientHeight)||document.body.clientHeight}},getElementSize:function(obj){return{width:obj.offsetWidth||obj.style.pixelWidth,height:obj.offsetHeight||obj.style.pixelHeight}},fadeIn:function(obj,level,speed,callback){if(level===undefined){var level=100}if(speed===undefined){var speed=70}if(!speed){_pub.setOpacity(null,obj,level*10);if(callback){callback()}return }_pub.setOpacity(null,obj,0);for(var i=0;i<=level;i++){setTimeout(_pub.bind(_pub.setOpacity,obj,i*10),speed*i)}if(callback){setTimeout(callback,speed*(i+1))}},setOpacity:function(e,obj,value){obj.style.opacity=value/100;obj.style.filter="alpha(opacity="+value+")"},createXMLHttpRequest:function(){var http;if(window.XMLHttpRequest){http=new XMLHttpRequest();if(http.overrideMimeType){http.overrideMimeType("text/html")}}else{if(window.ActiveXObject){try{http=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{http=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}}}if(!http){alert("Cannot create XMLHTTP instance");return false}return http},addEvent:function(obj,evType,fn){if(obj.addEventListener){obj.addEventListener(evType,fn,false);return true}else{if(obj.attachEvent){var r=obj.attachEvent("on"+evType,fn);return r}else{return false}}},addEventListener:function(name,callback){if(!events[name]){events[name]=new Array()}events[name].push(callback)},fireEvent:function(name){if(events[name]&&events[name].length){for(var i=0;i<events[name].length;i++){var args=[];for(var n=1;n<arguments.length;n++){args.push(arguments[n])}if(events[name][i](args)===false){break}}}},parseQuery:function(query){var params=new Object();if(!query){return params}var pairs=query.split(/[;&]/);var end_token;for(var i=0;i<pairs.length;i++){var keyval=pairs[i].split("=");if(!keyval||keyval.length!=2){continue}var key=unescape(keyval[0]);var val=unescape(keyval[1]);val=val.replace(/\+/g," ");if(val[0]=='"'){var token='"'}else{if(val[0]=="'"){var token="'"}else{var token=null}}if(token){if(val[val.length-1]!=token){do{i+=1;val+="&"+pairs[i]}while((end_token=pairs[i][pairs[i].length-1])!=token)}val=val.substr(1,val.length-2)}params[key]=val}return params},handleTag:function(e){var t=this.getAttribute("rel");var params=_pub.parseQuery(t.substr(5,999));if(params.target){var url=params.target}else{if(this.target&&!params.ignore_target){var url=this.target}else{var url=this.href}}var title=this.title;if(_pub.inherit_frames&&window.parent){window.parent.iBox.showURL(url,title,params)}else{_pub.showURL(url,title,params)}return false},plugins:{list:new Array(),register:function(func,last){if(!last){_pub.plugins.list=_pub.plugins.list.concat([func],_pub.plugins.list)}else{_pub.plugins.list.push(func)}}}};var cancelled=false;var active_plugin=null;var events={};var els={wrapper:null,footer:null,content:null,overlay:null,loading:null};var create=function(elem){var container=document.createElement("div");container.id="ibox";container.style.display="block";els.overlay=document.createElement("div");els.overlay.style.display="none";els.overlay.id="ibox_overlay";els.overlay.onclick=_pub.hide;container.appendChild(els.overlay);els.loading=document.createElement("div");els.loading.id="ibox_loading";els.loading.innerHTML="Loading...";els.loading.style.display="none";els.loading.onclick=function(){_pub.hide();cancelled=true};container.appendChild(els.loading);els.wrapper=document.createElement("div");els.wrapper.id="ibox_wrapper";els.wrapper.style.display="none";els.content=document.createElement("div");els.content.id="ibox_content";els.wrapper.appendChild(els.content);var child=document.createElement("div");child.id="ibox_footer_wrapper";var child2=document.createElement("a");child2.innerHTML=_pub.close_label;child2.href="javascript:void(0)";child2.onclick=_pub.hide;child.appendChild(child2);els.footer=document.createElement("div");els.footer.id="ibox_footer";els.footer.innerHTML="&nbsp;";child.appendChild(els.footer);els.wrapper.appendChild(child);container.appendChild(els.wrapper);elem.appendChild(container);return container};var hideTags=function(tag){var list=document.getElementsByTagName(tag);for(var i=0;i<list.length;i++){if(_pub.getStyle(list[i],"visibility")!="hidden"&&list[i].style.display!="none"){list[i].style.visibility="hidden";list[i].wasHidden=true}}};var showTags=function(tag){var list=document.getElementsByTagName(tag);for(var i=0;i<list.length;i++){if(list[i].wasHidden){list[i].style.visibility="visible";list[i].wasHidden=null}}};var showInit=function(title,params,callback){els.loading.style.display="block";_pub.center(els.loading);_pub.reposition();if(!_pub.is_firefox){var amount=8}else{var amount=10}for(var i=0;i<_pub.tags_to_hide.length;i++){hideTags(_pub.tags_to_hide[i])}window.onscroll=_pub.reposition;els.footer.innerHTML=title||"&nbsp;";els.overlay.style.display="block";els.overlay.style.backgroundImage="url('"+_pub.base_url+"css/bg.png')";_pub.fadeIn(els.overlay,amount,_pub.fade_in_speed,callback);_pub.fireEvent("show")};var drawCSS=function(){var core_styles="#ibox {z-index:1000000;} #ibox_overlay {position:absolute;top:0;left:0;right:0;z-index:1000000;} #ibox_loading {position:absolute;z-index:1000001;} #ibox_wrapper {position:absolute;top:0;left:0;z-index:1000001;padding:25px 10px 10px 10px;} #ibox_content {z-index:1000002;overflow:auto;height:100%;position:relative;padding:2px;text-align:left;} #ibox_content object { display:block;} #ibox_content .ibox_image {width:100%;height:100%;margin:0;padding:0;border:0;display:block;} #ibox_footer_wrapper a {float:right;display:block;outline:0;margin:0;padding:0;} #ibox_footer_wrapper {text-align:left;position:absolute;top:5px;right:10px;left:10px;white-space:nowrap;overflow:hidden;}";var default_skin="#ibox_footer_wrapper {font-weight:bold;}#ibox_footer_wrapper a {text-decoration:underline;color:darkblue;text-transform:lowercase;font-weight:normal;font-family:Arial, Helvetica, sans-serif;font-size:12px;}#ibox_footer_wrapper {font-size:12px;font-family:Arial, Helvetica, sans-serif;}#ibox_wrapper {border:1px solid #ccc;}#ibox_wrapper, #ibox_footer_wrapper a {background-color:#999;}#ibox_content {background-color:#fff;border:1px solid #666;}";var head=document.getElementsByTagName("head")[0];var htmDiv=document.createElement("div");htmDiv.innerHTML='<p>x</p><style type="text/css">'+default_skin+"</style>";head.insertBefore(htmDiv.childNodes[1],head.firstChild);htmDiv.innerHTML='<p>x</p><style type="text/css">'+core_styles+"</style>";head.insertBefore(htmDiv.childNodes[1],head.firstChild)};var initialize=function(){drawCSS();var els=document.getElementsByTagName("a");for(var i=0;i<els.length;i++){if(els[i].getAttribute(_pub.attribute_name)){var t=els[i].getAttribute(_pub.attribute_name);if((t.indexOf("ibox")!=-1)||t.toLowerCase()=="ibox"){els[i].onclick=_pub.handleTag}}}create(document.body);_pub.http=_pub.createXMLHttpRequest()};_pub.addEvent(window,"keypress",function(e){if(e.keyCode==(window.event?27:e.DOM_VK_ESCAPE)){iBox.hide()}});_pub.addEvent(window,"resize",_pub.reposition);_pub.addEvent(window,"load",initialize);var iBoxPlugin_Container=function(){var was_error=false;var original_wrapper=null;return{match:function(url){return url.indexOf("#")!=-1},unload:function(){if(was_error){return }var elemSrc=_pub.html().firstChild;elemSrc.style.display="none";original_wrapper.appendChild(elemSrc)},render:function(url,params){was_error=false;var elemSrcId=url.substr(url.indexOf("#")+1);var elemSrc=document.getElementById(elemSrcId);if(!elemSrc){was_error=true;_pub.html(document.createTextNode("There was an error loading the document."),params)}else{original_wrapper=elemSrc.parentNode;elemSrc.style.display="block";_pub.html(elemSrc,params)}}}}();_pub.plugins.register(iBoxPlugin_Container,true);var iBoxPlugin_Image=function(){var image_types=/\.jpg|\.jpeg|\.png|\.gif/gi;return{match:function(url){return url.match(image_types)},render:function(url,params){var img=document.createElement("img");img.onclick=_pub.hide;img.className="ibox_image";img.style.cursor="pointer";img.onload=function(){_pub.html(img,{height:img.height,width:img.width,constrain:true})};img.onerror=function(){_pub.html(document.createTextNode("There was an error loading the document."),params)};img.src=url}}}();_pub.plugins.register(iBoxPlugin_Image);var iBoxPlugin_YouTube=function(){var youtube_url=/(?:http:\/\/)?(?:www\d*\.)?(youtube\.(?:[a-z]+))\/(?:v\/|(?:watch(?:\.php)?)?\?(?:.+&)?v=)([^&]+).*/;return{match:function(url){return url.match(youtube_url)},render:function(url,params){var _match=url.match(youtube_url);var domain=_match[1];var id=_match[2];params.width=425;params.height=355;params.can_resize=false;var html='<div><object width="425" height="349"><param name="movie" value="http://www.'+domain+"/v/"+id+'&amp;ap=%2526fmt%3D6&amp;hl=it&amp;fs=0&amp;rel=0&amp;color1=0xf4f2f2&amp;color2=0xdde9e9&amp;border=1&amp;autoplay=1"/><embed src="http://www.'+domain+"/v/"+id+'&amp;ap=%2526fmt%3D6&amp;hl=it&amp;fs=0&amp;rel=0&amp;color1=0xf4f2f2&amp;color2=0xdde9e9&amp;border=1&amp;autoplay=1" type="application/x-shockwave-flash" width="425" height="349"></embed></object></div>';_pub.html(html,params)}}}();_pub.plugins.register(iBoxPlugin_YouTube);var iBoxPlugin_Vimeo=function(){var vimeo_url=/(?:http:\/\/)?(?:www\.)?vimeo\.com\/(\d+).*/;return{match:function(url){return url.match(vimeo_url)},render:function(url,params){var _match=url.match(vimeo_url);var id=_match[1];params.width=506;params.height=392;params.can_resize=false;var html='<object width="506" height="382"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id='+id+'&amp;server=www.vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ef007c&amp;autoplay=1&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id='+id+'&amp;server=www.vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ef007c&amp;autoplay=1&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="506" height="382"></embed></object>';_pub.html(html,params)}}}();_pub.plugins.register(iBoxPlugin_Vimeo);var iBoxPlugin_Document=function(){return{match:function(url){return true},render:function(url,params){_pub.http.open("get",url,true);_pub.http.onreadystatechange=function(){if(_pub.http.readyState==4){if(_pub.http.status==200||_pub.http.status==0){_pub.html(_pub.http.responseText,params)}else{_pub.html(document.createTextNode("There was an error loading the document."),params)}}};_pub.http.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");_pub.http.send(null)}}}();_pub.plugins.register(iBoxPlugin_Document);return _pub}();
//site js
function toggle(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
}else{
e.style.display="none"
}
return true;
}

reppas=new Array();
reppas[0]=new Array("aree","canali","servizi","educational", "talento");
reppas[1]=new Array("menu-left","navigation","nav","navedu","navtalento");

function launch(batton,dropdown){
document.getElementById(batton).style.cursor="pointer";
document.getElementById(dropdown).style.display="none";
document.getElementById(batton).onclick=function() {
return toggle(dropdown);
}
}

function searchsite(id,value){
var inpMessage=value;
var el=document.getElementById(id);
el.value=inpMessage;
el.onclick=function(){if(el.value==inpMessage) el.value=""}
el.onblur=function(){if(el.value=="") el.value=inpMessage}
}

function lightup(imageobject,value){
imageobject.style.opacity=value/10;
imageobject.style.filter='alpha(opacity='+value*10+')';
}

window.onload=function(){
if(!document.getElementsByTagName) return;
l=document.getElementsByTagName("a");
for(i=0;i<l.length;i++){
if(l[i].className.indexOf("ext")!=-1){
l[i].title="link esterno, si apre in una nuova finestra";
l[i].onclick=function(){window.open(this.href);return(false)};
}
}

if(document.getElementById('search')){
searchsite('search-key','cerca nel sito');
}

if(document.getElementById('print')){
var stampa=document.getElementById('print');
stampa.onclick=function(){
window.print();
}
}

for(i=0;i<reppas[0].length;i++){
var button=reppas[0][i];
var toggler=reppas[1][i];
launch(button,toggler);
}

if(document.getElementById('videos')){
searchsite('video-keys','cerca in archivio');
videoverlay=document.getElementsByTagName("a");
for(i=0;i<videoverlay.length;i++){
if(videoverlay[i].className.indexOf("videoverlay")!=-1){
lightup(videoverlay[i],6);
videoverlay[i].onmouseover=function(){lightup(this,8);}
videoverlay[i].onmouseout=function(){lightup(this,6);}
}
}
}

Nifty("form#search","bottom");
Nifty("div.primo-piano-inner,div#tg-video-inner,div.rilievo-inner","big same-height");
Nifty("div#content,div#menu","big bottom");
Nifty("div#menu li,p#useronline","normal");
Nifty("div#footer","big top");
Nifty("div#sub-content,div.wrapper,div#inner-footer,div.commento,div.commento-2,div#evidenza-inner","big");
}