
function itsExplorer(){
	var oBrowser = navigator.appName;
	if (oBrowser.indexOf("Microsoft") > 0){
		return true;
	}
	else{
		return false;
	}
}



function itsNetscape(){
	var oBrowser = navigator.appName;
	if (oBrowser.indexOf("Mozilla") >= 0 || oBrowser.indexOf("Netscape") >= 0 ){
		return true;
	}
	else{
		return false;
	}
}


function flashExists(){
	if (navigator.plugins["Shockwave Flash"]){
		return true;
	}
	else{
		return false;
	}
}



function flashVersion(){
	var myRegExp = /\d{1,}.\d{1,}/;
	var flashVersion = navigator.plugins["Flash"].description;
	flashVersion = parseFloat(flashVersion.match(myRegExp)[0]);
	return flashVersion;
}



function getConnectionSpeed(){

	var systemDate = new Date();
	systemDate.setSeconds(0);
	systemDate.setMilliseconds(0);
alert("ok1");
	img = new Image();
alert("image array created");
	img.src="/javacontent/images/97Kimage.gif";
alert("image loaded");
	var systemSeconds = systemDate.getSeconds();
	var systemMillis = systemDate.getMilliseconds();

	var filesize = 97000;//	NB filesize should correspond to the byte size of the image loaded
	var speed;

//	 convert speed into milliseconds
	if(systemSeconds=0){
		speed=systemMillis;
	}
	else{
		speed=(systemSeconds*1000) + systemMillis;
	}
	
	var connectionSpeed = (filesize/speed);
alert("speed= "+speed);
alert(connectionSpeed);
	return connectionSpeed;
}