<!--
/*

 -------------------------------------------------------------------------------
|  Copyright (C) 2004 Azalea Technology. All rights reserved.                   |
|-------------------------------------------------------------------------------|
|  Unauthorized removal of this notice is considered a violation of the         |
|  license agreement under which this Code may be used. This work is protected  |
|  under United States copyright law and the similar law(s) of other countries  |
|  under which such as work is afforded legal protection, and upon conviction   |
|  of such a violation in a court of applicable jurisdiction, such person(s)    |
|  may be subject to the maximum allowable penalty as permitted under such law. |
|-------------------------------------------------------------------------------|
|  You acknowledge and agree that information presented to you through this     |
|  site (the "Web Site") is protected by all applicable copyrights, trademarks, |
|  service marks, patents or other proprietary rights and laws, and by virtue   |
|  of accessing the Web Site, except as expressly authorized by the Azalea      |
|  Technology, LLC., you agree not to modify, rent, lease, loan, sell,          |
|  distribute, store, or create derivative works based on the Web Site, in      |
|  whole or in part.                                                            |
 -------------------------------------------------------------------------------

 Organization: Physicians Contracting Organization of Texas
       Domain: www.pcot.org
      Purpose: Browser functions
	     Date: Tuesday, November 2, 2004 11:05 PM CST
   Programmer: Benjamin Roberts (broberts@azaleatech.com)
               Azalea Technology, LLC.
               P.O. Box 131150
			   Tyler, TX 75713-1150
*/

var ua = new String(navigator.userAgent);
var browser = new Object();
browser.version    = parseFloat(navigator.appVersion);
browser.isNetscape = false;
browser.isMozillaBased = false;
browser.isExplorer = false;
browser.isOpera    = false;
browser.isFirebird = false;
browser.isFirefox  = false;
browser.isMozilla  = false;
browser.isUnknown  = false;
browser.OperaVersion = -1;

if(ua.match(/Mozilla/g)) browser.isMozillaBased = true;

if(ua.match(/MSIE/g)) browser.isExplorer = true;
else if(ua.match(/Netscape/g)) browser.isNetscape = true;
else if(ua.match(/Firebird/g)) browser.isFirebird = true;
else if(ua.match(/Firefox/g)) browser.isFirefox = true;
else if(ua.match(/Opera/g)) browser.isOpera = true;
else if(ua.match(/Mozilla/g)) browser.isMozilla = true;
else browser.isUnknown = true;

if(browser.isOpera){
	if(ua.match(/Opera 7/g)) browser.OperaVersion = 7;
	else if(ua.match(/Opera 6/g)) browser.OperaVersion = 6;
	else if(ua.match(/Opera 5/g)) browser.OperaVersion = 5;
	else if(ua.match(/Opera 4/g)) browser.OperaVersion = 4;
	else browser.OperaVersion = 0;
}

function getRealBrowserAppName(){
	var strName = "unknown";
	if(browser.isExplorer) strName = "Microsoft Internet Explorer";
	else if(browser.isNetscape) strName = "Netscape";
	else if(browser.isFirebird) strName = "Mozilla Firebird";
	else if(browser.isFirefox) strName = "Mozilla Firefox";
	else if(browser.isOpera) strName = "Opera";
	else if(browser.isMozilla) strName = "Mozilla";
	
	//if(navigator.appName.toLowerCase() != strName.toLowerCase()) strName += "#"+navigator.appName;
	return strName;	
}

// GET BROWSER INFORMATION
function getBrowserInfo(){
	var str = "";
	str += "Computer Information<p>"+str+"\n";
	str += "                    Description = " + writeLongStringOnMultipleLines(navigator.userAgent,50,34) + "<br>\n";
	str += "------------------------------------------------------------------------------------<br>\n";
	str += "                    Code Engine = " + navigator.appCodeName + "<br>\n";
	str += "            Code Engine Version = " + browser.version + "<br>\n";
	str += "               Application Name = " + writeLongStringOnMultipleLines(getRealBrowserAppName(),50,34) + "<br>\n";
	str += "                       Platform = " + navigator.platform + "<br>\n";
	str += "             Resolution Setting = " + screen.width + " x " + screen.height + "<br>\n";
	str += "                  Mozilla-based = " + (browser.isMozillaBased ? "Yes" : "No") + "<br>\n";

	return str;
}
	
//-->
