/**
 * Generazione della testata Kataweb
 * e del Network condiviso
**/

// testata Kataweb: Network condiviso
function ge_network() {
	document.writeln('	<div id="ge-network-top">');
	document.writeln('		<span class="ge-repubblica"><a href="http://www.repubblica.it/" title="Repubblica.it">Repubblica.it</a></span>');
	document.writeln('		<span class="ge-espresso"><a href="http://espresso.repubblica.it/" title="Leggi L&rsquo;Espresso online">L&rsquo;Espresso</a></span>');
	document.writeln('		<span class="ge-kataweb"><a href="http://www.kataweb.it/" title="Kataweb">Kataweb</a></span>');
	document.writeln('	</div>');
			
	document.writeln('	<div id="ge-network-middle">');
	document.writeln('		<span class="ge-seidimoda"><a href="http://seidimoda.repubblica.it/" title="Sei di Moda">Sei di Moda</a></span>');
	document.writeln('		<span class="ge-miojob"><a href="http://www.miojob.it/" title="miojob: annunci, news e strumenti per chi cerca e offre lavoro">miojob</a></span>');
	document.writeln('		<span class="ge-quotespresso"><a href="http://www.quotidianiespresso.it/" title="Quotidiani Espresso">Quotidiani Espresso</a></span>');
	document.writeln('		<span class="ge-trovacinema"><a href="http://www.repubblica.it/trovacinema/home_page.jsp" title="Trovacinema">Trovacinema</a></span>');
	document.writeln('	</div>');
		
	document.writeln('	<div id="ge-network-bottom">');
	document.writeln('		<span class="ge-deejay"><a href="http://www.deejay.it/" title="Ascolta e guarda DEEJAY">DEEJAY</a></span>');
	document.writeln('		<span class="ge-capital"><a href="http://www.capital.it/" title="Ascolta Capital">Capital</a></span>');
	document.writeln('		<span class="ge-m2o"><a href="http://www.m2o.it/" title="Ascolta m2o">m2o</a></span>');
	document.writeln('		<span class="ge-reptv"><a href="http://tv.repubblica.it/" title="Ascolta e guarda Repubblica TV">Repubblica TV</a></span>');
	document.writeln('		<span class="ge-allmusic"><a href="http://www.allmusic.tv/" title="Guarda All Music">All Music</a></span>');
	document.writeln('		<span class="ge-xl"><a href="http://xl.repubblica.it/" title="Repubblica XL">XL</a></span>');
	document.writeln('	</div>');
}

// testata Kataweb: GENERAZIONE DEL NETWORK OVERLAY
function  kwh_networkpopup() {
	document.writeln('<div class="clear"></div>');
	document.writeln('<div id="networkpopup" style="display:none" onmouseover="Over();" onmouseout="Out();">');
		document.writeln('<ul id="networkpopup-one">');
		document.writeln('<li><a href="http://www.kataweb.it/" class="shared-ev">Kataweb.it</a></li>');
		document.writeln('<li><a href="http://www.extra.kataweb.it/" class="shared-ev">Extra - Edicola digitale</a></li>');
		document.writeln('<li><a href="http://annunci.kataweb.it" class="shared-ev">Annunci</a></li>');
		document.writeln('<li><a href="http://www.allmusic.tv/">AllMusic</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/blog/">Blog</a></li>');
		document.writeln('<li><a href="http://www.capital.it/">Capital.it</a></li>');
		document.writeln('<li><a href="http://cartakataweb.kataweb.it/index.html">CartaKataweb</a></li>');
		document.writeln('<li><a href="http://www.chiesa.espressonline.it/">Chiesa</a></li>');
		document.writeln('<li><a href="http://www.kwcinema.kataweb.it/">Cinema</a></li>');
		document.writeln('<li><a href="http://cucina.temi.kataweb.it/">Cucina</a></li>');		
		document.writeln('<li><a href="http://www.deejay.it/">Deejay.it</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/economia/" class="smallfont">Economia&amp;Finanza</a></li>');
		document.writeln('<li><a href="http://www.entietribunali.kataweb.it/">Enti e Tribunali</a></li>');
		document.writeln('<li><a href="http://www.espressonline.it/">Espressonline</a></li>');
		document.writeln('<li><a href="http://www.eurekajob.it">eurekajob</a></li>');
		document.writeln('<li><a href="http://www.fantacalcio.it/">Fantacalcio</a></li>');
		document.writeln('</ul>');
		document.writeln('<ul id="networkpopup-two">');
		document.writeln('<li><a href="http://fantavillage.kataweb.it"  class="enfasi-3">Fantavillage</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/foto/">Foto</a></li>');
		document.writeln('<li><a href="http://www.gruppoespresso.it/gruppoesp/ita/index.jsp">Gruppo Espresso</a></li>');		
		document.writeln('<li><a href="http://www.kataweb.it/incontri/">Incontri</a></li>');
		document.writeln('<li><a href="http://miojob.kataweb.it">Lavoro</a></li>');
		document.writeln('<li><a href="http://www.cittadinolex.kataweb.it/">Leggi e Norme</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/libri/">Libri</a></li>');
		document.writeln('<li><a href="http://www.m2o.it/">m2o.it</a></li>');
		document.writeln('<li><a href="http://www.kwmappe.kataweb.it/">Mappe</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/meteo/"  class="enfasi-2">Meteo</a></li>');
		document.writeln('<li><a href="http://metropoli.repubblica.it/">Metropoli</a></li></li>');
		document.writeln('<li><a href="http://www.kataweb.it/cellularmania/">Mobile - Cellularmania</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/motori/">Motori</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/multimedia/">Multimedia</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/musica/">Musica</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/news/">News</a></li>');
		document.writeln('</ul>');
		document.writeln('<ul id="networkpopup-three">');
		document.writeln('<li><a href="http://www.kataweb.it/oroscopo/">Oroscopo</a></li>');
		document.writeln('<li><a href="http://paginebianche.kataweb.it/execute.cgi?tl=2&amp;cb=15&amp;ref=nl">Pagine Bianche</a></li>');
		document.writeln('<li><a href="http://paginegialle.kataweb.it/pg/cgi/pgsearch.cgi?cb=a&amp;ref=nl">Pagine Gialle</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/podcast/index.html">Podcast</a></li>');
		document.writeln('<li><a href="http://www.repubblica.it/">Repubblica.it</a></li>');
		document.writeln('<li><a href="http://tv.repubblica.it/">Repubblica TV</a></li>');
		document.writeln('<li><a href="http://www.kwsalute.kataweb.it/">Salute</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/scuola/">Scuola</a></li>');
        document.writeln('<li><a href="http://seidimoda.repubblica.it/">Sei di Moda</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/shopping/">Shopping</a></li>');
		document.writeln('<li><a href="http://sport.kataweb.it/">Sport</a></li>');
		document.writeln('<li><a href="http://starcontrol.repubblica.it/">Star Control</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/detail.jsp?channel=portale&amp;id=692707">Telefona con il VoIP</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/viaggi/">Viaggi</a></li>');
		document.writeln('<li><a href="http://xl.repubblica.it/">XL</a></li>');
		document.writeln('<li><a href="http://www.kataweb.it/societa/network.html" class="enfasi-1">Siti e servizi dalla A alla Z</a></li>');
		document.writeln('</ul>');
	document.writeln('</div>');
	}

// testata Kataweb: Brand e sezione
function kwh_brand(check) {
	if (check == "home") {
		document.writeln('<div id="brandhome"><a href="http://www.kataweb.it/?ref=hplogo" title="Aggiorna la home di Kataweb.it"><img src="http://www.kataweb.it/static/shared/images/cf-head-kataweb-home.gif" alt="Kataweb logo" /></a></div>');
	} else {
		document.writeln('<div id="brand"><a href="http://www.kataweb.it/" title="Torna alla home di Kataweb.it"><img src="http://www.kataweb.it/static/shared/images/cf-head-kataweb-home.gif" alt="Kataweb logo" /></a></div><div id="sectionbrand"><a href="javascript:location.replace(urlcomposer(\'http://\'));" title="Vai alla home di sezione">' + urlcomposer('http://','section') + '</a></div>');
	}
}

// testata Kataweb: Ricerca
function kwh_multisearch() {
document.writeln('<div id="cerca">');
document.writeln('<form method="get" name="secSearch" action="#">');
document.writeln('<input type="hidden" name="orderby" value="1" /><input type="hidden" name="filter" value="1" /><input type="hidden" name="cut" value="1000" /><input type="hidden" name="q" value="" /><input type="hidden" name="string" value="" /><input type="hidden" name="pub" value="times" /><input type="hidden" name="" value="" />');
document.writeln('<dl id="cambiabrand">');
document.writeln('<dt><label for="fcerca">Cerca</label></dt>');
document.writeln('<dd class="multi">');
document.writeln('<ul id="multiricerca">');
document.writeln('<li><a href="javascript:cambia(0);" class="active" title="Cerca nel Web con Yahoo! Search">Web</a></li>');
document.writeln('<li><a href="javascript:cambia(1);" title="Cerca tra le Immagini con Yahoo! Search">Immagini</a></li>');
document.writeln('<li><a href="javascript:cambia(2);" title="Cerca tra i Video con Yahoo! Search">Video</a></li>');
document.writeln('<li><a href="javascript:cambia(3);" title="Cerca le News nell’archivio di Kataweb.it">News</a></li>');
document.writeln('<li><a href="javascript:cambia(4);" title="Cerca gli annunci su Kataweb Annunci">Annunci</a></li>');
document.writeln('<li><a href="javascript:cambia(5);" title="Scegli e acquista su Kataweb Shopping">Shopping</a></li>');
document.writeln('<li class="noborder"><a href="javascript:cambia(6);" title="Cerca nei gruppi di Kataweb">Gruppi</a></li>');
//document.writeln('<li class="noborder"><a href="javascript:cambia(6);" title="Cerca nell’archivio di Repubblica.it">Repubblica.it</a></li>');
document.writeln('</ul>');
document.writeln('</dd>');
document.writeln('<dd class="itxt"><input type="text" class="textcerca" name="query1" id="fcerca" value="" onfocus="this.value=\'\';"  onkeypress="if(event.keyCode == 13) { newmultisearchKataweb(window.document.secSearch); return false; }" /></dd>');
document.writeln('<dd class="ibtn"><a href="#" onclick="newmultisearchKataweb(window.document.secSearch); return false;" >Cerca</a></dd>');
document.writeln('</dl>');
document.writeln('</form>');
document.writeln('<ul id="addlink">');
document.writeln('<li><a href="http://paginegialle.kataweb.it/pg/cgi/pgsearch.cgi?cb=a" title="Cerca un’azienda per prodotti, servizi, marchi o per nome">Pagine Gialle</a></li>');
document.writeln('<li><a href="http://paginebianche.kataweb.it/execute.cgi?tl=2&cb=15" title="Ricerca aziende, persone e istituzioni in Pagine Bianche">Pagine Bianche</a></li>');
document.writeln('<li><a href="http://www.kwmappe.kataweb.it/" title="Pianifica gli itinerari. Consulta le mappe dei comuni italiani ed esteri">Mappe</a></li>');
document.writeln('</ul>');
document.writeln('</div>');
}

// testata Kataweb: NO Flash Generico
function kwh_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>');
}

//Footer
function kwh_footer(){
	var kwh_footer='';
	kwh_footer+='<div id="footer1000">';
	kwh_footer+='	<div class="footer1000-link"><p> <scr' + 'ipt type="text\/javascript">addBookmarkSite(\'Kataweb\',\'http:\/\/www.kataweb.it\/\')<\/scr' + 'ipt> | <a href="http:\/\/www.kataweb.it\/societa\/gerenza.html" title="Chi siamo">Chi siamo<\/a>';
	kwh_footer+=' | <a href="mailto:portale@redazione.kataweb.it">Scriveteci</a> | <a href="http:\/\/www.kataweb.it\/societa\/cont.html" title="Contatti">Contatti<\/a> | <a href="http:\/\/www.kataweb.it\/rss\/" title="Rss\/xml">Rss\/xml<\/a> | <a href="http:\/\/www.kataweb.it\/podcast\/index.html" title="Ascolta, vedi e rivedi i tuoi programmi preferiti in PODCAST">Podcast<\/a> | <a href="http:\/\/www.kataweb.it\/societa\/pubblicita\/">Pubblicit&agrave;<\/a><\/p><\/div>';
	kwh_footer+='	<div class="footer1000-brand"><p>Copyright &copy 1999-2007 Elemedia S.p.A. Tutti i diritti riservati<br \/><a href="http:\/\/www.gruppoespresso.it\/gruppoesp\/ita\/index.jsp">Gruppo Editoriale L&#8221;Espresso Spa<\/a> - P.Iva 05703731009<\/p><\/div>';
	kwh_footer+='<\/div>';
	document.writeln(kwh_footer);
	}





// Apre il network popup
var TO;
function Over(){
	clearTimeout(TO);
	//document.getElementById('txt').innerHTML='over';
}
	function Out(){
	TO=setTimeout('document.getElementById(\'networkpopup\').style.display=\'none\'',200);
}

function newtoggle(targetId) {
   if (document.getElementById){
	if (document.getElementById( targetId ) != null){
   target = document.getElementById( targetId );
   if (target.style.display == "none"){
  // document.getElementById('debug1').innerHTML = "si:  " + document.getElementById('networkpopup').style.display;
   target.style.display = "block";
   TO=setTimeout('document.getElementById(\'networkpopup\').style.display=\'none\'',5000);
   } else {
   //document.getElementById('debug1').innerHTML = "no: " + document.getElementById('networkpopup').style.display;
   target.style.display = "none";
   }
   }
	}
}

// chiamata da flash
function open_network() {
	newtoggle('networkpopup');
}
////











/* -- -- -- COLLAPSE BANNER DIV NEW -- -- -- */

/**********************************************************************/
/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////

	I parametri accettati in pagina sono:
	var other_div_collapse = "nomedeldiv,nomedeldiv,etc";
	var other_height_collapse = 19; // divheight diversa da 20px per capire il collassamento e vanno richiamati prima di di questo script esterno

/////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

/* valori di default */
var standard_banner = "Top,TopLeft,TopRight,Middle,Middle1,Left,Left1,Right,Right1,Position1,Bottom,x41,x42,x43,x44";

//var standard_banner = "Top,Left,Right,Middle1,Bottom";

var old_banner = "advtop,advstrip,adv-left-uno";
var standard_height = 18;
var collapse_args;
var collapse_div;
////////////////////////////////////////////

collapse_div = standard_banner.toLowerCase();
collapse_div = collapse_div.split(",");

for (var i = 0; i < collapse_div.length; i++) {
	collapse_div[i] = "adv-" + collapse_div[i]; //adv-nomedelbanner č lo standard da 04/2007
}

if (typeof other_div_collapse != 'undefined') {
	other_div_collapse = other_div_collapse.split(",");
	for (var n = 0; n < other_div_collapse.length; n++) {
		collapse_div.push(other_div_collapse[n]) ;	
	}
}

if (typeof old_banner != 'undefined') {
	old_banner  = old_banner.split(",");
	for (var n = 0; n < old_banner.length; n++) {
		collapse_div.push(old_banner[n]) ;	
	}
}

typeof other_height_collapse == "undefined" ? other_height_collapse = standard_height : other_height_collapse;
collapse_div.push(other_height_collapse); // ultimo valore




function collapse_makearray() {
	var elements = new Array();
	for (var i = 0; i < collapse_args.length - 1; i++) {
		var element = collapse_args[i];	
	if (typeof element == 'string')
		element = document.getElementById(element);
	if (arguments.length == 1)
		return element;
		elements.push(element);
	}
	return elements;
}

function collapseAll(objs,divheight) {
	var i;
	var agt = navigator.userAgent.toLowerCase();
	/* advtop */
	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");
	/* fine advtop */
	
	for (i=0;i<objs.length;i++ ) {
		var indexeddiv = objs[i];
if (agt.indexOf("msie") != -1) {
		if (indexeddiv != null) { h_style_indexeddiv = indexeddiv.offsetHeight; }
	
	} else {
		if (indexeddiv != null) { h_style_indexeddiv = document.defaultView.getComputedStyle(indexeddiv, '').getPropertyValue("height"); }
		if (indexeddiv != null) { check_indexeddiv = h_style_indexeddiv.split('px'); }
		if (indexeddiv != null) { h_style_indexeddiv = check_indexeddiv[0]; }
		}
	if ((indexeddiv != null) && (h_style_indexeddiv < divheight)) {
		indexeddiv.style.display = "none";


	if(collapse_args[i] == "advtop" || collapse_args[i] == "adv-top" ) {
		if (div_ge_network != null ) {
			div_ge_network.style.height = "auto";
			div_ge_network.style.width = "auto";
			div_ge_network.style.background = "none";
		}
		if (div_header_top != null) {
			div_header_top.style.backgroundColor = "#eee";
			div_header_top.style.paddingBottom = "3px";
		}
		
		if (div_ge_network_top != null) {
			div_ge_network_top.style.marginTop = "12px";
		}
	}

	
	}

	}
		
}

function addEvent( obj, type, fn ) {
	if (obj.addEventListener) {
		obj.addEventListener( type, fn, false );
	}
	else if (obj.attachEvent) {
		obj["e"+type+fn] = fn;
		obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
		obj.attachEvent( "on"+type, obj[type+fn] );
	}
	else {
		obj["on"+type] = obj["e"+type+fn];
	}
}

function collapse_all_div() {
	collapse_args = collapse_div;
	addEvent(window,'load',pageLoad);
}

function pageLoad() {
	collapseAll(collapse_makearray(),collapse_args[collapse_args.length-1]);
//	collapseAll(collapse_makearray(),20);
}


//if(typeof OAS_listpos != "undefined") { collapse_all_div(); }
collapse_all_div();

/* -- -- -- FINE COLLAPSE BANNER DIV NEW -- -- -- */


// Genera nome e link della Sezione
function urlcomposer() {
	
	var hostsite = window.location.hostname;
		
	if (hostsite == 'www.kataweb.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 == 'arte')	{ section = 'Arte'; hostsite = 'www.kataweb.it/arte/' }
			if (section == 'blog')	{ section = 'Blog'; hostsite = 'www.kataweb.it/blog/' }
			if (section == 'cinema')	{ section = 'Cinema'; hostsite = 'www.kataweb.it/cinema/' }
			if (section == 'cellularmania')	{ section = 'Cellularmania'; hostsite = 'www.kataweb.it/cellularmania/' }			
			if (section == 'economia')	{ section = 'Economia'; hostsite = 'www.kataweb.it/economia/' }
			if (section == 'foto')	{ section = 'Foto'; hostsite = 'www.kataweb.it/foto/' }
			if (section == 'mappe')	{ section = 'Mappe'; hostsite = 'www.kataweb.it/mappe/' }
			if (section == 'meteo')	{ section = 'Meteo'; hostsite = 'www.kataweb.it/meteo/' }
			if (section == 'motori')	{ section = 'Motori'; hostsite = 'www.kataweb.it/motori/' }
			if (section == 'scuola')	{ section = 'Scuola'; hostsite = 'www.kataweb.it/scuola/' }
			if (section == 'viaggi')	{ section = 'Viaggi'; hostsite = 'www.kataweb.it/viaggi/' }
					
			
	} else {
	
			if (hostsite == 'finanza.kataweb.it')	{ section = 'Finanza'; }
			if (hostsite == 'mappe.kataweb.it')	{ section = 'Mappe'; hostsite = 'www.kataweb.it/mappe/'}
			if (hostsite == 'temi.repubblica.it')	{ section = 'Speciale'; }
			if (hostsite == 'canali.kataweb.it')	{ section = 'Speciale'; }
			if (hostsite == 'dizionari.kataweb.it')	{ section = 'Dizionari'; }
			if (hostsite == 'sport.kataweb.it')	{ section = 'Sport'; }
			if (hostsite.indexOf('blog')!='-1')  { section = 'Blog';  hostsite = 'www.kataweb.it/blog/'}
	
	}
	
	var url = "http://" + hostsite;
	return url;

}


// Multiricerca (kataweb)
var debug = false;
var msrep_flag = 0;
var lista = new Array(["","",0],["","_img",0],["","_vid",0],["","_news",0],["","annunci",1],["","shopping",1],["","gruppi",1]);
var valore = lista[0][0];
var newaction = lista[0][1];
var multiricerca;



function cambiabrand(stato) {
	cba = document.getElementById('cambiabrand');
	cbb = cba.style.backgroundColor;
	//alert(cbb);
	if (stato == 0) {
		 cba.style.backgroundPosition = "100% 0";
		} else {
		 cba.style.backgroundPosition = "100% -999px";
		}
	}


function cambia(quale) {
	valore = lista[quale][0];
	newaction = lista[quale][1];
	if (msrep_flag == 1)	document.secSearch.query1.value = lista[quale][0];
	
		multiricerca = document.getElementById('multiricerca');
		opzioni = multiricerca.getElementsByTagName("a");
		opzioneAttiva = quale;
	
		for (var i = 0; i < opzioni.length; i++) { opzioni[i].className = ""}	
	 	opzioni[quale].className = "active";
		cambiabrand(lista[quale][2])

		fp_debug(1,valore + "  ++++++  " + newaction + " *** " + lista[quale][2])
	}



function newmultisearchKataweb(f) {

	fp_debug(2, f.name + " <strong> "+ newaction +" </strong> " + f.query1.value);

	//if (f.query1.value == "") { alert(valore +': inserire una parola per la ricerca'); return false; }
	if (f.query1.value == "") { alert('Inserire almeno una parola per la ricerca'); return false; }
	
	tse = f.query1.value;
	msnse = "";
		for (g=0 ; g <= tse.length ; g++) {
			if (tse.charAt(g) == " ") {
				msnse = msnse + "+"; 
			} 
			else {
				msnse = msnse + tse.charAt(g); 
			}
		}
	
		
        
        if (newaction == "gruppi" ) {
	    	f.q.value=msnse;
			f.method = "post";
			f.action = "http://gruppi.kataweb.it/cercagruppi.php?hl=it&q=" + msnse;
			f.submit();
			fp_debug(2, "gruppi > "+ f.action );
		} else
        if (newaction == "rep" ) {
			f.action = "http://localsearch.kataweb.it/searchbin/repSearch.pl";
			f.submit();
			fp_debug(2, "REP > "+ valore);
		} else if (newaction == "annunci") {
			f.action = "http://annunci.kataweb.it/italia/tutti/-/ricerca-" + tse;
			f.submit();
			fp_debug(1, "Annunci > "+ f.action );
		} else if (newaction == "shopping") {
	    	f.q.value=msnse;
			f.method = "post";
			f.action = "http://shopping.kataweb.it/search.aspx?search=" + msnse;
    		f.submit(); 
			fp_debug(1, "shopping > "+ f.action );
		} else {
			f.action = "http://www.kataweb.it/ricerca/result" + newaction + ".jsp";
			f.q.value=msnse;
			fp_debug(2, "OTHER submit > "+ valore + " ************ " + f.action);
			f.submit();
		}
		return false;
	}

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


function addBookmarkSite(title,url,prefix){
	if(typeof prefix=="undefined") prefix = "Fai di";

	var browser = navigator.userAgent.toLowerCase();
	isSafari = (browser.indexOf( "safari" ) != -1);
	
	if(isSafari) {
		document.writeln('<a href="javascript:;" onClick="alert(\'Spiacente, Safari non supporta questa funzione.\');" title="'+title+'">'+prefix+ ' ' +title+' la tua Homepage</a>');
	} else {
		if (document.all)
			document.writeln('<a href="javascript:window.external.AddFavorite(\''+url+'\',\''+title+'\')" title="'+title+'">'+prefix+ ' ' +title+' la tua Homepage</a>');
		else if (window.sidebar) 
			document.writeln('<a href="javascript:window.sidebar.addPanel(\''+title+'\',\''+url+'\',\'\')" title="'+title+'">'+prefix+ ' ' +title+' la tua Homepage</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;

