function IrA(D){location.href=D;}
function IrAN(D,P){if(P.length==0)P='width=600,height=500,top=10,left=10,resizable=yes,scrollbars=yes';window.open(D,'',P);return;}

function AsigValSelect(F,V){var ctd=eval("window.document.forms."+F+".length");for(var cp=0;cp<ctd;cp++)if(eval("window.document.forms."+F+".options[cp].value")==V)eval("window.document.forms."+F+".selectedIndex="+cp);}

function DelOption(d){var obj=eval("window.document.forms."+d);var c=obj.options.length;for(var i=c-1;i>=0;i--)obj.remove(i);}
function InsOption(d,v,t){var opcion=document.createElement('option');opcion.text=t;opcion.value=v;var obj=eval("window.document.forms."+d);try{obj.add(opcion,null);}catch(ex){obj.add(opcion);}}

function CTArea(C,S,T){var t=T-T_CTArea(C);if(t<0){C_CTArea(C,T);t=T-T_CTArea(C);}if(S!='')eval('window.document.forms.'+S+'.value='+(t));}

function T_CTArea(C){var t=eval('window.document.forms.'+C+'.value'),D='\1\2\3',o='\n';while(t.search(o)>=0)t=t.replace(o,D);return t.length;} // Intro: JS=CR,LF(2 bytes) HTML=<BR>(4 bytes)
function C_CTArea(C,T){var t=eval('window.document.forms.'+C+'.value'), D='\1\2\3', o='\n';while(t.search(o)>=0)t=t.replace(o,D);if (t.charAt(t.length-3)=='\1' && t.length>T) t=t.substring(0,t.length-4);t=t.substring(0,T);while(t.search(D)>=0)t=t.replace(D,o);t=t.replace('\1','');t=t.replace('\2','');t=t.replace('\3','');eval('window.document.forms.'+C+'.value=t');} // corta

function FImg(D,C){var e="document."+D+".src='"+C+"'";eval(e);}//Donde Cual

function lTrim(c){var i,p,t=c.length;for(i=0;i<t;i++)if(c.charCodeAt(i)!=160){p=i;i=t;}return c.substr(p);}

function aI(c,vNaN,vNull){try{var n=parseInt(c);if(isNaN(n))n=vNaN;return n;}catch(e){}return vNull;}

function ReSizeW(w,h){if(window.outerWidth){window.outerWidth=w;window.outerHeight=h;}else if(window.resizeTo){window.resizeTo(w,h);}else{alert("Not supported.");}}
// function MoveToW(x,y){window.moveTo(x,y);}

function PAdi(C,M,V)
{
if(eval('window.document.forms.'+C+'.checked')==true) { eval('window.document.forms.'+M+'.disabled=false'); eval('window.document.forms.'+M+'.value="'+V+'"'); }
else { eval('window.document.forms.'+M+'.disabled=true'); eval('window.document.forms.'+M+'.value=""'); }
}// Procesa Adicional (Campo a consultar checkec o no, campo a Modificar, Valor a poner)
