//Libreria de Utilidades 

function onlyDigits(e,decReq) {
	
	var isIE = document.all?true:false;
	var isNS = document.layers?true:false;

	var key = (isIE) ? window.event.keyCode : e.which;
	var obj = (isIE) ? event.srcElement : e.target;
	var isNum = (key > 47 && key < 58) ? true:false;
	var dotOK = (key==46 && decReq=='decOK' && (obj.value.indexOf(".")<0 || obj.value.length==0)) ? true:false;
	window.event.keyCode = (!isNum && !dotOK && isIE) ? 0:key;
	e.which = (!isNum && !dotOK && isNS) ? 0:key;
	return (isNum || dotOK);
}

function goInternational(sURL)
{
if (sURL != "")
	document.location.href = sURL;
}
// change to false if no confirmation message desired
confirm_click=false;

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Function to check for null in search criteria. 
// Added - LBS 09/19/00
function validateCriteria(sCriteria){
        if ("" == sCriteria.value)
	{
		alert('Please enter text in the search field before clicking on search.');
		return false;
	}
	else
		return true;
}

// Function for javascript pop ups
// Added - AC 03/01/02
function popup(theURL, winName, attrbList) {
 window.open(theURL, winName, attrbList);
}
// Function for small pop up window for graphics
// Added - AE 05/14/02
function popOpen(url, width, height) {
        var Win = window.open(url,'popOpen','width=' + width + ',height=' + height + ',resizable=yes,scrollbars=yes,menubar=yes,status=yes' );
}

// Function to validate an email address
function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalido E-mail")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalido E-mail")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalido E-mail")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalido E-mail")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalido E-mail")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalido E-mail")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalido E-mail")
		    return false
		 }

 		 return true					
}

								
function LogDownload(sURL) {
	childWin = window.open("/developer/component_exchange/Redirector.htm?sURL=" + sURL, "childWindow", "width=700, height=350");
	childWin.focus();
}

<!--
								
function NewDownload(sURL) {
	childWin = window.open("/developer/component_exchange/Redirector.htm?sURL=" + sURL, "childWindow", "width=700, height=350");
	childWin.focus();
}
								

//Indica donde este el usuario dentro del site
function jf_mapa_rapido(a,u2,n2,u3,n3,u4,n4,u5,n5){ 
	var ls_url=" ";
	var ls_separador="<IMG height=6 alt='' src='img/flecha.gif' width=3 border=0>";
	
	
		ls_url+="<A href='index.asp' target='_parent'> Inicio</A> "; //Home
		ls_url+=ls_separador;

	
	if (n2!=""){
		ls_url+="<A href='"+u2+"'> "+n2+" </A>"; //N1
		ls_url+=ls_separador;
	}

	if (n3!=""){
		ls_url+="<A  href='"+u3+"'> "+n3+"</A>"; //N1
		ls_url+=ls_separador;
	}

	if (n4!=""){
		ls_url+="<A  href='"+u4+"'> "+n4+" </A>"; //N1
		ls_url+=ls_separador;
	}


	if (n5!=""){
		ls_url+="<A  href='"+u5+"'> "+n5+" </A>"; //N1
		ls_url+=ls_separador;
	}

	//Pagina actual
	ls_url+="<SPAN> "+ a +"</SPAN>";
	return ls_url;
}


function jf_cambia_banner_topico(as_banner,as_pagina)
{
	parent.mainFrame.location.href=as_pagina;
	parent.topFrame.location.href=as_banner;

}


 function jf_AbrirVentana(url) {
	  vwidth=800;  vheight=600; 
     open(url,"displayWindow","width=800,height=600,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no,top="+((screen.availHeight-vheight)/2)+",left="+((screen.availWidth-vwidth)/2));	  
} 

 function jf_AbrirVentana_xy(url,x,y) {
	  vwidth=x;  vheight=y; 
     open(url,"displayWindow","width="+x+",height="+y+",scrollbars=NO,status=no,toolbar=no,menubar=no,location=no,top="+((screen.availHeight-vheight)/2)+",left="+((screen.availWidth-vwidth)/2));	  
} 

 function jf_AbrirVentana_xyS(url,x,y) {
	  vwidth=x;  vheight=y; 
     open(url,"displayWindow","width="+x+",height="+y+",scrollbars=yes,status=no,toolbar=no,menubar=no,location=no,top="+((screen.availHeight-vheight)/2)+",left="+((screen.availWidth-vwidth)/2));	  
} 

function jf_cerrar(){
	document.close();
}
// End of File