function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
  offset = document.cookie.indexOf(search);
  if (offset != -1) {  // if cookie exists
    offset += search.length;
    end = document.cookie.indexOf(";", offset); // set index of beginning of value
    if (end == -1) end = document.cookie.length;  // set index of end of cookie value
    returnvalue=unescape(document.cookie.substring(offset, end));
    }
   }
  return returnvalue;
}

if (get_cookie("browserOK")=="")  // don't have cookie
	{
	ua = navigator.userAgent;
	ver = parseInt(navigator.appVersion);
	
	isNN4 = ((navigator.appName == "Netscape") 
		&& (parseInt(navigator.appVersion) == 4)) ? 1 : 0;
	isIE4 = ((navigator.appName.indexOf("Internet Explorer") >= 0)
		&& (parseInt(navigator.appVersion) == 4)
		&& !(ua.indexOf("Mac") >= 0)) ? 1 : 0;
	isIE5or6 = ((ua.indexOf("MSIE 5") >= 0)
		|| (ua.indexOf("MSIE 6") >= 0)) ? 1 : 0;
	isIE5Win = ((navigator.appName.indexOf("Internet Explorer") >= 0 )
		&& ver >= 5) ? 1 : 0;
	isMoz = ((ua.indexOf("Gecko") >= 0) 
		|| ((ua.indexOf("Mozilla") >= 0) && (ver > 4))) ? 1 : 0;
	isNN6 = (ua.indexOf("Netscape6") >= 0 ) ? 1 : 0;
	isOp = (ua.indexOf("Opera") >= 0 ) ? 1 : 0;
	isIE5Mac = ((ua.indexOf("MSIE 5") >= 0)
	  && (ua.indexOf("Mac") >= 0)) ? 1 : 0;
	isW3C = (isIE5Mac || isNN6 || isIE5Win || isMoz || (isOp && (ver > 4)));
	isMac = ua.indexOf("Mac") >= 0;
	isiCab = ua.indexOf("iCab") >= 0;
	
	if (ua.indexOf("AOL") >= 0) {
	  if (ua.indexOf("Windows") >= 0) {
		if ((ua.indexOf("AOL 6") == -1 && ua.indexOf("AOL 7") == -1 && ua.indexOf("AOL 8") == -1 && ua.indexOf("AOL 9") == -1) || ua.indexOf("x.x") >= 0)
		  document.location = "http://http://www.sentrydoor.com/index.htm";
		}
	  if (ua.indexOf("Macintosh") >= 0) {
		if (ua.indexOf("AOL/7") == -1)
			document.location = "http://http://www.sentrydoor.com/index.htm";
		}
	  }
	
	if (ua.indexOf("MSIE 5") >= 0 && ua.indexOf("Windows") >= 0) {
	  MSIEVer = ua;
	  MSIEVer = ua.substr(ua.indexOf("MSIE ")+("MSIE ").length, 4);
	  MSIEVer = parseFloat(MSIEVer);
	  if (MSIEVer < 5.5)
		document.location = "http://http://www.sentrydoor.com/index.htm";
	  }
	  
	if (isiCab)
	  document.location = "http://http://www.sentrydoor.com/index.htm";
	  
	if (isOp) {
	  OpVer = ua.match(/Opera[ \/][0-9]+\.?[0-9]*/);
	  OpVer = OpVer[0].replace(/Opera[ \/]?/,"");
	  OpVer = parseFloat(OpVer);
	  if (OpVer < 7.0)
		document.location = "http://http://www.sentrydoor.com/index.htm";
	  }
	
	if (isMac) {
	  if (isIE5Mac || !isMoz) {
	  	if (isOp != 1) {
		  document.location = "http://http://www.sentrydoor.com/index.htm";
		  }
		}
	  }
	if ((isNN4 || isIE4) && !isIE5or6)
	  document.location = "http://http://www.sentrydoor.com/index.htm";

	document.cookie="browserOK=1; path=/";  // set the cookie to avoid check next time
	}

