//overture
document.write ("<script type=\"text/javascript\" src=\"http://scripts.kataweb.it/adsetup.js\"></script>");




var ge_network_icon_v = '<map name="coords_v" id="coords_v"><area shape="rect" coords="3,3,88,27" href="http://www.repubblica.it/" alt="Repubblica.it" /><area shape="rect" coords="89,3,168,27" href="http://espresso.repubblica.it/" alt="L\'espresso" /><area shape="rect" coords="169,3,249,27" href="http://www.kataweb.it/" alt="Kataweb.it" /><area shape="rect" coords="3,32,62,50" href="http://quotidianiespresso.repubblica.it/" alt="Quotidiani Espresso" /><area shape="rect" coords="63,32,108,50" href="http://miojob.repubblica.it/" alt="Miojob" /><area shape="rect" coords="109,32,174,50" href="http://seidimoda.repubblica.it/" alt="Sei di Moda" /><area shape="rect" coords="175,32,249,50" href="http://www.ilmiolibro.it/" alt="Il mio libro" /><area shape="rect" coords="3,55,33,85" href="http://www.deejay.it/dj/home" alt="RADIO DEEJAY" /><area shape="rect" coords="34,55,69,85" href="http://capital.repubblica.it/capital/home" alt="Radio Capital" /><area shape="rect" coords="70,55,99,85" href="http://www.m2o.it/m2o/index.jsp" alt="m2o" /><area shape="rect" coords="100,55,128,85" href="http://tv.repubblica.it/home" alt="Repubblica Tv" /><area shape="rect" coords="129,55,156,85" href="http://www.allmusic.tv/allmusic/index.jsp" alt="ALL MUSIC" /><area shape="rect" coords="158,55,185,85" href="http://trovacinema.repubblica.it/" alt="Trovacinema" /><area shape="rect" coords="186,55,221,85" href="http://temi.repubblica.it/casa/" alt="CASA&amp;DESIGN" /><area shape="rect" coords="222,55,248,85" href="http://xl.repubblica.it/" alt="XL Repubblica" /></map><img src="http://www.repubblica.it/sharedfiles/images/ge_network_icon_collapsed.gif" border="0" usemap="#coords_v" />';
var ge_network_icon_h = '<map name="coords_h" id="coords_h"><area shape="rect" coords="3,3,88,35" href="http://www.repubblica.it/" alt="Repubblica.it" /><area shape="rect" coords="90,3,167,35" href="http://espresso.repubblica.it/" alt="L\'espresso" /><area shape="rect" coords="168,3,245,35" href="http://www.kataweb.it/" alt="Kataweb.it" /><area shape="rect" coords="247,3,306,35" href="http://quotidianiespresso.repubblica.it/" alt="Quotidiani Espresso" /><area shape="rect" coords="308,3,354,35" href="http://miojob.repubblica.it/" alt="Miojob" /><area shape="rect" coords="356,3,423,35" href="http://seidimoda.repubblica.it/" alt="Sei di Moda" /><area shape="rect" coords="425,3,500,35" href="http://www.ilmiolibro.it/" alt="Il mio libro" /><area shape="rect" coords="502,3,533,35" href="http://www.deejay.it/dj/home" alt="RADIO DEEJAY" /><area shape="rect" coords="535,3,569,35" href="http://capital.repubblica.it/capital/home" alt="Radio Capital" /><area shape="rect" coords="571,3,600,35" href="http://www.m2o.it/m2o/index.jsp" alt="m2o" /><area shape="rect" coords="602,3,631,35" href="http://tv.repubblica.it/home" alt="Repubblica Tv" /><area shape="rect" coords="633,3,659,35" href="http://www.allmusic.tv/allmusic/index.jsp" alt="ALL MUSIC" /><area shape="rect" coords="661,3,690,35" href="http://trovacinema.repubblica.it/" alt="Trovacinema" /><area shape="rect" coords="692,3,726,35" href="http://temi.repubblica.it/casa/" alt="CASA&amp;DESIGN" /><area shape="rect" coords="728,3,754,35" href="http://xl.repubblica.it/" alt="XL Repubblica" /></map><img src="http://www.repubblica.it/sharedfiles/images/ge_network_icon_expanded.gif" border="0" usemap="#coords_h" />';






function collapse_network() { 
  var agt = navigator.userAgent.toLowerCase();
  // Top
  var div_banner_top = document.getElementById("advtop");
  var div_header_top = document.getElementById("topheader");
  var div_ge_network = document.getElementById("ge-network");
  var div_ge_network_top = document.getElementById("ge-network-top");
  var div_ge_network_bottom = document.getElementById("ge-network-bottom");

  if (agt.indexOf("msie") != -1) {
    if (div_banner_top != null) 
      { altezza_top = div_banner_top.offsetHeight; }
  } 
  else {
    if (div_banner_top != null) { 
      altezza_top = document.defaultView.getComputedStyle(div_banner_top, '').getPropertyValue("height");
      check_altezza_top = altezza_top.split('px');
      altezza_top = check_altezza_top[0]; 
    }
  }



// Top     NON C'E' BANNER
  if ( div_banner_top != null && altezza_top < 25 ) {
	  
	  
	  		if (div_ge_network != null ) { 
				//div_ge_network.style.display = "block";
				div_ge_network.innerHTML = ge_network_icon_h;

			}
	  
	  
	/*  
    div_banner_top.style.display = "none";
    if( div_ge_network != null ) {
      div_ge_network.style.height = "auto";
      div_ge_network.style.width = "auto";
      / /div_ge_network.style.background = "none";
	  
	 div_ge_network.innerHTML = ge_network_icon_h;
	  
    }

    if (div_header_top != null) {
      div_header_top.style.backgroundColor = "#e6e6e6";
      div_header_top.style.paddingBottom = "3px"
    }

    if (div_ge_network_top != null)	{ div_ge_network_top.style.marginTop = "12px"; }
	*/
	
	
	
	
	
  } else {   // C'E' BANNER
	  //alert (div_ge_network);
	  if( div_ge_network != null ) {
	  	div_ge_network.style.height = "90px";
		div_ge_network.style.width = "252px";
		div_ge_network.style.background = "#e6e6e6";
		//div_ge_network.style.display = "block";
		div_ge_network.innerHTML = ge_network_icon_v;
	  }
		
	  }
	  
	  
	  
	  
	  
	  
	  
}


function addLoadEventVis(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

function allCollapseFunctions(){
  collapse_network();
  collapse_div('oas-Middle1');
  collapse_div('adv180x150r');

}

function collapse_div(divName){
  var agt = navigator.userAgent.toLowerCase();
  var divObj = document.getElementById(divName);
  if( divObj != null ) {
    var altezza_div = 0;
    if ( agt.indexOf("msie") != -1) {
      altezza_div = divObj.offsetHeight;
    }
    else {
      var h = document.defaultView.getComputedStyle(divObj, '').getPropertyValue("height");
      var check_altezza = h.split('px');
      altezza_div = check_altezza[0]; 
    } 
    
    if( altezza_div < 50 )
      divObj.style.display='none';
  }
  
}



// Compone URL

function urlcomposer() {
	
	var hostsite = window.location.hostname;
	
	if (hostsite == 'www.repubblica.it') {
		base = 'http://';
		loc = window.location.toString();
    	subs = loc.substr(loc.indexOf(base) + base.length).split("/");
		 
			for (i = 0; i < (subs.length); i++) {
				host = subs[0];
					var section =  subs[1];
					var section2 =  subs[2];
					var section3 =  subs[3];
					var section4 =  subs[4];					
			}
			
			if (section == 'news')	{ section = "News"; hostsite =  'www.repubblica.it/news/ired/ultimora/2006/altre_n.html' }
			if (section == 'politica' || section4 == 'politica')	{ section = "Politica"; hostsite = 'www.repubblica.it/politica/index.html' }
			if (section == 'cronaca' || section4 == 'cronaca')	{ section = "Cronaca"; hostsite = 'www.repubblica.it/cronaca/index.html' }
			if (section == 'esteri' || section4 == 'esteri')	{ section = "Esteri"; hostsite = 'www.repubblica.it/esteri/index.html' }
			if (section == 'ambiente' || section4 == 'ambiente')	{ section = "Ambiente"; hostsite = 'www.repubblica.it/ambiente/index.html' }
			if (section == 'sport' || section4 == 'sport')	{ section = "Sport"; hostsite  =  'www.repubblica.it/sport/index.html' }
			if (section == 'motori' || section3 == 'motori')	{ section = "Motori"; hostsite  =  'www.repubblica.it/motori/index.html' }
			if (section == 'persone' || section4 == 'persone')	{ section = "Persone"; hostsite =  'www.repubblica.it/persone/index.html' }
			if (section == 'scuola_e_universita' || section4 == 'scuola_e_universita')	{ section = "Scuola&Giovani"; hostsite = 'www.repubblica.it/scuola_e_universita/index.html' }
			if (section == 'spettacoli_e_cultura' || section4 == 'spettacoli_e_cultura')	{ section = "Spettacoli&Cultura"; hostsite = 'www.repubblica.it/spettacoli_e_cultura/index.html' }
			if (section == 'scienza_e_tecnologia' || section4 == 'scienza_e_tecnologia')	{ section = "Tecnologie&Scienze"; hostsite = 'www.repubblica.it/scienza_e_tecnologia/index.html' }
			if (section == 'arte' || section4 == 'arte')	{ section = "Arte"; hostsite = 'www.repubblica.it/arte/index.html' }
			if (section == 'weekend' || section4 == 'weekend')	{ section = "Week-In"; hostsite = 'www.repubblica.it/weekend/index.html' }
			if (section == 'indici' || section4 == 'indici')	{ section = "Ora per ora"; hostsite = 'www.repubblica.it/indici/cronologia/index_1.htm' }
			if (section == 'gallerie' || section3 == 'gallerie')	{ section = "Foto"; hostsite = 'www.repubblica.it/gallerie/index.html' }
			if (section2 == 'pbr')	{ section = "Pagine Bianche"; hostsite = 'www.repubblica.it/trovatelefono/pbr/' }
			if (section2 == 'pgr')	{ section = "Pagine Gialle"; hostsite = 'www.repubblica.it/trovatelefono/pgr/' }
			if (section4 == 'economia')	{ section = "Economia"; hostsite = 'economia.repubblica.it/' }

	} else {
	
	if (hostsite == 'finanza.repubblica.it')	{ section = "Finanza"; }
	if (hostsite == 'guide-finanza.repubblica.it')		{ section = "Finanza"; hostsite = "finanza.repubblica.it" }
	if (hostsite == 'tv.repubblica.it')	{ section = "RadioTV"; }
	if (hostsite == 'viaggi.repubblica.it')			{ section = "Viaggi"; }
	if (hostsite == 'meteo.repubblica.it')				{ section = "Meteo"; }
	if (hostsite == 'starcontrol.repubblica.it')			{ section = "StarControl"; }
	if (hostsite == 'newscontrol.repubblica.it')			{ section = "NewsControl"; }
	if (hostsite == 'voice.repubblica.it')				{ section = "Voice"; }
	if (hostsite == 'ricerca.repubblica.it')			{ section = "Ricerca"; }
	if (hostsite == 'localsearch.kataweb.it')			{ section = "Ricerca"; }
	if (hostsite == 'blog.repubblica.it')				{ section = "Blog"; }
	if (hostsite == 'forum.repubblica.it')				{ section = "Forum"; }
	if (hostsite == 'shopping.repubblica.it')			{ section = "Shopping"; }
	
	
	}
	
		
	var url = "http://" + hostsite;
		
	return url;
	
}


	
function fp_debug(chi,cosa) {
	if(debug) {
		document.getElementById('debug'+chi).innerHTML = cosa;
		return true;
		}
	}

///////////////////////////
//voip
	
function popcallwindow(url)
{
	tastierinoWnd=window.open(url,'popcallwin','height=600,width=800,scrollbars=yes,menubar=no,location=no,status=yes,toolbar=no,top=0,left=0');
	if (window.focus) {tastierinoWnd.focus()}
	return false;
}

//Finestre popup
function openwin(url, windowname, atrib, radio, channel) {
    window.open(url, windowname, atrib);
}

//Menu a tendina

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


// Funzione per il link delle select
function yup_jumpMenu(targ,selObj,restore,urlA,urlB){ //v3.0
//url = 'http://' + urlA;
eval(targ+".location='"+urlA+selObj.options[selObj.selectedIndex].value+urlB+"'");

if (restore) selObj.selectedIndex=0;
}




addLoadEventVis(allCollapseFunctions);
function newtoggle(targetId,opendiv) {
	if (document.getElementById){
		if (document.getElementById( targetId ) != null){
			target = document.getElementById( targetId );
			if (target.style.display == "none"){
				target.style.display = "block";
				TO=setTimeout('document.getElementById(\''+targetId+'\').style.display=\'none\'',5000);
			} else {
				target.style.display = "none";
			}
		}
	}
}


function test(openlink,opendiv){
	openlink 	= "linkhover";
	opendiv 	= "altro";

	/* LINK */	
	var links = document.getElementById(openlink).getElementsByTagName('a');
	      for( var i=0; i < links.length; i++ ){
        links[i].onclick = function(){
          return newtoggle(opendiv);
        };
      }
	/* Show DIV */
	 var TO;
	 var div = document.getElementById(opendiv);
	 div.onmouseover = function () { clearTimeout(TO); };
	 div.onmouseout =  function () { TO=setTimeout('document.getElementById(\''+opendiv+'\').style.display=\'none\'',200); };
}

function swf_noflash() {
	document.writeln('<a href="http://www.kataweb.it/requisiti_sistema.html" title="I requisiti necessari per una corretta navigazione"><strong>Forse hai bisogno del Player Flash.</strong> Per un corretta visualizzazione del sito consulta la pagina dei requisiti di sistema</a>');
	}

/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
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;


