writeSWFTag();

function writeSWFTag(){

	var d = document;
	var scripts;
	var width, height;
	width = 1;
	height = 1;
	if( d.getElementsByTagName ) scripts = d.getElementsByTagName( "script" );
	else if( d.scripts ) scripts = d.scripts;
	else if( d.all && d.all.tags ) scripts = d.all.tags( "script" );
	if( scripts ){
		var script = scripts[ scripts.length - 1 ];
		var src = script.src;
		var query = new Object();
		var pear, pears;
		if( src && src.indexOf( "?" ) != -1 ){
			src = src.substring( src.indexOf( "?" ) + 1 );
			pears = src.split( "&" );
			for( var i = 0; i < pears.length; i ++ ){
				pear = pears[ i ].split( "=" );
				query[ pear[ 0 ]] = pear[ 1 ];
			}
		}
		if( query[ "width" ] ) width = query[ "width" ];
		if( query[ "height" ] ) height = query[ "height" ];
	}
//
	var swf_url	= 'http://www.ragnarokonline.jp/news/event/cp_moscovia/banner/bnr_'+ width +'_'+ height +'.swf';

	var html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="bnr_moscovia" align="middle">';
	html += '<param name="allowScriptAccess" value="always" />';
	html += '<param name="movie" value="' + swf_url + '" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="wmode" value="transparent" /><embed src="' + swf_url + '" quality="high" bgcolor="#ffffff" wmode="transparent" width="' + width + '" height="' + height + '" name="bnr_moscovia" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	html += '</object>';
	document.write(html);

}