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;

// Dynamically make some specific changes that are unique to the iPhone and iPod Touch.
// Additional iPhone values or modifications are assigned in the altbrowser code.
if (navigator.userAgent)
{
  if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
	{
	  document.write('<meta name=\"viewport\" content=\"width=800,minimum-scale=0.4,maximum-scale=1.25\">');
	  window.onload = function() {
		if ((window.orientation == 90) || (window.orientation == -90))
		  {
			setTimeout(function(){window.scrollTo(0, 1);}, 100);
		  };
	  };
	};
};