function ControlVersion(){
	var version;
	var axo;
	var e;
	try {
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version){
		try {

			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			version = "WIN 6,0,21,0";	
			axo.AllowScriptAccess = "always";
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}
	if (!version){
		try {
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version) {
		try {
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}
	if (!version) {
		try {
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	return version;
}

function ziplineFlash(id,file,width,height){
	var flashinstalled = 0;
	var windows = ControlVersion();
	var flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width +'" height="' + height +'"><param name="wmode" value="transparent" /><param name="movie" value="' + file +'" /><param name="quality" value="high" /><embed src="' + file +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="' + width +'" height="' + height +'"></embed></object>';
	
	if(navigator.plugins && navigator.plugins.length){
		x = navigator.plugins["Shockwave Flash"];
		if(x){
			flashinstalled = 2;
		}else{
			flashinstalled = 1;
			if(navigator.plugins["Shockwave Flash 2.0"]){
				flashinstalled = 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 {
		if(windows != '-1') {
			flashinstalled = 2;	
		} else {
			flashinstalled = 1;
		}
	}

	if(flashinstalled == 2){
		document.getElementById(id).innerHTML = flash;
	}
}

