function CheckEmailAddr(obj) {
var email=obj["e-mail"].value;
if ( email.search( /^\s*[\w\-]+@[\w\-]+(\.[\w\-]+)+\s*$/ ) == -1 ) {
alert( "Tu dirección de correo electrónico tiene un formato incorrecto!!");
return false;
}
return true;
}
function tratareturn(ev)
{
if (navigator.appName.indexOf("Netscape") != -1)
{
if ( ev.which == 13 )
{
if (ev.target.name == "text")
showWindow();
else if (ev.target.name == "glosario")
openGlosary();
else if (ev.target.name == "fundName")
showFundInForm();
else {
if (null != document.formulario)
if (null != document.formulario.textfield2)
document.formulario.textfield2.focus();
}
return false;
}
else
return true;
}
else
{
ev = window.event;
if ( ev.keyCode == 13 )
{
if (ev.srcElement.name == "text")
showWindow();
else if (ev.srcElement.name == "glosario")
openGlosary();
else{
if (null != document.formulario)
if (null != document.formulario.textfield2)
{
document.formulario.textfield2.focus();
}
}
return false;
}
else
return true;
}
}
versOk = ((parseInt(navigator.appVersion)>=4));
if(versOk){
nbul = new Image();	nbul.src = "/images/pest-blanco.gif";
ndot = new Image();	ndot.src = "/images/pest-azul.gif";
}
function hiLite(imgDocID,imgObjName) {
if (versOk == 1) {
document.images[imgDocID].src = eval(imgObjName + ".src")
}}
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_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
function ajustaVarias()
{
var l,i,p,x,obj,args=ajustaVarias.arguments;
for (i=0; i<(args.length-1); i+=2)
if ((obj=MM_findObj(args[i]))!=null)
{
l=args[i];
x=args[i+1];
ajusta(l,x);
}
}
function jump( select )
{
var option = select.options[ select.selectedIndex];
window.location = option.value;
}
var newWin
function openwindow(archivo,nombre,ancho,alto,conbarra)
{
if (newWin) newWin.close();
newWin=window.open(archivo,nombre,"width="+ancho+",height="+alto+",scrollbars="+conbarra+",location=no,menubar=no,directories=no,toolbar=no,resizable=no,status=no");
if(newWin.focus) newWin.focus();
}
function sizeventana(ancho,alto)
{
window.resizeTo(ancho,alto)
}
function XImage(i)
{
this.img = i;
this.images=new Array();
this.current=0;
this.images[0]= this.img.src;
this.nimages=1;
}
function add(path)
{
this.images[this.nimages]= path ;
this.nimages++;
}
function rollUp()
{
this.current++;
if(this.current==this.nimages) this.current=0;
this.img.src=this.images[this.current]
}
XImage.prototype.add = add;
XImage.prototype.rollUp = rollUp;
var im1;
function ajusta(lay, x)
{
var l, winW;
if(document.layers)
{
l = document.layers[lay];
winW = window.innerWidth-16;
if(l.clip.width<=winW)
l.left=(winW-l.clip.width)/2 + x-213;
}
else
{
l = document.all[lay].style;
winW = document.body.offsetWidth-20;
if(parseInt(l.width)<=winW)
l.left=((winW-parseInt(l.width))/2 + x-213) + "px";
}
}
function cambio()
{
var selaux=document.forms.frmInstrument.selpr;
if(selaux.options[selaux.selectedIndex].value == "P")
{
if(document.layers)
{
document.layers.lacapa.visibility="show";
}
else
{
document.all.lacapa.style.visibility="visible";
}
}
else
{
if(document.layers)
document.layers.lacapa.visibility="hide";
else
document.all.lacapa.style.visibility="hidden";
}
}
