

isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
NS4 = (document.layers) ? true : false;
IEmac = ((document.all)&&(isMac)) ? true : false;
IE4plus = (document.all) ? true : false;
IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
Moz = (window.sidebar||navigator.userAgent.indexOf('Gecko')!=-1)? true:false;
OPERA = (navigator.userAgent.indexOf("Opera")!=-1) ? true : false;

// document.all = IE + OPERA
// window.XMLHttpRequest = FF, Opera, Safari, IE7
// window.opera = Opera
IE7 = (document.all && !window.opera && window.XMLHttpRequest);

if (OPERA) {
   isMac  = false;
   NS6 = false;
   IE4plus = false;
   IE4 = false;
   IE5 = false;
   IE6 = false;
}


ver4 = (NS4 || IE4plus) ? true : false;
NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;

IE5plus = IE5 || IE6;
IEMajor = 0;

if (IE4plus)
{
	var start = navigator.appVersion.indexOf("MSIE");
	var end = navigator.appVersion.indexOf(".",start);
	IEMajor = parseInt(navigator.appVersion.substring(start+5,end));
	IE5plus = (IEMajor>=5) ? true : false;
}

if (IE7) {
	IE6 = true;
}