// JavaScript Document
// Formularios De la página
clear = false;
clear2 = false;
function NoPrograma(p)
{
	if (!clear)
	{
		p.value="";
		clear = true;
	}
}
//function Programa(p)
//{	if (clear)
//	{
//		p.value="Buscar Programa";
//		clear = false;
//	}
//}
function NoCodigo(p)
{
	if (!clear2)
	{
		p.value="";
		clear2 = true;
	}
}
//function Codigo(p)
//{	if (clear)
//	{
//		p.value="Codigo";
//		clear = false;
//	}
//}


// Ventana nueva para Imagenes Interface de Programas
// --- Redimensiona y posiciona ---//
function ajustar(imagen) {
var PosWid, PosHei;
var w, h;
w = (imagen.width);
h = (imagen.height + 25);
//PosWid = (250 - (imagen.width/2));
//PosHei = (200 - (imagen.height/2));
window.resizeTo(w, h);
window.moveTo(20, 20);
}
// --- habre ventana ---//
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->


// Script para el despliege del menú y demás aperturas //

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.texto_menu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="texto_menu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}