/*'**************************************************************************'
' COPYRIGHT                                                                '
' UNITED BUILDING CENTERS                                                  '
' 125 WEST FIFTH STREET                                                    '
' WINONA, MN 55987-9985                                                    '
'**************************************************************************'
' PURPOSE: Check browser running website. Used for dynamic menu system for '
'          the NewBC website.                                              '
'**************************************************************************'
' VERSION 01: KLR - 03-10-06 - Initial Build                               '
' VERSION 01: KLR - 06-23-06 - RFS 2006-135                                '
'                              Added this Versioning Documentation.        '
'**************************************************************************'*/

//4-26-2006. Kate Rihn. This script is to check the browser. It adjusts the height in the #layer1 class (used in the <div> for the menu), to fix
//Netscape & Firefox (Mozilla) bug. The bug is a problem with "click through" of links falling under a <div> tag. The
//links appear, but do not work if they fall under the <div> tag on a page. This is not a problem in IE.
var agt = navigator.userAgent.toLowerCase();
var isMac = (agt.indexOf('mac') != -1);
var isOpera = (agt.indexOf("opera") != -1);
var IEver = parseInt(agt.substring(agt.indexOf('msie ') + 5));
var isIE = ((agt.indexOf('msie')!=-1 && !isOpera && (agt.indexOf('webtv')==-1)) && !isMac);
var isIE25win = (isIE && IEver == 5);
var isIE25mac = ((agt.indexOf("msie") != -1) && isMac);
ChangeRule();

function ChangeRule(){
	if (isIE){
		layer1.style.height="100%";
	}else{
		layer1.style.height="10%";
	}
}
 
