﻿/*'----------------------------------------------------
'Copyright © 2011, Southern Cross Ceramics
'All rights reserved.
'http://www.scceramics.com

'Redistribution and use in source and binary forms, 
'with or without modification, are not permitted
'----------------------------------------------------*/

//JavaScript Document

function detectOutdatedBrowser() {

	if (navigator.appName == "Microsoft Internet Explorer") {
	
        var isIE7Min = getIEVersionNumber() >= 7;
        
        if (isIE7Min == false) { //If the browser is older than 6.0
           alert("Your browser is no longer supported on this web site. The page may not be displayed correctly.\nPlease upgrade to an Internet Explorer 7.0 or later.");
        }
	}
}// detectBrowser

function getIEVersionNumber() {
    //get IE browser version
    var ua = navigator.userAgent;
    var MSIEOffset = ua.indexOf("MSIE ");
    
    if (MSIEOffset == -1) {
        return 0;
    } else {
        return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
    }
}// getIEVersionNumber
