
var dom, ie, ie4, ie5x, moz, mac, win, lin, ie5mac, ie5xwin, op;

win = ( navigator.appVersion.indexOf( 'Win' ) != -1 );
mac = ( navigator.appVersion.indexOf( 'Mac' ) != -1 );
lin = ( navigator.userAgent.indexOf( 'Linux' ) != -1 );

if ( !document.layers ){
	dom = ( document.getElementById );
	op = ( navigator.userAgent.indexOf( 'Opera' ) != -1 );
	konq = ( navigator.userAgent.indexOf( 'Konqueror' ) != -1 );
	saf = ( navigator.userAgent.indexOf( 'Safari' ) != -1 );
	moz = ( navigator.userAgent.indexOf( 'Gecko' ) != -1 && !saf && !konq);
	ie = ( document.all && !op );
	ie6 = ( navigator.userAgent.indexOf( 'MSIE 6' ) != -1 );
 	ie7 = ( navigator.userAgent.indexOf( 'MSIE 7' ) != -1 );

	ie4 = ( ie && !dom );
	
	/*
	ie5x tests only for functionality. ( dom||ie5x ) would be default settings.
	Opera will register true in this test if set to identify as IE 5
	*/

	ie5x = ( document.all && dom );
	ie5mac = ( mac && ie5x );
	ie5xwin = ( win && ie5x );
}
  

