/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function down(contenedor){document.getElementById(contenedor).style.display = 'none';}
function up(contenedor) {document.getElementById(contenedor).style.display = 'block';}

function trover(tr) {tr.className='tover';}
function trout(tr) {tr.className='tdata';}

function bover(cmd) {cmd.className='bover';}
function bout(cmd) {cmd.className='bout';}

function foco(elemento) {elemento.style.border = "1px solid #424242";}

function no_foco(elemento) {elemento.style.border = "1px solid #A4A4A4";elemento.style.background="#fff";}


function ccd(div){
	refresco();
	div.style.border ='solid';
	//div.style.background='url(./Img/tb1.png)';
	div.style.background='#B40404';
	div.style.borderColor='#B40404';
	//div.style.color='#fff';
        
	var mp=div.getElementsByTagName('a');
	var l=mp.length;
	for(i=0;i<l;i++){
		mp[i].style.color='#424242';
	}

}

function refresco(){
	var mp=document.getElementsByTagName('div');
	var divsCount=mp.length;
	var l=mp.length;
		for(i=0;i<divsCount;i++) {
			if(mp[i].className=='divmp') {
				mp[i].style.border ='solid 3px';
				mp[i].style.borderColor='#fff';
				//mp[i].style.background='url(./Img/bt1.png)';
				mp[i].style.background='#A9A9F5;';
				var ap=mp[i].getElementsByTagName('a');
				var lap=ap.length;
				for(j=0;j<lap;j++){
					//ap[j].style.color='#191970';
					ap[j].style.color='#FFF';
				}
			}
		}
}

function cambioimg(nombre)
{
   // alert(document.getElementsByName(nombre).value);
   // var name = document.getElementById(nombre).value;
    document.images[nombre].src = "./Libs/Img/a2.png";

}
function volverimg(nombre)
{
document.images[nombre].src = "./Libs/Img/a1.png";

}
function dejarimg(nombre)
{
    document.images[nombre].src = "./Libs/Img/a3.png";
}

function cambioImg2(id,img)
{
    var im=document.images[id];
    if(im.className!="imgMnuPpalSel") im.src = "./Libs/Img/"+img+".png";
}

function mPrincipalReset(){
    var m=document.getElementsByTagName("img");
    for(var i=0;i<m.length;i++){
        if(m[i].className=="imgMnuPpalSel") m[i].className="imgMnuPpal";
        if(m[i].className=="imgMnuPpal") m[i].src="Libs/Img/a1.png";
    }
}

function mPrincipalSelect(i,ms){
    mPrincipalReset();
    document.images[i].src="./Libs/Img/a3.png";
    document.images[i].className="imgMnuPpalSel";
    cargaMsec(ms);
}

