<!--

// This is a simplified version of the JavaScript Client Sniffer code 
// found at http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html


/* A version of stringToNumber that returns 0 if there is NaN returned, or number is part of a string, like 100px... */
function stringToNumber(s)
{
        return parseInt(('0' + s), 10)
}


function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    // --- BROWSER VERSION ---
    this.major = stringToNumber(navigator.appVersion)
    this.minor = parseFloat(navigator.appVersion)

    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1)))
    this.nav2 = (this.nav && (this.major == 2))
    this.nav3 = (this.nav && (this.major == 3))
    this.nav4 = (this.nav && (this.major == 4))
	
	//Netscape 6
	this.nav5 =	(this.nav && (this.major == 5))
	this.nav6 = (this.nav && (this.major == 5))
	this.gecko = (this.nav && (this.major >= 5))

    this.ie   = (agt.indexOf("msie") != -1)
    this.ie3  = (this.ie && (this.major == 2))
    this.ie4  = (this.ie && (this.major == 3))
    this.ie5  = (this.ie && (this.major == 4))


    this.opera = (agt.indexOf("opera") != -1)
     
    this.nav4up = this.nav && (this.major >= 4)
    this.ie4up  = this.ie  && (this.major >= 4)
}


var is = new Is();

  function display() { window.status ="www.museomca.com"; }

	  function agregar(){
		   if ((navigator.appName=="Microsoft Internet Explorer") && 
				 (parseInt(navigator.appVersion)>=4)) {
			  var url="http://www.museo-mca.com/"; 
			  var titulo="www.museo-mca.com";
			  window.external.AddFavorite(url,titulo);
		   } else { 
			  if(navigator.appName == "Netscape") 
				 alert("Presione Crtl+D para agregar este sitio en sus Bookmarks"); 
		   }
		} 
 
  //-->
<!--
       
		function MakeHomePage()
		{
				document.body.style.behavior='url(#default#homepage)';
				document.body.setHomePage('http://www.museomca.com/');
		}

	// ahora ningun enlace se ve
	// lo cambio por .l....
	
	document.onmouseover = function ( e ) {   
		window.status ="www.museo-mca.com";
		if ( !e ) e = window.event;   
		var el = e.target ? e.target : e.srcElement;   
		while ( el != null && el.tagName != "A" ) el = el.parentNode;   
		if ( el == null ) return;   
		if ( e.preventDefault ) e.preventDefault();   
		else e.returnValue = true;
		window.status ="www.museo-mca.com";
		};
				
		// ahora le pongo esto para mozilla
		var  defaultStatusText = "www.museo-mca.com",  mouseoverStatusText = "www.museo-mca.com";

window.onload = function()
{
  window.defaultStatus = defaultStatusText;
  if(is.nav5up) { // Go Go Mozilla!
    document.addEventListener("mouseover",myMouseOver,false);
  }
  else {
    if(is.nav4) {
      document.captureEvents(Event.MOUSEOVER);
    }
    document.onmouseover = myMouseOver;
  }
}

function myMouseOver(e)
{
  if(is.nav5up) { // Go Go Mozilla!
    if (e.target.parentNode.nodeName == "A") {
      window.status = "www.museo-mca.com";
      e.preventDefault();
    }  
  }
  else if (is.nav4) {
    if (e.target.href) {
      window.status = "www.museo-mca.com";
      return true;
    }  
  }  
  else if (is.ie4up) {
    if (window.event.srcElement.tagName == "A") {
      window.status ="www.museo-mca.com";
      return true;
    }
    else if (window.event.srcElement.parentElement.tagName == "A") {
      window.status ="www.museo-mca.com";
      return true;
    }
  }
}

document.unload = function()
{
  if(is.nav5up) { // Go Go Mozilla!
    document.removeEventListener("mouseover",myMouseOver,false);
  }
}



		// Form Field Validation Functions:
		//
		// isValidExpDate(formField,fieldLabel,required)
		//   -- checks for date in the format MM/YY or MM/YYYY against the current date
		// isValidCreditCardNumber(formField,ccType,fieldLabel,required)
		//   -- checks for valid credit card format using the Luhn check and known digits about various cards
		//		
		
		function allDigits(str)
		{
			return inValidCharSet(str,"0123456789 -");
		}
		
		function inValidCharSet(str,charset)
		{
			var result = true;
			
			for (var i=0;i<str.length;i++)
				if (charset.indexOf(str.substr(i,1))<0)
				{
					result = false;
					break;
				}
			
			return result;
		}
		
		function GetRadioValue(rArray)
		{
			for (var i=0;i<rArray.length;i++)
			{
				if (rArray[i].checked)
					return rArray[i].value;
			}
			
			return null;
		}
		
		
		function validateCCNum(cardType,cardNum)
		{
			var result = false;
			cardType = cardType.toUpperCase();
			
			var cardLen = cardNum.length;
			var firstdig = cardNum.substring(0,1);
			var seconddig = cardNum.substring(1,2);
			var first4digs = cardNum.substring(0,4);
		
			switch (cardType)
			{
				case "VISA":
					result = ((cardLen == 16) || (cardLen == 13)) && (firstdig == "4");
					break;
				case "AMEX":
					var validNums = "47";
					result = (cardLen == 15) && (firstdig == "3") && (validNums.indexOf(seconddig)>=0);
					break;
				case "MASTERCARD":
					var validNums = "12345";
					result = (cardLen == 16) && (firstdig == "5") && (validNums.indexOf(seconddig)>=0);
					break;
				case "DISCOVER":
					result = (cardLen == 16) && (first4digs == "6011");
					break;
				case "DINERS":
					var validNums = "068";
					result = (cardLen == 14) && (firstdig == "3") && (validNums.indexOf(seconddig)>=0);
					break;
			}
			return result;
		}
		
		function validCCForm(ccTypeField,ccNumField,ccExpField)
		{
			var result = isValidCreditCardNumber(ccNumField,ccTypeField.value,"Credit Card Number",true) &&
				isValidExpDate(ccExpField,"Expiration Date",true);
			return result;
		}

//-->