var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;


if (checkIt('konqueror'))
{
	browser = "Konqueror";
OS = "Linux";
}
else if (checkIt('safari')) 
browser = "Safari"
else if (checkIt('omniweb')) 
browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}



var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		flashinstalled = 2;
		if (x.description)
		{
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
		}
	}
	else
		flashinstalled = 1;
	if (navigator.plugins["Shockwave Flash 2.0"])
	{
		flashinstalled = 2;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 2;
	else
		flashinstalled = 1;
}
else
{
	MSDetect = "true";
}



function ws_logon(t) 
{	

        	send_form.var_browser_type.value = browser;
	send_form.var_browser_version.value =  version;
	send_form.var_OS_type.value = OS;
	send_form.var_flash_installed.value =  flashinstalled;
	send_form.var_flash_version.value =  flashversion;
	send_form.var_screen_width.value =  screen.width;
	send_form.var_screen_height.value =  screen.height;
	send_form.var_java_installed.value =  navigator.javaEnabled();
	send_form.var_platform.value = navigator.platform;
	send_form.var_useragent.value = navigator.userAgent;
	send_form.var_appName.value = navigator.appName;
	send_form.var_appVersion.value = navigator.appVersion;	
 	send_form.idiomas.value = 2;
	send_form.embeded.value = 1;
	//window.open( "", t,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=800,height=600,screenX=0,screenY=0");
	send_form.submit();  

	}
