
// SERVIDORES DE COMERCIO DATA S.L. © 1997-2002
// Códigos de JavaScript


// TEXTO EN LA BARRA DE ESTADO
 var DisplayLength = 150;
 var pos = 1 - DisplayLength;
 function SC_textoestado() {
  var scroll = "";
  pos++;
  if (pos == mensaje.length) pos = 1 - DisplayLength;
  if (pos<0) {
   for (var i=1; i<=Math.abs(pos); i++)
   scroll = scroll + " ";
   scroll = scroll + mensaje.substring(0, DisplayLength - i + 1);
  }
  else scroll = scroll + mensaje.substring(pos, pos + DisplayLength);
  window.status = scroll;
  setTimeout("SC_textoestado()",100);
 }


// SIN BOTON DERECHO
 function right(e) {
  if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
  return false;
  else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
   alert('Sigue navegando...');
   return false;
  }
  return true;
 }
 document.onmousedown=right;
 document.onmouseup=right;
 if (document.layers) window.captureEvents(Event.MOUSEDOWN);
 if (document.layers) window.captureEvents(Event.MOUSEUP);
 window.onmousedown=right;
 window.onmouseup=right;


// DIALER SIMULANDO WINDOWS
 function SC_conectaw() {
  browser=navigator.appName;
  if (browser=="Netscape")  lang=navigator.language;
  else lang=navigator.userLanguage;
  lang=lang.substr(0,2);
  iea='fullscreen=yes,scrollbars=0';
  ieb='channelmode=0,hotkeys=0,dependent=0,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0';
  v='bajar';
  w="300";
  h="200";
  if (lang=="es") l='es';
  if (lang!="es") l='int';
  if (browser=="Microsoft Internet Explorer") {
   if (document.all) window.open('cf/conexion.cfm?browser=ie&lang='+l,v,iea);
   else if (document.layers) window.open('cf/conexion.cfm?browser=ie&lang='+l,v,ieb);
  }
  else {
   window.open('cf/conexion.cfm?browser=nn&lang='+l,v,'width='+w+',height='+h+',top='+((screen.height)?(screen.height-h)/2:0)+',left='+((screen.width)?(screen.width-w)/2:0)+',scrollbars=no,resizable=yes');
  }
  self.focus();
 }


// VENTANA CENTRADA
 function SC_ventana(u,w,h,s,e) {
  t=(screen.height) ? (screen.height-h)/2 : 0;
  l=(screen.width) ? (screen.width-w)/2 : 0;
  window.open(u,'SC','width='+w+',height='+h+',top='+t+',left='+l+',scrollbars='+s+',status='+e+',resizable=no');
 }