//document.writeln(navigator.appVersion + "<br>" + navigator.userAgent);

/////////////////////
// Browser Detection
/////////////////////
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);

var is_ns  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1));

// for netscape 6 up
var is_gecko = (agt.indexOf('gecko') != -1);

var is_ie   = (agt.indexOf("msie") != -1);

/////////////////////
// Platform Detection
/////////////////////
var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
var is_win16 = ((agt.indexOf("win16")!=-1) || (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("windows 16-bit")!=-1) );
var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) || (agt.indexOf("windows 16-bit")!=-1));

var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
var is_win32 = (is_win95 || is_winnt || is_win98 || ((is_major >= 4) && (navigator.platform == "Win32")) || (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));

var is_mac = (agt.indexOf("mac")!=-1);

/////////////////////
// FLASH DETECTION 
/////////////////////
var is_flash5 = false;
// this is for the netscape like browsers....
if (navigator.plugins["Shockwave Flash"]) {
	var plugin_description = navigator.plugins["Shockwave Flash"].description.split(" ");

	for (var i = 0; i < plugin_description.length; ++i) {
		if (!isNaN(parseInt(plugin_description[i])))
		is_flash5 = (plugin_description[i] >= 5);
	}
}

// for i.e:
if (is_ie && is_win32) { // Check IE on windows for flash 3, 4 AND 5 using VB Script
	document.write('<SCRIPT LANGUAGE="VBScript"\>\n');
	document.write('on error resume next\n');
	document.write('is_flash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('<'+'/SCRIPT> \n');
}

///////////////////////////////
// Cookies Enabled Detection
///////////////////////////////
function testCookies(){
	// Check if user's browser can handle cookies.
	var oneDay= 1*24*60*60*1000;
	var expDate = new Date();
	expDate.setTime (expDate.getTime() + oneDay);
	var cookieExpires = expDate.toGMTString();
	//set your temprorary cookie
	document.cookie="verifyCookie=test; expires="+cookieExpires;
	//check to see if ANY cookies exist, including the one you just set
	var len = document.cookie.length;
	// Kill cookie.
	document.cookie="verifyCookie=CLEAR; expires=Sun, 09-Nov-97 01:00:00 GMT";
	if (len>0) return true;
	return false;	
}

var cookiesEnabled = testCookies();