/* ********************************************************************************************** */
/* ***** imprimir pagina y enviar pagina.                                                   ***** */
/* ***** Archivo de estilos usado:                                                          ***** */
/* *****     /<carpeta prontus>/css/site/port/estilos.css                                   ***** */
/* ***** V1.0 09/04/2003 - MCO - Primera version.                                           ***** */
/* ***** V2.0 09/05/2003 - MCO - Se agrega el uso del estilo gral * y si en uno de los      ***** */
/* *****                         estilos usados no viene el valor, se usa uno por defecto.  ***** */
/* *****                         Se agrega restriccion para no tomar los estilos con hover. ***** */
/* ********************************************************************************************** */




// ******************************** ENVIAR A *******************************
// Envio de noticia por e-mail.
function enviar() {
  var url = document.URL;
  var loc = '/prontus_rocram/stat/enviar/formulario.html?_URL=' + escape(url);
  var envia = window.open(loc,'enviar',
  'toolbar=0,status=0,menubar=0,scrollbars=0,resizable=0,location=0,directories=0,width=400,height=415');
  envia.focus();
}; // enviar.

// ******************************** IMPRIMIR PAGINA *******************************
// Abre la ventana para imprimir el artículo actual.
// Con soporte para multivistas
function imprimir() {
  var url = document.URL;
  var mvcookie = readCookie('vista');
  if(mvcookie!='') {
    mvcookie = '_MV='+mvcookie+'&';
  } else {
    mvcookie = '';
  }
  var loc = '/cgi-bin/imprimir.cgi?'+mvcookie+'_URL=' + escape(url);
  subWin(loc, 'imprimir', (screen.availWidth/2), screen.availHeight, 50, 50)
};

//******************************** VENTANA POP ***********************************
// levanta una ventana pop.
<!--
  function subWin(loc, nom, ancho, alto, posx, posy) {
    var options="toolbar=0,status=0,menubar=0,scrollbars=1,resizable=0,location=0,directories=0,width=" + ancho + ",height=" + alto;

    win = window.open(loc, nom, options);
    win.focus();
    win.moveTo(posx, posy);
  };
//-->

//**combobox**
<!--
  function link_to_tracking(){
    var indice = document.track_nav.cmb_tracking.selectedIndex;
    if (indice > 0){
      window.open(document.track_nav.cmb_tracking.options[indice].value);
    };
  };
  //-->

  // ******************************** POP para Zoom *******************************
var FOTOS = new Array();
var TITUS = new Array();
var PIES = new Array();
function popZoom(loc, nom, ancho, alto, posx, posy) {
  var options="toolbar=no,status=no,menubar=no,scrollbars=no,resizable=yes,location=no,directories=no,width="
             + ancho + ",height=" + alto;
  winzoom = window.open(loc, nom, options);
  winzoom.focus();
  if ( (posx > 0) && (posy > 0) ) {
    winzoom.moveTo(posx, posy);
  };
}; // popZoom

/*FIN*/

/*FIN*/

// ---------------------------------------------------------
// Lee el valor de una cookie
//    name: Nombre de la cookie a leer
function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}

