﻿//=============================================================================	
//<summary>Get's Information On OS And Browser...</summary>
//<howToUse>if(!BrowserDetector.isIE()) {...}</howToUse>
//<returns>True/False</returns>
//=============================================================================	
if(typeof(BrowserDetector) == "undefined") 
{ 
    BrowserDetector = {}; 
}
//=============================================================================
BrowserDetector = 
{
    getAgent : function() 
    {
	     return navigator.userAgent.toLowerCase();
    },
    //=========================================================================
    //                               OS platform
    //=========================================================================
    isMac : function() 
    {
         return (this.getAgent().match(/mac/i) != null);
    },	
    isWin : function() 
    {
	    return (this.getAgent().match(/win/i) != null);
    },	
    isWin2k : function() 
    {
	    return (this.isWin() && (this.getAgent().match(/nt\s*5/i)) != null);
    },	
    isWinVista : function() 
    {
	    return (this.isWin() && (this.getAgent().match(/nt\s*6/i)) != null);
    },	
    //=========================================================================
    //                                  Browser
    //=========================================================================
    isOpera : function() 
    {
	    return (this.getAgent().match(/opera/i) != null);
    },	
    isIE : function() 
    {
	    return (this.getAgent().match(/msie/i) != null);
    },
    isFirefox : function() 
    {
	    return (this.getAgent().match(/firefox/i) != null);
    },
    isChrome : function() 
    {
	    return (this.getAgent().match(/chrome/i) != null);
    }
};
//=============================================================================