function NavVista(n,A){this.n=n;this.A=A;this.l=0;this.v='div';this.r='div';this.d='item';this.c='item';this.g='activo';this.B='';this.f='activo';this.w='oculto';};NavVista.prototype.set=function(F){if(document.getElementById(this.A)==null){if(this.l){alert("No existe ningun elemento con id="+this.A);}return 0;}if(document.getElementById(this.n)==null){if(this.l){alert("No existe ningun elemento con id="+this.n);}return 0;}var D=document.getElementById(this.A);var C=document.getElementById(this.n);var o=this.e(this.d,D,this.v);var k=this.e(this.c,C,this.r);if(o.length!==k.length){if(this.l){alert("El numero de elementos de "+this.n+" es "+k.length+" y G de "+this.A+" es "+o.length+". Deberian ser iguales");}return 0;}else{if(this.l){alert("Detectados "+k.length+" elementos");}}for(var i=0;i<o.length;i++){if(F==i){o[i].className=this.g+" "+this.d;k[i].className=this.f+" "+this.c;if(this.l){alert("Activado elemento "+F);}}else{o[i].className=this.B+" "+this.d;k[i].className=this.w+" "+this.c;}}return 1;};NavVista.prototype.e=function(t,m,tagName){if(m==null)m=document;if(tagName==null)tagName='*';var G=new Array();var tags=m.getElementsByTagName(tagName);var H=" "+t+" ";for(i=0,j=0;i<tags.length;i++){var test=" "+tags[i].className+" ";if(test.indexOf(H)!= -1)G[j++]=tags[i];}return G;} 
