function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function GP_popupConfirmMsg(msg) { //v1.0
  document.MM_returnValue = confirm(msg);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function validMail(str) {
	var at="@";
	var dot=".";
	var lat=str.indexOf(at);
	var lstr=str.length;
	var ldot=str.indexOf(dot);
	if ((str.indexOf(at)==-1) ||
	((str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)) ||
	((str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)) ||
	(str.indexOf(at,(lat+1))!=-1) ||
	((str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)) ||
	(str.indexOf(dot,(lat+2))==-1) ||
	(str.indexOf(" ")!=-1)) {
		return false;
	} else {
		return true;
	}
}
function limpiarCampo(b,c) { //v2.0
	eval("document."+b+"."+c+".value='';");
}
function agregarFavoritos(dir,tit) {
	var navegador = navigator.appName;
	if (navegador == "Microsoft Internet Explorer")  {
		window.external.AddFavorite(dir, tit)
	} else {
		window.sidebar.addPanel(tit, dir, ''); 
	}
}

function validNormalChar(ca) {
	var Cadena = "AÁBCDEÉFGHIÍJKLMNÑOÓPQRSTUÚVWXYZaábcdeéfghiíjklmnñoópqrstuúvwxyz0123456789_- ";
	la = ca.length;
	vcar = true;
	for(c=0; c<la; c++) {
		subca = "";
		subca = ca.charAt(c);
		if(subca.indexOf(Cadena) < 0) {
			vcar = false;
			break;
		}
	}
return vcar;
}

function tiene_numeros(texto,c){
	var numeros = "0123456789"+c;
	var a=false;
	for(i=0; i<texto.length; i++){
		if (numeros.indexOf(texto.charAt(i),0)!=-1){
			a=true;
		} else {
			a=false;
			break;
		}
	}
	return a;
}

var actualFontSize = 14;
var minFontSize = 9;
var maxFontSize = 24;

function ChangeFontSize(id) {
	actualFontSize = actualFontSize > maxFontSize ? maxFontSize : (actualFontSize < minFontSize ? minFontSize : actualFontSize);

	document.getElementById(id).style.fontSize = actualFontSize+"px";
	//document.getElementById(id).style.fontSize = actualFontSize;
}

function IncFontSize(id) {
	++actualFontSize;
	ChangeFontSize(id);
}

function DecFontSize(id) {
	--actualFontSize;
	ChangeFontSize(id);
}

function increce() {
	/* ACTUAL_FONTSIZE = ACTUAL_FONTSIZE+1;
	if (ACTUAL_FONTSIZE > LARGEST_FONTSIZE) { ACTUAL_FONTSIZE = LARGEST_FONTSIZE }
	ChangeProp('texto', '', 'style.fontSize', ACTUAL_FONTSIZE, 'SPAN');
	*/
	IncFontSize('texto');
}

function decrece() {
	/*
	ACTUAL_FONTSIZE = ACTUAL_FONTSIZE-1
	if (ACTUAL_FONTSIZE < SMALLEST_FONTSIZE) { ACTUAL_FONTSIZE = SMALLEST_FONTSIZE }
	ChangeProp('texto', '', 'style.fontSize', ACTUAL_FONTSIZE, 'SPAN');
	*/
	DecFontSize('texto');
}

////////////soporte png para ie 6 /////////////////////
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
if ((version >= 5.5) && (document.body.filters))
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle  + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}
////////////soporte png para ie 6 /////////////////////