<!--                    
     var ag = navigator.userAgent;
                                   
     function is_ie()
     {
          if (ag.indexOf("IE")!=-1)
          {
               return true;                         
          }                
          else
          {         
               return false;                         
          }                         
     }                    
     
     function is_running_dotnet_in_ie()
     {
          if (ag.indexOf("NET CLR") != -1)
          {
               return true;
          }
          else
          {
               return false;                         
          }                         
     }
     
     function is_running_dotnet3_in_ie()
     {
	   
		var dotNETRuntimeVersion = "3.0.30729";
	 
          if(HasRuntimeVersion(dotNETRuntimeVersion))
          {
               return true;
          }
          else
          {
               return false;                         
          }       
     }
	 
	 // 
    // Retrieve the version from the user agent string and  
    // compare with the specified version. 
    // 
    function HasRuntimeVersion(versionToCheck) 
    { 
      var userAgentString =  
        navigator.userAgent.match(/.NET CLR [0-9.]+/g); 
 
      if (userAgentString != null) 
      { 
        var i; 
 
        for (i = 0; i < userAgentString.length; ++i) 
        { 
          if (CompareVersions(GetVersion(versionToCheck),  
            GetVersion(userAgentString[i])) <= 0) 
            return true; 
        } 
      } 
 
      return false; 
    } 
 
    // 
    // Extract the numeric part of the version string. 
    // 
    function GetVersion(versionString) 
    { 
      var numericString =  
        versionString.match(/([0-9]+)\.([0-9]+)\.([0-9]+)/i); 
      return numericString.slice(1); 
    } 
 
    // 
    // Compare the 2 version strings by converting them to numeric format. 
    // 
    function CompareVersions(version1, version2) 
    { 
      for (i = 0; i < version1.length; ++i) 
      { 
        var number1 = new Number(version1[i]); 
        var number2 = new Number(version2[i]); 
 
        if (number1 < number2) 
          return -1; 
 
        if (number1 > number2) 
          return 1; 
      } 
 
      return 0; 
    } 

	
	
                         
     function xbap_compat()
     {                                                                                
          if (!is_ie())
          {
               document.writeln("<font color=\"#FF0000\" size=\"+1\"><br/><br/><br/><center><b>It has been detected that you are not currently using Internet Explorer as your browser to view this site.</b></font><br/>");
               document.writeln("<br/>To run XBAP applications you must <ul> <li> be running  <b>Microsoft Internet Explorer version 6 or higher</b>,</li><li> on the <b>Windows</b> platform, and </li><li>with <b>Version 3.0 of the.NET Framework</b> installed.</li></ul>");  
               document.writeln("<br/>These are inherent limitations of XBAP technology. If you are not on the Windows platform, there is currently no solution for you. <br/>");   
               document.writeln("On the other hand, if you are using Windows, just switch browsers to IE 6 or IE 7 when viewing this portion of TravelsWithCal. <br/>");   
               document.writeln("<br/>The remainder of <a href=\"http://www.travelswithcal.com/\">TravelsWithCal</a> does not use XBAP technology and can be viewed with any browser on any platform. </center>");                                                                                                
               return false;
          }
          else if (!is_running_dotnet3_in_ie())                                                                    
          {
               document.writeln("<center><font color=\"#FF0000\" size=\"+1\"><br/><br/><br/><b>It has been detected that you do not currently have the .NET Framework 3.0 SP1 (or higher) installed.</b></font>");
               document.writeln("<br/><br/>This is an inherent requirement of XBAP technology. To download and install the the <b>.NET Framework 3.0 SP1</b> simply select the appropriate version from the following links:<br/>");
               document.writeln("<a href=\"http://www.microsoft.com/downloads/details.aspx?FamilyID=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en\">.NET Framework 3.0 SP1</a><br/>");                     
               return false;
          }
          else
          {                         
               return true;
          }                         
     }
//-->
