﻿function dispswf(f,w,h,r) {
	var U = 'http://movies.coopnet.or.jp/bin/jflvplay.swf' ;
	var W = (r && r < 2) ? w*r : '100%' ;
	var H = (r && r < 2) ? h*r+71 : '100%' ;
	var html = '' ;
	if( navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length ) {
		html += "<embed src='" + U + "' FlashVars='flv=" + f + "&w=" + w + "&h=" + h + "&r=" + r ;
		html += "' type='application/x-shockwave-flash' width='" + W + "' height='" + H ;
		html += "' quality='high' menu='false' allowScriptAccess='always' base='.'></embed>" ;
	} else {
		html += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' " ;
		html += "codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/" ;
		html += "swflash.cab#version=8,0,24,0' width='" + W + "' height='" + H + "'>" ;
		html += "<param name='movie' value='" + U + "?" + rnd(4) ;
		html += "'><param name='FlashVars' value='flv=" + f + "&w=" + w + "&h=" + h + "&r=" + r ;
		html += "'><param name='allowScriptAccess' value='always'><param name='base' value='.'>" ;
		html += "<param name='quality' value='high'><param name='menu' value='false'></object>" ;
	}
	document.write(html) ;
}
function rnd(n) {
	var obj = new Date() ;
	var val = '' ;
	for( i=0 ; i<n ; i++ ) val += Math.floor( Math.random() * 10 ) ;
	return(obj.getTime() + '.' + val) ;
}
