var Pagina = "";

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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 MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);

function regenerate(){
	window.location.reload()
}
function regenerate2(){
	if (document.layers){
		appear()
		setTimeout("window.onresize=regenerate",450)
	}
}

function changetext(whichcontent,Destino,Layer1,Layer2){
	if (document.all||document.getElementById){
		cross_el=document.getElementById? document.getElementById(Destino): eval("document.all."+Destino) 
		cross_el.innerHTML='<font face="Arial" size=2>'+whichcontent+'</font>'
	}
	else if (document.layers){
		eval("document."+Layer1+".document."+Layer2+".document.write(whichcontent)")
		eval("document."+Layer1+".document."+Layer2+".document.close()")
	}
}

function appear(){
	document.d1.visibility='show'
	document.d3.visibility='show'
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}


function moveprev()
{
	ImagenNumero = ImagenNumero - 1
	if (ImagenNumero < 0)
		ImagenNumero = imagen.length - 1
	changetext(imagen[ImagenNumero],'descriptions3','d5','d6');
}
function movenext()
{
	ImagenNumero = ImagenNumero + 1
	if (ImagenNumero > imagen.length - 1)
		ImagenNumero = 0
	changetext(imagen[ImagenNumero],'descriptions3','d5','d6');
}


function changetext2(whichcontent,Destino,Layer1,Layer2)
{
	changetext(whichcontent,Destino,Layer1,Layer2)
}

function cambiaalpha(quien,Stat)
{

// 	quien	Nombre del elemento al que se le aplica el efecto
//	Stat	0 efecto over, 1 efecto out, valores en porcentaje

	var Opacidad = (Stat==0) ? 70 : 100;
	var ie4=document.all
	var dom=document.getElementById
	var Cursor = "crosshair"
/*
	all-scroll	Internet Explorer 6 and later. Arrows pointing up, down, left, and right with a dot in the middle, indicating that the page can be scrolled in any direction. 
	auto		Default. Browser determines which cursor to display based on the current context. 
	col-resize	Internet Explorer 6 and later. Arrows pointing left and right with a vertical bar separating them, indicating that the item/column can be resized horizontally. 
	crosshair	Simple cross hair. 
	default		Platform-dependent default cursor; usually an arrow. 
	hand		Hand with the first finger pointing up, as when the user moves the pointer over a link. 
	help		Arrow with question mark, indicating help is available. 
	move		Crossed arrows, indicating something is to be moved. 
	no-drop		Internet Explorer 6 and later. Hand with a small circle with a line through it, indicating that the dragged item cannot be dropped at the current cursor location. 
	not-allowed	Internet Explorer 6 and later. Circle with a line through it, indicating that the requested action will not be carried out. 
	pointer		Internet Explorer 6 and later. Hand with the first finger pointing up, as when the user moves the pointer over a link. Identical to hand. 
	progress	Internet Explorer 6 and later. Arrow with an hourglass next to it, indicating that a process is running in the background. User interaction with the page is unaffected. 
	row-resize	Internet Explorer 6 and later. Arrows pointing up and down with a horizontal bar separating them, indicating that the item/row can be resized vertically. 
	text		Editable text; usually an I-bar. 
	url(uri)	Internet Explorer 6 and later. Cursor is defined by the author, using a custom Uniform Resource Identifier (URI), such as url('mycursor.cur'). Cursors of type .CUR and .ANI are the only supported cursor types. 
	vertical-text	Internet Explorer 6 and later. Editable vertical text, indicated by a horizontal I-bar. 
	wait		Hourglass or watch, indicating that the program is busy and the user should wait. 
	*-resize 	Arrows, indicating an edge is to be moved; the asterisk (*) can be N, NE, NW, S, SE, SW, E, or W—each representing a compass direction. 
*/

	var tempobj=ie4? eval("document.all."+quien) : document.getElementById(quien)
	tempobj.style.cursor = Cursor;
	if (tempobj.filters)
	{
		tempobj.filters.item('DXImageTransform.Microsoft.alpha').opacity = Opacidad
		tempobj.filters.item('DXImageTransform.Microsoft.alpha').finishOpacity = 0
		tempobj.filters.item('DXImageTransform.Microsoft.alpha').style = 0
	}
	else if (tempobj.style.MozOpacity)
		tempobj.style.MozOpacity=Opacidad/100
}


function encender()
{
	parent.Sonido.mc.gotoFrame(2)
}
function apagar()
{
	parent.Sonido.mc.gotoFrame(1)
}



function PopUps(Path)
{
	var height=460;
	var width=460;
	var strModal = "dialogHeight:" + (height+12) + "px; dialogWidth:" + (width+10) +"px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No";
	if (window.showModelessDialog) 
	{
		P = window.showModelessDialog(Path,"PopUp",strModal);
	}
	else
	{
		if (window.showModalDialog) 
		{
		P = window.showModalDialog(Path,"PopUp",strModal);
		}
		else
		{
			  var str = "channelmode = no, directories = no, fullscreen = no, location = no, menubar = no, resizable = no, scrollbars = no, status = no, titlebar = no, toolbar = no, height=" + height + ",innerHeight=" + height;
			  str += ",width=" + width + ",innerWidth=" + width;
			  if (window.screen) {
				    var ah = screen.availHeight - 30;
				    var aw = screen.availWidth - 10;
				    var xc = (aw - width) / 2;
				    var yc = (ah - height) / 2;
				    str += ",left=" + xc + ",screenX=" + xc;
				    str += ",top=" + yc + ",screenY=" + yc;
			}
			P = window.open(Path,"PopUp",str);
		}
	}
}

var coll = document.links
function Ligitas()
{
   if (coll.length > 0)
   {
	for (i=0; i < coll.length; i++)
	{
	   document.links(i).style.cursor = "crosshair";
	}
    }
}

function ModifContent0(NumberItem)
{


	changetext(info[NumberItem],'descriptions','d1','d2');
	FuncionCambio = "ModifContent("+ NumberItem +")"
	setTimeout(FuncionCambio,1000)
}

function ModifContent(NumberItem)
{
	changetext(izquierda[NumberItem],'descriptions2','d3','d4');
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
	targ = "this";
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function AbrirVentana(ID)
{
	window.open("pop.asp?ID="+ID,"Pop","channelmode = no; directories = no; fullscreen = no; height = 250; left = 0 location = no; menubar = no; resizable = no; scrollbars = no; status = no; titlebar = no; toolbar = no; top = 0; width = 250");
}