  var ErrorTrappingOn = true; // Set to true or false. If false then error reporting is turned on.

  function errorHandler(errorMessage, url, lineNumber) {

    // All JavaScript errors are trapped. If ErrorTrappingOn is false then an alert box with the error
    // details is also displayed. This code is supported under Netscape 3+ and IE4+ and later.
    if (ErrorTrappingOn == false)
      {
       errormsg  = "This page contains a scripting error.\r\n\r\n";
       errormsg += "Line: "  + lineNumber   + "\r\n";
       errormsg += "Error: " + errorMessage + "\r\n";
       errormsg += "URL: "   + url;
       alert(errormsg);
      };
    event.returnValue = true;
    return true;
  };
  window.onerror = errorHandler;


// Version Check
Version4Plus = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))); 


// Apply Filter
function PhotoImgTransition(newimage) {
     if (Version4Plus) 
     	  { 
          document.images.photo.filters.blendTrans.Apply(); 
       };
     
       document.images.photo.src = newimage;
     
     if (Version4Plus) 
       { 
          document.images.photo.filters.blendTrans.Play(); 
       };
};

  if (navigator.userAgent)
    {
      if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
        {
          document.write('<meta name=\"viewport\" content=\"width=800\" \/>');
          document.write('<style type=\"text\/css\">body { -webkit-text-size-adjust: none; }<\/style>');
          window.onload = function() {
            if ((window.orientation == 90) || (window.orientation == -90))
              {
                setTimeout(function(){window.scrollTo(0, 1);}, 100);
              };
          };
        };
    };
