function BrowserCheck() { var b = navigator.appName if (b=="Netscape") this.b = "ns" else if (b=="Microsoft Internet Explorer") this.b = "ie" else this.b = b this.version = navigator.appVersion this.v = parseInt(this.version) this.ns = (this.b=="ns" && this.v>=4) this.ns4 = (this.b=="ns" && this.v==4) this.ns5 = (this.b=="ns" && this.v==5) this.ie = (this.b=="ie" && this.v>=4) this.ie4 = (this.version.indexOf('MSIE 4')>0) this.ie5 = (this.version.indexOf('MSIE 5')>0) this.min = (this.ns||this.ie) } is = new BrowserCheck(); function stripSpaces(xx) { x = new String(xx); while (x.substring(0,1) == ' ') x = x.substring(1); while (x.substring(x.length-1,x.length) == ' ') x = x.substring(0,x.length-1); return x; } function validarAmarillo(campo) { var valor valor=stripSpaces(campo.value); if (!is.ns) { if (valor!=0) campo.style.backgroundColor="white"; else campo.style.backgroundColor="#FFFFCC"; return true; } }