// $Id: f.js,v 1.3 2003/04/04 17:07:55 glen Exp $
// flash detection routines

var flashy = 0; // 0 = not detected, other = flash version detected
MSDetect = "false";

function flash_versionextract(p) {
	var d = p.description;
	var v = parseInt(d.substring(d.indexOf(".") - 1));

	return (v ? v : 0);
}
if (navigator.plugins && navigator.plugins.length) {
	p = navigator.plugins['Shockwave Flash'];
	if (p) {
		flashy = flash_versionextract(p);
	}
} else if (navigator.mimeTypes && navigator.mimeTypes.length) {
	m = navigator.mimeTypes['application/x-shockwave-flash'];
	if (m && m.enabledPlugin) {
		flashy = flash_versionextract(m.enabledPlugin);
	}
} else {
	MSDetect = "true";
}

// create html code with flash
function flashs(url, width, height) {
	var s = '';
	s += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" width=' + width + ' height=' + height + '>';
	s += '<param name=movie value="' + url + '">';
	s += '<param name=menu value=false><param name=quality value=high>';
	s += '<embed src="' + url + '" menu=false quality=high width=' + width + ' height=' + height + ' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
	s += '</object>';
	return s;
}

