var cc='WEB_ARRAK';
var mmbb= 'arrakis';

function contratar( idproducto) {
  var url ;
  if ( idproducto == 0  ) {
     url = 'https://www2.modoseguro.com/default.asp?nivel=2&url=' + mmbb ;
 }  else {
   url = 'https://www2.modoseguro.com/default.asp?nivel=2&codproducto=' + idproducto + '&url=' + mmbb  ;

  }
if (window.location.href != window.top.location.href) {
  window.top.location.replace(url);
} else {
   document.location.href= url ;
}

}

function mostrarMensaje() {
	var div;
	div = document.getElementById("mensaje");
	div.style.visibility="visible";
	return true;
}


function mostrar(id) {
   objeto = document.getElementById(id);
   objeto.style.position = "relative";  
   objeto.style.visibility="visible";
   objeto.style.overflow = 'visible';
   objeto.style.height = "400px";

   
}
function mostrar_faq(id) {
   objeto = document.getElementById(id);
   objeto.style.position = "relative";  
   objeto.style.visibility="visible";
   objeto.style.overflow = 'visible';
}
function ocultar(id) {
   objeto = document.getElementById(id);
   objeto.style.position = "absolute";
   objeto.style.top=0;
   objeto.style.left=0;
   objeto.style.visibility="hidden"; 
   objeto.style.overflow = 'auto';
   objeto.style.height = '10px';
 }


function cambiar_color_fondo(id, color) {
   objeto = document.getElementById(id);
   objeto.style.backgroundColor = color;
}
function AbrirVentana(laURL,winNombre,caracteristicas,texto) {
  window.open(laURL,winNombre,caracteristicas);
}

function SwitchImg()
{ //start
  var rem, keep=0, store, obj, switcher=new Array, history=document.Data;
    for (rem=0; rem < (SwitchImg.arguments.length-2); rem+=3) {
            store = SwitchImg.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
    if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
        (store.indexOf('document.all[')==0 && document.all==null))
         store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
         obj = eval(store);
    if (obj != null) {
              switcher[keep++] = obj;
      switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
      obj.src = SwitchImg.arguments[rem+2];
  } }
  document.Data = switcher;
} //end

function RestoreImg()
{ //start
  if (document.Data != null)
    for (var rem=0; rem<(document.Data.length-1); rem+=2)
      document.Data[rem].src=document.Data[rem+1];
}

function PopUp( ToURL, alto, ancho, ventana)
{
window.open(ToURL, ventana,'scrollbars=no,status=no,menubar=no,resizable=no,width=' + ancho +', height=' + alto + ',fullscreen=no');
return 0;
}
function PopUp_resize( ToURL, alto, ancho, ventana)
{
window.open(ToURL, ventana,'scrollbars=no,status=no,menubar=no,resizable=yes,width=' + ancho +', height=' + alto + ',fullscreen=no');
return 0;
}

function abrir_popup(sURL)
{
opciones = "toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0, width=500px, height=300px";
window.open(sURL, '', opciones).focus();
}

function PopUpPanda(nombre,x,y){
window.open(nombre,"_blank","width="+x+",height="+y+",top="+(screen.height-y)/2+",left="+(screen.width-x)/2)
}

function anchor( nombre ) {
document.location.href= document.location.href.split('#')[0] + '#' + nombre;
}



function goBuscador() {

frm = document.buscar;
if ( frm.buscador.value == 'tiendas' ) {

  frm.action = 'http://tiendas.arrakis.com/es_ES/share-cgi/search.ftcb';
  frm.k.value = frm.cadena.value ;
  
} else {
  frm.action = '/cgis/busquedas.php';
}
frm.submit();

}

