function check() {
var flashinstalled = 0;
var flashversion = 0;

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;
}
if(flashinstalled==1){
//alert('not installed');
	document.getElementById('commu1').style.display='';
}	
else{
		var so = new SWFObject("../flash/commsec.swf", "sotester", "216", "225", "8", "#ffffff");
		so.addParam("quality", "high");
		so.addParam("wmode", "transparent");
		so.write("commu");
}	
}

function checkImage(imageDiv,flashDiv,flashPath,fHeight,fWidth,n,bgColor){
var flashinstalled = 0;
var flashversion = 0;

	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;
	}
	if(flashinstalled==1){
		document.getElementById(imageDiv).style.display='';
	}	
	else{
			var so = new SWFObject(flashPath, "sotester", fHeight, fWidth, n, bgColor);
//			var so = new SWFObject("../flash/commu.swf", "sotester", "216", "225", "8", "#ffffff");
			so.addParam("quality", "high");
			so.addParam("wmode", "transparent");
			so.write(flashDiv);
	}	
}
