var message="Gracias por visitar nuestra página web. Esperamos sea de su agrado.";

var ventanaCalendario=false

function muestraCalendario(raiz,formulario_destino,campo_destino,mes_destino,ano_destino){
	//funcion para abrir una ventana con un calendario.
	//Se deben indicar los datos del formulario y campos que se desean editar con el calendario, es decir, los campos donde va la fecha.
	if (typeof ventanaCalendario.document == "object") {
		ventanaCalendario.close()
	}
	ventanaCalendario = window.open("indexcal.php?formulario=" + formulario_destino + "&nomcampo=" + campo_destino,"calendario","width=300,height=300,left=100,top=100,scrollbars=no,menubars=no,statusbar=NO,status=NO,resizable=YES,location=NO")
}

function clavesIguales(obj1,obj2)
{
	if(obj1.value!=obj2.value)
	{
		alert("Las claves son diferentes, vuelvalas a escribir");
		obj1.value="";
		obj2.value="";
		obj1.focus();
	}
}

function transformar(theForm,trans,obj,Mensaje,min,max)
{
	var cadena=obj.value;

	if(trans=="M")
		theForm.alias.value=theForm.alias.value.toUpperCase();
	if(trans=="m")
		theForm.alias.value=theForm.alias.value.toLowerCase();
	if(trans=="X")
	{
		if(cadena=="")
		{
			alert(Mensaje);
			obj.focus();
		}
	}
	if(cadena!="" && (min>0 || max>0) )
	{
		if(cadena.length>max)
		{
			alert("No puede tener más de "+max+" caracteres");
		}
		if(cadena.length<min)
		{
			alert("No puede tener menos de "+min+" caracteres");
		}
	}
};

function multiLoadFrame(doc1,doc2,doc3)
{
	parent.principal.location.href=doc1;
	parent.izquierdo.location.href=doc2;
	parent.derecho.location.href=doc3;
};

function click(e)
{
	if (document.all)
	{
		if (event.button==2||event.button==3)
		{
			alert(message);
			return false;
		}
	}
	if (document.layers)
	{
		if (e.which == 3)
		{
			alert(message);
			return false;
		}
	}
};

if (document.layers)
{
	document.captureEvents(Event.MOUSEDOWN);
};

document.onmousedown=click;

scrwidth = screen.width;
scrheight = screen.height;
inwidth = (scrwidth - 25);
inheight = (scrheight - 210);

var validez=1;
var expiration = new Date();
expiration.setTime(expiration.getTime()+ (validez*24*60*60*1000));
var MyPassword="";
var MyName="";

//moveTo(0,0);
//resizeTo(scrwidth,scrheight-23);

contentleft = 120;
contenttop = 80;
contentwidth = inwidth - contentleft;
contentheight = inheight - contenttop;

allbuttop = 45;
firstbutleft = 180;

function MM_findObj(n, d) { //v3.0
  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); return x;
}

function tmt_DivAlign(theDiv,h,v,hPx,vPx){
	var obj,fun,dw,dh,lw,lh,x,y;
	fun = (document.getElementById) ? "document.getElementById" : "MM_findObj";
	obj = (document.getElementById) ? document.getElementById(theDiv) : MM_findObj(theDiv);
	if(obj){if(document.all){
	dw = document.body.clientWidth;dh = document.body.clientHeight;}
	else{dw = innerWidth;dh = innerHeight;}
	if(document.layers){lw = obj.clip.width;lh = obj.clip.height;}else{
	lw = obj.style.width.replace("px","");lh = obj.style.height.replace("px","");}
	x = (document.layers) ? ".left" : ".style.left";
	y = (document.layers) ? ".top" : ".style.top";
	if(h == "l"){eval(fun+"('"+theDiv+"')"+x+"="+hPx);}
	if(h == "c"){eval(fun+"('"+theDiv+"')"+x+"="+dw+"/2-"+lw+"/2");}
	if(h == "r"){eval(fun+"('"+theDiv+"')"+x+"="+dw+"-"+lw+"-"+hPx);}
	if(v == "t"){eval(fun+"('"+theDiv+"')"+y+"="+vPx);}
	if(v == "m"){eval(fun+"('"+theDiv+"')"+y+"="+dh+"/2-"+lh+"/2");}
	if(v == "b"){eval(fun+"('"+theDiv+"')"+y+"="+dh+"-"+lh+"-"+vPx);}}
}

function positionThings () {
  thirdbutleft = (inwidth - 100);
  secondbutleft = Math.round((thirdbutleft - firstbutleft)/2) + firstbutleft;
	tmt_DivAlign('Info','l','t',firstbutleft,allbuttop);
	tmt_DivAlign('Carrito','l','t',secondbutleft,allbuttop);
	tmt_DivAlign('Contact','l','t',thirdbutleft,allbuttop);
	tmt_DivAlign('divContainer','l','t',contentleft,contenttop);
	MM_changeProp('Content','','style.width',contentwidth,'DIV');
	MM_changeProp('Content','','style.height',contentheight,'DIV');
	
}

function MM_setTextOfLayer(objName,x,newText) { //v3.0
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (navigator.appName=='Netscape') {document.write(unescape(newText)); document.close();}
    else innerHTML =unescape(newText)
}

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_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
   for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}

function layerLoadURL(L,URL,w,h){
  if(document.layers){
	L=eval(L);
	L.clip.width=w;
	L.clip.height=h;
	L.load(URL,L.clip.width);
  }
  if(document.all){
	eval("L=L.replace(/.layers/gi, '.all')");
	myVar="<object type=text/html width="+w+" height="+h+" data="+URL+"></object>";
	eval(L + ".innerHTML =\""+myVar+"\"");
  }
}

function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v3.0
  //Copyright 1998 Macromedia, Inc. All rights reserved.
  var i,j,aLayer,retVal,curDrag=null,NS=(navigator.appName=='Netscape'), curLeft, curTop;
  if (!document.all && !document.layers) return false;
  retVal = true; if(!NS && event) event.returnValue = true;
  if (MM_dragLayer.arguments.length > 1) {
    curDrag = MM_findObj(objName); if (!curDrag) return false;
    if (!document.allLayers) { document.allLayers = new Array();
      with (document) if (NS) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
        for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
          with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
      } else for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i];}
    curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
    curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
    curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
    curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
    curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
    curDrag.MM_oldZ = (NS)?curDrag.zIndex:curDrag.style.zIndex;
    curLeft= (NS)?curDrag.left:curDrag.style.pixelLeft; curDrag.MM_startL = curLeft;
    curTop = (NS)?curDrag.top:curDrag.style.pixelTop; curDrag.MM_startT = curTop;
    curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop -cU;
    curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop +cD;
    curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
    document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
    if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  } else {
    var theEvent = ((NS)?objName.type:event.type);
    if (theEvent == 'mousedown') {
      var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
      var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
      var maxDragZ=null; document.MM_maxZ = 0;
      for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
        var aLayerZ = (NS)?aLayer.zIndex:aLayer.style.zIndex;
        if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
        var isVisible = (((NS)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
        if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
          var parentL=0; var parentT=0;
          if (!NS) { parentLayer = aLayer.parentElement;
            while (parentLayer != null && parentLayer.style.position) {
              parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop;
              parentLayer = parentLayer.parentElement; } }
          var tmpX=mouseX-(((NS)?pageX:style.pixelLeft+parentL)+MM_hLeft);
          var tmpY=mouseY-(((NS)?pageY:style.pixelTop +parentT)+MM_hTop);
          var tmpW = MM_hWidth;  if (tmpW <= 0) tmpW += ((NS)?clip.width :offsetWidth);
          var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS)?clip.height:offsetHeight);
          if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
              || maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
      if (curDrag) {
        document.onmousemove = MM_dragLayer; if (NS) document.captureEvents(Event.MOUSEMOVE);
        curLeft = (NS)?curDrag.left:curDrag.style.pixelLeft;
        curTop = (NS)?curDrag.top:curDrag.style.pixelTop;
        MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
        document.MM_curDrag = curDrag;  curDrag.MM_SNAPPED=false;
        if(curDrag.MM_toFront) {
          eval('curDrag.'+((NS)?'':'style.')+'zIndex=document.MM_maxZ+1');
          if (!curDrag.MM_dropBack) document.MM_maxZ++; }
        retVal = false; if(!NS) event.returnValue = false;
    } } else if (theEvent == 'mousemove') {
      if (document.MM_curDrag) with (document.MM_curDrag) {
        var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
        var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
        newLeft = mouseX-MM_oldX; newTop  = mouseY-MM_oldY;
        if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
        if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
        if (MM_bT!=null) newTop  = Math.max(newTop ,MM_bT);
        if (MM_bB!=null) newTop  = Math.min(newTop ,MM_bB);
        MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
        if (NS) {left = newLeft; top = newTop;}
        else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
        if (MM_dragJS) eval(MM_dragJS);
        retVal = false; if(!NS) event.returnValue = false;
    } } else if (theEvent == 'mouseup') {
      document.onmousemove = null;
      if (NS) document.releaseEvents(Event.MOUSEMOVE);
      if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
      if (document.MM_curDrag) with (document.MM_curDrag) {
        if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
            (Math.pow(MM_targL-((NS)?left:style.pixelLeft),2)+
             Math.pow(MM_targT-((NS)?top:style.pixelTop),2))<=MM_tol) {
          if (NS) {left = MM_targL; top = MM_targT;}
          else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
          MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
        if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
        if(MM_dropBack) {if (NS) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
        retVal = false; if(!NS) event.returnValue = false; }
      document.MM_curDrag = null;
    }
    if (NS) document.routeEvent(objName);
  } return retVal;
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}

function MM_showHideLayers() { //v3.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 hidefoto() {
	MM_showHideLayers('foto','','hide');
}

function showfoto() {
	MM_changeProp('divContainer','','style.zindex','1','DIV');
	MM_changeProp('divContent','','style.zindex','1','DIV');
	MM_showHideLayers('foto','','show');
}

function movefoto() {
	MM_dragLayer('foto','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');
}

function hideinfo() {
	MM_showHideLayers('masinfo','','hide');
}

function showinfo() {
	MM_showHideLayers('masinfo','','show');
}

function moveinfo() {
	MM_dragLayer('masinfo','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'');
}

function setImageInLayer(objName,imagename) {
var ty = "<table border='1'><tr><td><a href='javascript://' onMouseDown='movefoto();'><img src='"+imagename+"'></a></td></tr><tr><td bgcolor='#CCFF99'><div align='center'><a href='javascript:hidefoto();'>CLOSE</a></div></td></tr><tr><td><div align='center'><a href=\"javascript:Reducir('foto','"+imagename+"');\">REDUCIR</a></div></td></tr></table>";
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (navigator.appName=='Netscape') {document.write(ty); document.close();}
    else innerHTML = ty;
}

function Reducir(objName,imagename) {
	myImage = new Image();
	myImage.src = imagename;
 	var ty = "<table border='1'><tr><td><a href='javascript://' onMouseDown='movefoto();'><img src='"+imagename+"' width='"+(myImage.width/2)+"' heigth='"+(myImage.height/2)+"'></a></td></tr><tr><td bgcolor='#CCFF99'><div align='center'><a href='javascript:hidefoto();'>CLOSE</a></div></td></tr><tr><td><div align='center'><a href=\"javascript:setImageInLayer('foto','"+imagename+"');\">AMPLIAR</a></div></td></tr></table>";
  	if ((obj=MM_findObj(objName))!=null) with (obj)
    	
    	if (navigator.appName=='Netscape')
    		{document.write(ty); document.close();}
    	else innerHTML = ty;
}

function setTextInLayer(objName,text) {
var ty = "<table border='1'><tr><td bgcolor='#CCFF99'>" + text + "</td></tr><tr><td bgcolor='#CCFF99'><div align='center'><a href='javascript:hideinfo();'>CLOSE</a></div></td></tr></table>";
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (navigator.appName=='Netscape') {document.write(unescape(ty)); document.close();}
    else innerHTML = unescape(ty);
}

function setCookie(name, value, expires, path, domain, secure) {
  document.cookie = name + "=" + escape(value) + 
  ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
  ((path == null) ? "" : "; path=" + path) +
  ((domain == null) ? "" : "; domain=" + domain) +
  ((secure == null) ? "" : "; secure");
}

function getCookie(name)
{
	var cname=name+"=";
	var dc=document.cookie;

  	if(dc.length>0)
  	{
  		begin=dc.indexOf(cname);
	
	  	if(begin!=-1)
  		{
  			begin+=cname.length;
  			end=dc.indexOf(";",begin);
	  		if(end==-1) end=dc.length;
	  		return unescape(dc.substring(begin,end));
  		}
  	}
  	return null;
}

function cuentas(datos)
{
	var info;
	var height = 200;
	var width = 300;
	var win_dimensions = "height = " + eval(height + 10) + ", width = " + eval(width + 30);
	info = window.open("", "Informacion", win_dimensions);
	//direccion=new Location();
	info.document.write("<body bgcolor='#FFCC00' text=000070 background='../images/portada/portada.jpg' onBlur='self.focus()'>");
	info.document.write("<font face=system>");
	info.document.write("El número de cuenta para hacer el ingreso o transferencia es el siguiente:<BR>");
	info.document.write("<font face=system color='#000000' size='+2'><center>0128 0630 59 0500000025</center></font><BR>");
	info.document.write("<font face=times color='#000070' size='1'><center>Copie y compruebe bien el numero antes de hacer la operación (tambien puede imprimir esta hoja <font color='#ff0000'>[pulse botón derecho sobre la ventana y luego imprimir]</font>, asi reducira a cero todas las posibilidades de error)</font></center>");
}

var matrix_window;
var direccion;
var messages = new Array("Bienvenido a exporfoto...", "La unica tienda de fotografía en internet con respuestas utiles a sus necesidades...", "Disfrute su estancia...");

function MatrixWrite(string, bold, italic, speed)
{
	//var matrix_window;
	var height = window.screen.height;
	var width = window.screen.width;
	//var dir=" ( "+window.location.host+" - "+navigator.appName+"-"+navigator.userAgent+" ) ";
	var win_dimensions = "height = " + eval(height + 10) + ", width = " + eval(width + 30);
	matrix_window = window.open("blank.htm", "matrix_window", win_dimensions);
	//direccion=new Location();
	matrix_window.document.open("text/html", "replace");
	var i;
	var timer = 0;
	if(matrix_window.moveTo)
		matrix_window.moveTo(-10, -30);
	if(matrix_window.resizeBy)
		matrix_window.resizeBy(0, 50);
	matrix_window.document.write("<body bgcolor=000000 text=00ff00 onBlur='self.focus()'>");
	matrix_window.document.write("<font face=system>");
	if(bold == true) matrix_window.document.write("<b>");
	if(italic == true) matrix_window.document.write("<i>");
	for(i = 0; i <= string.length; i++) {
		timer += (Math.random() * speed);
		setTimeout("matrix_window.document.write('" + string.charAt(i)+"');", timer);
	}
	timer += 2000;
	setTimeout("matrix_window.close()", timer);
}

function GetRndIndex()
{
	return (parseInt(Math.random() * messages.length));
}

function WriteRndMsg(bold, italic, speed)
{
	//printf("hola");
	MatrixWrite(messages[GetRndIndex()], bold, italic, speed);
}

function Mostrar()
{
	alert(document.overDiv.pasoopcion.text);
}

function Mensaje()
{
	alert("Escribeme a: geniodigital@hotmail.com");
}

function Cambiar(menu)
{
	var cadena="<FONT COLOR=#FFFFFF>";
	cadena=cadena+menu.options[menu.selectedIndex].value;
	cadena=cadena+"</FONT>";
	cadena=cadena+"<BR><BR>";
	cadena=cadena+"<IMG src=images/vacio.gif width=4 height=3>";
	//alert(cadena);
	MM_setTextOfLayer("masinfo",0,cadena);
}

function cambiarTitulo(cadena)
{
	window.status=cadena;
	return true;
};

function setPointer(theRow, theAction, theDefaultColor, thePointerColor, theMarkColor)
{
    var theCells = null;

    // 1. Pointer and mark feature are disabled or the browser can't get the
    //    row -> exits
    if ((thePointerColor == '' && theMarkColor == '')
        || typeof(theRow.style) == 'undefined') {
        return false;
    }

    // 2. Gets the current row and exits if the browser can't get it
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    // 3. Gets the current color...
    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    // 3.1 ... with DOM compatible browsers except Opera that does not return
    //         valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    }
    // 3.2 ... with other browsers
    else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    } // end 3

    // 4. Defines the new color
    // 4.1 Current color is the default one
    if (currentColor == ''
        || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
        if (theAction == 'over' && thePointerColor != '') {
            newColor = thePointerColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor = theMarkColor;
        }
    }
    // 4.1.2 Current color is the pointer one
    else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()) {
        if (theAction == 'out') {
            newColor = theDefaultColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor = theMarkColor;
        }
    }
    // 4.1.3 Current color is the marker one
    else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
        if (theAction == 'click') {
            newColor = (thePointerColor != '')
                     ? thePointerColor
                     : theDefaultColor;
        }
    } // end 4

    // 5. Sets the new color...
    if (newColor) {
        var c = null;
        // 5.1 ... with DOM compatible browsers except Opera
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
            } // end for
        }
        // 5.2 ... with other browsers
        else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
            }
        }
    } // end 5

    return true;
};

function abrirUrlInformacion(ventana)
{
	var info;
	var height = 200;
	var width = 400;
	var win_dimensions = "height = " + eval(height + 10) + ", width = " + eval(width + 30) + ",status = no, resizable = no";
	info = window.open(ventana, "Informacion", win_dimensions);
	info.moveTo(200,100);
}

function abrirUrlInformacion2(ventana)
{
	var info;
	var height = 700;
	var width = 600;
	var win_dimensions = "height = " + eval(height + 10) + ", width = " + eval(width + 30) + ",status = no, resizable = yes";
	ampliar = window.open(ventana, "Informacion", win_dimensions);
	ampliar.moveTo(50,50);
}

function Horas()
{
	var fecha = new Date();
	var anio = fecha.getYear();
	var mes = fecha.getMonth();
	var dia = fecha.getDay();
	var num = fecha.getDate();
	var hora=fecha.getHours();
	var minuto=fecha.getMinutes();
	var segundo=fecha.getSeconds();
	var cadena="<CENTER><A HREF='http://www.elmundo.es/especiales/2004/04/espana/bodareal/index.html' target=boda><FONT COLOR=#FFFFCC SIZE=5 FACE=TAHOMA><B>Boda Real</B></FONT></A><BR><BR>";
	var une="";
	var faltan=0;

	faltan=22-num;
	minuto=59-minuto;
	segundo=59-segundo;
	if(faltan>0)
	{
		hora=23-hora;
		hora=((faltan-1)*24)+hora+11;
	}
	else
		hora=10-hora;
	if(hora<0 || faltan<0 )
	{
		une=cadena;
		une=une+"<FONT COLOR=#CCFFCC SIZE=2 FACE=TAHOMA><B>Enhorabuena, Don Felipe y Doña Leticia</B></FONT></CENTER>";
	}
	else
	{
		une=cadena;
		une=une+"<FONT COLOR=#CCFFCC SIZE=2 FACE=TAHOMA><B>Faltan ";
		if(faltan>0)
		{	
			une=une+faltan;
			une=une+" días - ";
		}
		une=une+hora;
		une=une+":";
		if(minuto<10)
			une=une+"0";
		une=une+minuto;
		une=une+":";
		if(segundo<10)
			une=une+"0";
		une=une+segundo;
	
		une=une+"</FONT></CENTER>";
	}
	MM_setTextOfLayer("boda",0,une);
	setTimeout("Horas()",1000);
};
