function enviarAmigo() {
	var win;
	if (ns) {
		win = open('mailto:?body='+document.URL,'',0,0);
	}else{
		win = open('mailto:?body=http://172.16.100.77:8840/Puleva/index.jsp','',0,0);
	}
    win.close();
}


function abreVentanaImpresion(parametros) {
     var altura = 1;
	 var anchura = 1;
	 var top = screen.availHeight;
	 var left = screen.availWidth;
	 if (ns) {
	    altura = 350;
		anchura = 400;
		left = 200;
		top = 200;
	 }
	 window.open('impresion.jsp?'+parametros, '', 'left=' + left + ',top=' + top + ',width=' + anchura + ',height=' + altura);
}

function llamarLayer(nombreLayer,nombrePagLayer,parametros) {
	if(ns && !document.getElementById) {
		layer = eval("document."+nombreLayer);
		if (parametros == "") {
		   layer.src = nombrePagLayer;
		}else{
		   layer.src = nombrePagLayer+"?"+parametros;
		}
	}else if(ns && document.getElementById) {	
		layer = document.getElementById(nombreLayer);
		if (parametros == "") {
		   layer.src = nombrePagLayer;
		}else{
		   layer.src = nombrePagLayer+"?"+parametros;
		}		
	}else if(ie) {
		layer = eval(nombreLayer);
		if (parametros == "") {
		   layer.location.replace(nombrePagLayer);
		}else{
		   layer.location.replace(nombrePagLayer+"?"+parametros);
		}
	}
}

function cargarLayer(nombreLayer) {
   llamarLayer(nombreLayer,layerSrc,"");
}

function abreVentanaCompleta(url) {
   window.open(url,'','top=0,left=0,width='+(screen.width-10)+',height='+(screen.height -100)+',depent=1,scrollbars=1,location=1,status=yes,toolbar=1,menubar=1,resizable=yes');
}

function nuevavent(enlace, nombre, explorador, tamano, ancho, alto, scroll, menu, estado, ubicacion, cabecera, pantalla ) {
 
 var titu = '' + nombre;
 var splitstring = titu.split(" ");
 var titulo_vent = "";
 for(i = 0; i < splitstring.length; i++)
 titulo_vent+= splitstring[i];

 
 if ("true"==explorador){
     explorador="yes";} else {explorador= "no";}
 if ("true"==tamano){
     tamano="yes";} else {tamano= "no";}
 if ("true"==scroll){
     scroll="yes";} else {scroll= "no";}
 if ("true"==pantalla){
     pantalla="yes";} else {pantalla= "no";}
 if ("true"==menu){
     menu="yes";} else {menu= "no";}
 if ("true"==estado){
     estado="yes";} else {estado= "no";}
 if ("true"==ubicacion){
     ubicacion="yes";} else {ubicacion= "no";}
 
  if (pantalla == "yes" && navigator.appName == 'Netscape') {
    alto = Screen.height;
    ancho = Screen.width;
 }
window.open (enlace, titulo_vent,"resizable="+tamano+",toolbar="+explorador+",fullscreen="+pantalla+",width="+ancho+", height="+alto+", scrollbars="+scroll+",menubar="+menu+",status="+estado+",location="+ubicacion); 
}
