var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function createMain(swfLocation,widthSent,heightSent) {
	if (!widthSent) {
		widthSent="100%";
	}
	if (!heightSent) {
		heightSent="100%";
	}
	if (isIE && isWin && !isOpera) {
		codeStr='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '+
		'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" '+
		'width="'+widthSent+'" height="'+heightSent+'" align="middle">'+
		'<param name="movie" value="'+swfLocation+'" />'+
		'<param name="quality" value="best" />'+
		'<param name="play" value="true" />'+
		'<param name="loop" value="true" />'+
		'<param name="scale" value="noscale" />'+
		'<param name="wmode" value="window" />'+
		'<param name="devicefont" value="false" />'+
		'<param name="bgcolor" value="#ffffff" />'+
		'<param name="menu" value="false" />'+
		'<param name="allowFullScreen" value="true" />'+
		'<param name="type" value="application/x-shockwave-flash" />'+
		'<param name="allowScriptAccess" value="sameDomain" />'+
		'</object>';
	}
	else {
		codeStr='<embed src="'+swfLocation+'" quality="best" scale="noscale" '+
		'devicefont="false" bgcolor="#ffffff" width="'+widthSent+'" height="'+heightSent+'" '+
		'menu="false" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" '+
		'wmode="window" play="true" loop="true" type="application/x-shockwave-flash" '+
		'pluginspage="http://www.macromedia.com/go/getflashplayer" /></embed>';	
	}
	document.write(codeStr);
}

