// INICIO BUSCADOR PARA UN FUTURO
var sDominio = document.location.hostname;
sDominio = sDominio.split('.')[0];
var indiceActivo = 0;


var categoriaParaBuscador = 'Tema - Particulares';
var urlParaBuscador = '/moviloes/html/particulares/buscador/';
var elementosPorPaginaBuscador = 10;

if(sDominio == 'empresas')
{
	categoriaParaBuscador = 'Tema - Empresas';
	urlParaBuscador = '/moviloes/html/empresas/buscador/';
}
else if(sDominio == 'partners')
{
	categoriaParaBuscador = 'Tema - Partners';
	urlParaBuscador = '/moviloes/html/partners/buscador/';
}


var url_window = document.location.href;
var ssl = (url_window.indexOf('http://') > -1)? false : true;
if(ssl) var domain_now = url_window.split('https://')[1].split('/')[0];
else var domain_now = url_window.split('http://')[1].split('/')[0];

 
//if(url_window.indexOf('/moviloes/particularesoes/') > -1){
   /*var arr_now = url_window.split('/moviloes/particularesoes');
   url_window = arr_now[0]+arr_now[1];*/
   //if(url_window.indexOf('index.html') > -1) url_window = url_window.split('index.html')[0];
  // if(url_window.indexOf('?') > -1) url_window = url_window.split('?')[0];
 // } 
   if(url_window.indexOf('index.html') > -1) url_window = url_window.split('index.html')[0];
   if(url_window.indexOf('?') > -1) url_window = url_window.split('?')[0];
var pos_pestana = 1;

function buscar(nombre)
{
   if(nombre != '' )
   {		
		document.location.href= urlParaBuscador + "index.html?p=0&mh=" + elementosPorPaginaBuscador + "&TITULO=" + escape(nombre);
   }
}
// FIN BUSCADOR PARA UN FUTURO



// INICIO BUSCADOR MÓVIL
function buscarMovil()
{
   if(nombre != '' )
   {		
		document.bcdroes.submit();;
   }
}
// FIN BUSCADOR MÓVIL

function buscarME()
{
   var q = document.bcdroes.q.value; 
   if( q != '' &&  q != 'busca dentro de móvil' && q != 'busca dentro de empresas')
   {		
		document.bcdroes.submit();;
   } 
   else 
   { 
   		alert( "introduce algún criterio de búsqueda" );
   }
}




// INICIO PAGINACIÖN BOX PAGINADA EN HOME SECCIÓN
function cambiaWappush(indice, total)
{
	for(var i = 1; i < (total+1); i++)
	{
		eval("document.getElementById('cont_wappush_' + i).style.display = 'none'");
		eval("document.getElementById('elemPaginacion' + i).innerHTML = '<a href=\"javascript:cambiaWappush(' + i + ',' + total + ')\">' + i + '</a>'");
	}
	
	eval("document.getElementById('cont_wappush_' + indice).style.display = 'block'");
	eval("document.getElementById('elemPaginacion' + indice).innerHTML = '<span class=\"textpag activopag\">' + indice + '</span>'");
	
	if(indice != 1) eval("document.getElementById('cont_imgizq').innerHTML = '<a href=\"javascript:cambiaWappush(' + (indice-1) + ',5)\"><img src=\"/moviloes/img/es/flecha_izq_nav.gif\" class=\"imgpagizq\"></a>&nbsp;'");
	if(indice != total) eval("document.getElementById('cont_imgder').innerHTML = '&nbsp;<a href=\"javascript:cambiaWappush(' + (indice+1) + ',5)\"><img src=\"/moviloes/img/es/flecha_der_nav.gif\" class=\"imgpagder\"></a>'");
	
	if(indice == 1) document.getElementById('cont_imgizq').style.display = 'none';
	else document.getElementById('cont_imgizq').style.display = 'block';
	
	if(indice == total) document.getElementById('cont_imgder').style.display = 'none';
	else document.getElementById('cont_imgder').style.display = 'block';	
	boxpaginada_activa	= indice;
}
// FIN PAGINACIÖN BOX PAGINADA EN HOME SECCIÓN






// INICIO PARA CAMBIAR LAS URS TODAS PARA NEOS
function cambioURL_NEOS (event)
{
  var el_aux; 
  var el = (window.event)? window.event.srcElement : event.target;
  
  if(window.event) el_aux = (el.tagName.toLowerCase() == 'a') ? el : el.parentElement; 
  else el_aux = (el.tagName.toLowerCase() == 'a') ? el : el.parentNode;
  var aux_param =(el_aux)? el_aux.href : '';
  
  if( el_aux && (el_aux.href && el_aux.href != '') )
  {	
		// reemplazo las urls por la de neos si el dominio es movil.orange o empresas.orange.es/empresas
		var buscarDominioValido = el_aux.href.search(/movil\.orange/gi);
		var buscarDominioValido2 = el_aux.href.search(/empresas\.orange\.es\/empresas/gi);
		
		if(buscarDominioValido != -1 || buscarDominioValido2 != -1)
		{
			var urlDeNeos = aux_param.search(/_neos\.shtml/gi);	
			if(urlDeNeos == -1)
			{
				var busquedaCarpeta = aux_param.search(/\/$/gi);
				if(busquedaCarpeta != -1) aux_param = aux_param + "index_neos.shtml";
				else
				{
					var busquedaIndex = aux_param.search(/index\.html/gi);
					if(busquedaIndex != -1) aux_param = aux_param.replace(/index\.html/,"index_neos.shtml");
					else aux_param = aux_param.replace(/\.html/,"_neos.shtml");
				}
			}
			
			el_aux.href = aux_param;
		}
  }
}
// FIN PARA CAMBIAR LAS URS TODAS PARA NEOS

function clickthrough (obj, href)
{
   var aux = (href && href != '')? href : '';	
   var fl = getClickTags(obj.rel);
   if(fl) return callImpression(fl,aux,obj.target);
   else return true;	
}


//funcion que se utiliza para activar pestaña, El parametro menu es para indicar que se ha pulsado el menu y solo se activa la pestaña.
function cambia(indice, indicedos,menu)
{
	var indicedos_aux = (indicedos && indicedos != '')? indicedos +"_"  : "";
	var pst = "pestana_link_"+indicedos_aux+ indice;  
	eval("document.getElementById('pestana_link_"+indicedos_aux+ indiceActivo + "').className = 'pestana_tit';");
	eval("document.getElementById('pestana_link_"+indicedos_aux+ indice + "').className = 'pestana_tit activo';");
	eval("document.getElementById('pestana_content_"+indicedos_aux + indiceActivo + "').style.display = 'none';");
	eval("document.getElementById('pestana_content_"+indicedos_aux + indice + "').style.display = 'inline';");
	indiceActivo = indice;
	if( (!menu || menu=="undefined") && $('menu_principal')) select_menu(indice);
	if(!menu && $(pst) && $(pst).rel && $(pst).rel != '' ) 
	{
		 clickthrough ($(pst));
	}
}

//**********************FUNCIONES PARA EL MENU Y LAS PESTAÑAS***************************************************/


//dar valor a una cookie
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

//obtener valor de una cookie
function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}


function c_ck_set(name,value,expires,path,domain,secure) {
  var result = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
  document.cookie = result;
}
function c_ck_del(name,path,domain) {
  if (c_ck_get(name,path,domain)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }

}

function c_ck_get(name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}



//funcion que da estilos al menu para dejarlo desplegado
function seccion_menu(div,pos)
{
 var url_aux = url_window;

   //if(url_aux.indexOf('/moviloes/particularesoes/') > -1){
   /*var arr_now = url_aux.split('/moviloes/particularesoes');
   url_aux = arr_now[0]+arr_now[1];*/
   //if(url_aux.indexOf('index.html') > -1) url_aux = url_aux.split('index.html')[0];
   //if(url_aux.indexOf('?') > -1) url_aux = url_aux.split('?')[0];
  //}
    if(url_aux.indexOf('index.html') > -1) url_aux = url_aux.split('index.html')[0];
   if(url_aux.indexOf('?') > -1) url_aux = url_aux.split('?')[0];
 var url_aux2 = url_aux.split('http://movil.orange.es')[1]; 
 //var url_relative = (url_aux.indexOf(domain_now) > -1)? url_aux.split('http://movil.orange.es')[1] : url_aux;
 if(div && div.length > 0)
 {
  for(var i = 0; i < div.length; i++)
  {
   if(div[i]){
    var son =(div[i].childElements())? div[i].childElements() : null;
	
    if(son && son[0] && son[0].href && (son[0].href == url_aux ||  son[0].href == url_aux2) && pos == i+1){
	  son[0].className = "on";
	  if(son[1] && son[1].tagName == "UL"){
	   son[1].className="show";
	  }
    }
   }
  } 
 }
}
//funcion para activar e menu correspondiente, solo se usa cuando se pulsa sobre la pesñana
function select_menu(indice)
{
  var url_aux = url_window;
  
  //if(url_aux.indexOf('/moviloes/particularesoes/') > -1){
   /*var arr_now = url_aux.split('/moviloes/particularesoes');
   url_aux = arr_now[0]+arr_now[1];*/
  // if(url_aux.indexOf('index.html') > -1) url_aux = url_aux.split('index.html')[0];
   //if(url_aux.indexOf('?') > -1) url_aux = url_aux.split('?')[0];
  //}	
   if(url_aux.indexOf('index.html') > -1) url_aux = url_aux.split('index.html')[0];
   if(url_aux.indexOf('?') > -1) url_aux = url_aux.split('?')[0];
  //var url_relative = (url_aux.indexOf(domain_now) > -1)? url_aux.split('http://movil.orange.es')[1] : url_aux;
  var arr_ppl =($('menu_principal').childElements())? $('menu_principal').childElements() : null;
  if(arr_ppl && arr_ppl.length > 0)
  {
	  for(var i = 0; i < arr_ppl.length; i++)
	  {
	   if(arr_ppl[i] && arr_ppl[i].tagName && arr_ppl[i].tagName == 'LI'){
		var son = (arr_ppl[i].childElements())? arr_ppl[i].childElements() : null;
		if(son && son[0] && son[0].href && son[0].href == url_aux ){
		clean_style()
		  son[0].className =(son.length > 1)? "active" : "on";
		  if(son[1] && son[1].tagName == "UL"){
		   son[1].className="show";
		   if(son[1].childElements()) seccion_menu(son[1].childElements(),indice);
		  }
		}
	   }
      }
  }	  
}





  
//funcion que calcula la posicion que se corresponde con la pestaña que hay que seleccionar
function  post_pst(father,son){
 if(father && $(father.id) && $(father.id).childElements() && $(father.id).childElements().length > 0){
   for(var i = 0; i < father.childElements().length; i++){
    if($(father.id) && $(father.id).childElements()[i] && $(father.id).childElements()[i].id == son.id){ pos_pestana = i+1; break; }
   }
 
 }
}

function pestana (name){
 if(c_ck_get("navegation")) c_ck_del("navegation","/",".orange.es");
 var futdate = new Date()		//Get the current time and date
 var expdate = futdate.getTime()  //Get the milliseconds since Jan 1, 1970
 expdate += 60*1000  //expires in 1 minuto(milliseconds)
  futdate.setTime(expdate);
 c_ck_set("navegation",name,futdate,"/",".orange.es");
}

//funcion que limpia todos los estilos de seleccion (on o active) del menu por si hubiera un menu seleccionado antes de pulsar sobre el link
function clean_style(){
 if($('menu_principal'))
 {
	var aux_on =($('menu_principal').select('[class="on"]'))? $('menu_principal').select('[class="on"]') : 0;
	for(var i = 0; i < aux_on.length; i++)
	{
	 $(aux_on[i]).className="lnk";
	}
	var aux_active =($('menu_principal').select('[class="active"]'))? $('menu_principal').select('[class="active"]') : 0;
	for(var i = 0; i < aux_active.length; i++)
	{
	 $(aux_active[i]).className="lnk";
	}
	var aux_show = ($('menu_principal').select('[class="show"]'))? $('menu_principal').select('[class="show"]') : 0;
	for(var d = aux_show.length-1; d >= 0; d--)
	{
	 $(aux_show[d].id).className="oculto";
	}
 }	
}

//funcion para mostrar activa la pestaña correspondiente.
function select_pstn(){
 var pestanas = ($('content').select('[class="pestanas"]') && $('content').select('[class="pestanas"]')[0])? $('content').select('[class="pestanas"]')[0].id.split('_')[1] : null;
 if(pestanas) cambia(pos_pestana, pestanas, true);
}

//funcion que apartir del valor guardado en la cookie muestra la pestaña y el menu correspondiente.
function show_menu_pst(pst){
  pst = pst.replace(/_/gi,' ');	
  var pestanas = ($('content').select('[class="pestanas"]') && $('content').select('[class="pestanas"]')[0])? $('content').select('[class="pestanas"]')[0] : null;
  if(pestanas)
  {
	  pestanas = $(pestanas.id);
	  var li_pst = (pestanas && $(pestanas.id).childElements())? $(pestanas.id).childElements() : '';
	  if(li_pst && li_pst != '')
	  {
	   for(var i = 0; i < li_pst.length; i++)
	   {
		if(li_pst[i] && li_pst[i].childElements() && li_pst[i].childElements()[0] &&  li_pst[i].childElements()[0].innerHTML.replace(/<[^>]*>/gi,"").toLowerCase().indexOf(pst.toLowerCase()) > -1 )
		{ 
		  var post_pst = li_pst[i].childElements()[0].id.split('_')[3];
		  var id_pst = li_pst[i].childElements()[0].id.split('_')[2];
		  if($('menu_principal'))  cambia(post_pst, id_pst, false);
		  break;
		}  
	  }
	  }
  }
}  
 
function open_menu(evt){
 var child_click = Event.element(evt);
 //$(child_click.id).onClick= "return false;";
 if( $(child_click.id) && $(child_click.id).tagName == "A"  && $(child_click.id).rel && $(child_click.id).rel != '') 
 {
    if($(child_click.id).href && $(child_click.id).href.indexOf(domain_now) > -1){
	  var relAux = $(child_click.id).rel;
	  relAux = relAux.replace('j1=','a1=');
	  relAux = relAux.replace('j2=','a2=');
	  relAux = relAux.replace('j3=','a3=');
	  relAux = relAux.replace('j4=','a4=');
	  $(child_click.id).rel = relAux;
	 }
	  clickthrough ($(child_click.id));
 }
  if( $(child_click.id) && $(child_click.id).tagName == "A"  && $(child_click.id).target && $(child_click.id).target == '_blank') 
 {
   return;
 }
 if($(child_click.id) && $(child_click.id).href == url_window)
 {
	 var url_aux =  $(child_click.id).href;
	 clean_style();
	 $(child_click.id).className ="on";
	 var id_li = $(child_click.id).up();
	 //se va a poner estilos a las capas superiores
	 divs_parent (id_li);
	 //se van a desplegar los hijos
	 show_childs(id_li)
	 //se selecciona la pestaña si estamos en la misma url
	 if(url_window == url_aux){
	  select_pstn();
	 }
 }else{ 
  if($(child_click.id) && $(child_click.id).href)
  {
	/*QUITAR*/
	if($(child_click.id).href.indexOf('http:\/\/movil.orange.es\/') > -1 || $(child_click.id).href.indexOf('http:\/\/empresas.orange.es\/') > -1)
	{
		var domain_aux =($(child_click.id).href.indexOf('http://') > -1)? $(child_click.id).href.split('http://')[1].split('/')[0] +'/' : '';
	 	var arr_aux = $(child_click.id).href.split(domain_aux)[1].split('/');
		if(arr_aux && arr_aux.length >1 && arr_aux.length <3)
		{
		 if(c_ck_get("navegation")) c_ck_del("navegation","/",".orange.es");
	     var futdate = new Date()		//Get the current time and date
	     var expdate = futdate.getTime()  //Get the milliseconds since Jan 1, 1970
	     expdate += 60*1000  //expires in 1 minuto(milliseconds)
	     futdate.setTime(expdate);
	     c_ck_set("navegation",$(child_click.id).innerHTML.replace(/ /gi,'_'),futdate,"/",".orange.es");
		}
	}
	/*QUITAR lo de arriba*/
    if($(child_click.id).href.indexOf('undefined') == -1) window.location.href=$(child_click.id).href;
  }
 }
 if( $(child_click.id) && $(child_click.id).tagName == "A"  && $(child_click.id).rel && $(child_click.id).rel != '') 
 {
    if($(child_click.id).href && $(child_click.id).href.indexOf(domain_now) == -1){
	 clickthrough ($(child_click.id));
	 }else{
	  var relAux = $(child_click.id).rel;
	  relAux = relAux.replace('j1=','a1=');
	  relAux = relAux.replace('j2=','a2=');
	  relAux = relAux.replace('j3=','a3=');
	  relAux = relAux.replace('j4=','a4=');
	  $(child_click.id).rel = relAux;
	  var fl = getClickTags($(child_click.id).rel); 
	  emspy.addImpression( fl.a1 ? fl.a1 : '' , fl.a2 ? fl.a2 : '' , fl.a3 ? fl.a3 : '' , fl.a4 ? fl.a4 : '' ); ; 
	 }
 }

 Event.stop(evt); //avoid another call related to 'parent_node' itself

}
//funcion para montar el path de navegacion idoneo segun en la pagina en la que se encuentre el ususario
function open_navegation(evt){ 
 var child_click = Event.element(evt);
 if(child_click && child_click.tagName == "A")
 { 
	 var liaux = ($('nav'))? $('nav') : null;
	 var li_nav = (liaux && liaux.childElements() && liaux.childElements()[0] && liaux.childElements()[0].tagName == "UL" && liaux.childElements()[0].childElements())? liaux.childElements()[0].childElements() : '';
	 if(li_nav && li_nav.length > 2){
	   for(var i =2; i < 3; i++)
	   {
		 for(var n = 0; n <li_nav[i].childElements().length; n++){
		  if(li_nav[i].childElements()[n] && li_nav[i].childElements()[n].tagName == 'A') var link_li = li_nav[i].childElements()[n];}
		if(link_li && link_li.innerHTML == child_click.innerHTML)
		{
		  if(c_ck_get("navegation")) c_ck_del("navegation","/",".orange.es");
		  var futdate = new Date()		//Get the current time and date
		  var expdate = futdate.getTime()  //Get the milliseconds since Jan 1, 1970
		  expdate += 60*1000  //expires in 1 minuto(milliseconds)
		  futdate.setTime(expdate);
		  c_ck_set("navegation",child_click.innerHTML.replace(/ /gi,'_'),futdate,"/",".orange.es");
		  child_click.href=child_click.href.split(child_click.innerHTML.replace(/ /gi,'_'))[0];
		  break;
		}
	   } 
	   window.location.href=child_click.href;
	 }else{
	  if(c_ck_get("navegation")) c_ck_del("navegation","/",".orange.es");
	   window.location.href=child_click.href;
	 }
 }
 Event.stop(evt);
}


//funcion que muestra los hijos de la capa seleccionada
function show_childs(objhtml){
 if(objhtml &&  objhtml.childElements() && objhtml.childElements()[1] && objhtml.childElements()[1].tagName == "UL" && objhtml.childElements()[1].id.indexOf('sons') > -1)
 {
   objhtml.childElements()[1].className = "show";
  
 }
}

//funcion que selecciona y pone en activo a las capas padres de la capa que se ha pulsado 
function divs_parent (objhtml){
  if($(objhtml.id) && $(objhtml.id).up() && $(objhtml.id).up().tagName == "UL")
  {
   var parent = (objhtml.up())? $(objhtml.id).up() : null;
   while(parent && parent.id.indexOf('menu_principal') == -1)
   {
    var aux_parent = parent;
	if($(aux_parent.id) && $(aux_parent.id).up() && $(aux_parent.id).up().tagName == "LI" && $(aux_parent.id).up().childElements() && $(aux_parent.id).up().childElements()[0] ) $(aux_parent.id).up().childElements()[0].className = "active";
	if($(objhtml.id) && $(aux_parent.id).up().childElements() && $(aux_parent.id).up().childElements()[1] && $(aux_parent.id).up().childElements()[1].tagName == "UL" && $(aux_parent.id).up().childElements()[1].id.indexOf('sons') > -1 )
	 $(aux_parent.id).up().childElements()[1].className = "show";
	 post_pst($(aux_parent.id).up().childElements()[1],objhtml);
	 parent = $(aux_parent.id).up();
   }
  }

}

function open_menu_load() {
	  var url_now = url_window;  
	  if(url_now.indexOf(domain_now) > -1) url_now = url_now.split(domain_now)[1];
	  if(url_now.length > 1)
	  {
	    if(url_now.indexOf('/movil/') > -1) url_now = url_now.split('/movil')[1];
	    if(url_now.indexOf('/empresas/') > -1) url_now = url_now.split('/empresas')[1];
	    if(url_now.indexOf('index.html') > -1) url_now = url_now.split('index.html')[0];
	    if(url_now.indexOf('?') > -1) url_now = url_now.split('?')[0];
	  }else   url_now = url_window;
	  var url_aux = url_now;
	  var link_id = '';
	  if(url_now.indexOf('.html') > -1)
	  {
	    var nameFile = url_aux.split('/')[url_aux.split('/').length-1];
	    url_aux = url_aux.split('/').without(nameFile);
	    link_id =(url_aux.length > 2)? 'qw3_s_' : 'qw3_f_';
	    link_id +=(url_aux.length > 2)? url_aux[2] : '';
		link_id =(url_aux[1]) ? link_id + url_aux[1] : '';
	  }
	  var links_menu = $('menu_principal').getElementsByTagName('a');
	  var id_li_aux = true;
	  for(var i = 0; i < links_menu.length; i++)
	  {
		var domain_aux =(links_menu[i].href.indexOf('http://') > -1)? links_menu[i].href.split('http://')[1].split('/')[0] : '';
		var link_aux = (links_menu[i].href.indexOf('http://') > -1)? links_menu[i].href.split(domain_aux)[1] : links_menu[i].href;
		if(link_aux && link_aux.indexOf('index.html')>-1) link_aux = link_aux.split('index.html')[0]; 
		if(link_aux == url_now){ 
		 id_li_aux = false;
		 $(links_menu[i].id).className ="on";
		 var id_li = (links_menu[i].id.indexOf('qw3_') > -1)? $(links_menu[i].id.split('qw3_')[1]) : '';
		  divs_parent (id_li);
		 show_childs(id_li);
		 select_pstn();
		 break;
		 }
	  }
      if(id_li_aux && link_id && $(link_id))
      { 
		 $(link_id).className ="on";
		 var id_li = (link_id.indexOf('qw3_') > -1)? $(link_id.split('qw3_')[1]) : '';
		  divs_parent (id_li);
		 show_childs(id_li);
		 select_pstn();
		 }

}

/*********************Observe Divs*************************/

document.observe("dom:loaded", function() {
/*
  var links_menu = $('menu_principal').getElementsByTagName('a');
  for(var i = 0; i < links_menu.length; i++)
	  {
		links_menu[i].href = (links_menu[i].href.indexOf('http:\/\/movil.orange.es') > -1)? links_menu[i].href.replace(/http:\/\/movil.orange.es/gi,'http:\/\/movil.orange.es\/moviloes\/particularesoes') : 'http:\/\/movil.orrange.es\/moviloes\/particularesoes'+links_menu[i].href;
	  }
*/	  
 if($('menu_principal'))  Event.observe('menu_principal', 'click', open_menu, false);
 if($('nav')) Event.observe('nav', 'click', open_navegation, false);
 if($('f_client_m')) Event.observe('f_client_m','submit', sendMod,false);
 if($('f_client')) Event.observe('f_client','submit', sendMod2,false); 
 var url_path = (url_window && url_window.split(domain_now).length > 1 && url_window.split(domain_now)[1])? url_window.split(domain_now)[1].split('/') : '';
 if((c_ck_get("navegation") != "" && c_ck_get("navegation") != null) && (url_path && (url_path.length <= 3 || url_window.indexOf('orange_world') > -1))){
	var pstn_select = c_ck_get("navegation");
	  show_menu_pst(pstn_select);
  }

 if($('q') && sDominio && sDominio == 'empresas') $('q').value = "busca dentro de empresas";
	  
});


//********************FIN FUNCIONES DEL MENU Y LAS PESTAÑAS*****************************************************/

/*Evitar parpadeo y desaparicion de backgrounds en ie6*/

if( navigator.appVersion.indexOf("MSIE 6") > 0 ) document.execCommand("BackgroundImageCache", false, true);

/*Evitar parpadeo y desaparicion de backgrounds en ie6*/


