   function checkbrowsertype()
   {
	   var Sys = {};
        var ua = navigator.userAgent.toLowerCase();
        if (window.ActiveXObject)
            Sys.ie = ua.match(/msie ([\d.]+)/)[1]
        else if (document.getBoxObjectFor)
            Sys.firefox = ua.match(/firefox\/([\d.]+)/)[1]
        else if (window.MessageEvent && !document.getBoxObjectFor)
            Sys.chrome = ua.match(/chrome\/([\d.]+)/)[1]
        else if (window.opera)
            Sys.opera = ua.match(/opera.([\d.]+)/)[1]
        else if (window.openDatabase)
            Sys.safari = ua.match(/version\/([\d.]+)/)[1];
        

        if(Sys.ie) return 'ie';
        if(Sys.firefox) return 'firefox';
        if(Sys.chrome) return 'chrome';
        if(Sys.opera) return 'opera';
        if(Sys.safari) return 'safari';
		return false;
   }
