function OnClick(page,tipo){
	tipo = (tipo == "" || tipo == null) ? 1 : tipo;
	if(page){
		if(tipo == 1)
			document.location.href = __strMainDir + page;
		else
			openWin(page,'IS','');
	}
}

function mudarclasse(tr,claseNombre,imgNombre){
	tr.className = claseNombre;	
	if(tr.children){
		tr.children[0].firstChild.src = imgNombre;
	}else{
		tr.childNodes[1].firstChild.src = imgNombre;
	}
}

function Mostrar(obj) {
	obj = document.getElementById(obj);
	
	/*for(i=1; i<=cant; i++) {
		obj2 = document.getElementById(nom_obj + i);
		if (obj2) obj2.style.display = "none";
	}*/
	
	if (obj) {
		//alert(obj.style.display = (obj.style.display == "block") ? "none" : "block");
		if (obj.style.display == 'none') {
			slideDown(obj);
		} else {
			slideUp(obj);
		}
	}
}

function Test(obj) {
	for(i=1; i<=2; i++) {
		obj = document.getElementById("pma" + i);
		if (obj) obj.style.display = "none";
	}
	if (obj.style.display == 'none') {
		slideDown(obj);
	} else {
		slideUp(obj);
	}
	
}

function slideDown(obj) {
	if (obj) {
		obj.style.display = "block";	
	}
}

function slideUp(obj) {
	if (obj) {
		obj.style.display = "none";
	}
}