if (document.documentElement) {
	if (!document.documentElement.className || document.documentElement.className.indexOf('havejs')<0) 
		document.documentElement.className+=' havejs';
}

var flash_possible=true;
var misio=false;
function kmisio()
{
	var a=navigator.appVersion;
	var b=a.match(/MSIE[^0-9]*([0-9.]+)/);
	if (b.length<2) return 0;
	if (b[1]>=6) return 1;
	return 0;
}

/*@cc_on @*/
/*@if (@_jscript_version >= 5)
	misio=true;
	flash_possible=false;
	if (kmisio()) {
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
		document.write('flash_possible = false \n');
		document.write('on error resume next \n');
		document.write('flash_possible = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))\n');
		document.write('</SCR' + 'IPT\> \n');
	}
@end @*/


function insert_flash(objid,src,w,h)
{
	function apar(name,value)
	{
		var param=document.createElement('param');
		param.setAttribute('name',name);
		param.setAttribute('value',value);
		object.appendChild(param);
	}
	
	function visualise_inner(el)
	{
		if (el.className && el.className.indexOf('innerflash')>=0) el.className=el.className.replace(/innerflash/g,'');
		for (el=el.firstChild;el;el=el.nextSibling) visualise_inner(el);
	}
	
	if (!document.getElementById || !document.createElement) return;
	var div=document.getElementById(objid);
	if (!div) return;
	if (!flash_possible) {
		visualise_inner(div);
		return;
	}
	var object=document.createElement('object');
	var el;
	var post=!misio && (!window.netscape || window.opera);
	
	
	if (!misio) while(div.firstChild) object.appendChild(div.firstChild);
	else while (div.firstChild) div.removeChild(div.firstChild);
	if (!post) div.appendChild(object);
	object.width = w;
	object.height = h;
	if (misio) {
		object.classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; 
		object.movie = src;
	}
	else {
		object.type="application/x-shockwave-flash";
		object.data=src;
	}
	var i;
	for (i=4;i<arguments.length-1;i+=2) apar(arguments[i],arguments[i+1]);
	if (post) div.appendChild(object);
	
}
