/**
 * ie6-support contains functions that support to run well with IE6 		
 *
 */
 
//redirecting to a url. to replacce the old way that doesn't work with ie6
function redirecting(sUrl){
	setTimeout(function(){window.location.href = sUrl;}, 0);
}


function getInternetExplorerVersion() {
		    var rv = -1; // Return value assumes failure.
		    if (navigator.appName == 'Microsoft Internet Explorer') {
		        var ua = navigator.userAgent;
		        var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
		        if (re.exec(ua) != null)
		            rv = parseFloat(RegExp.$1);
		    }
		    return rv;
}

//check if browser is IE8
function fIsIE8() {
 
    var ver = getInternetExplorerVersion();
    if (ver > -1) {
        if (ver >= 8.0)
     		return true;
        else
            return false;
    }		    
}

//check if browser is IE7
function fIsIE7() {
 
    var ver = getInternetExplorerVersion();
    if (ver > -1) {
        if (ver >= 7.0 && ver <8.0)
     		return true;
        else
            return false;
    }		    
}

//check if browser is IE6
function fIsIE6() {
 
    var ver = getInternetExplorerVersion();
    if (ver > -1) {
        if (ver >= 6.0 && ver <7.0)
     		return true;
        else
            return false;
    }		    
}

function fIsChrome(){
	return navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
}

function fIsSafari(){
	return navigator.userAgent.toLowerCase().indexOf('safari') > -1;
}
