var siteUrl = 'http://www.calorio.jp/';
var swfUrl = siteUrl + 'swf/parts.swf';
var imageUrl = siteUrl + 'images/parts/';
var mypageUrl = siteUrl + 'f_c_a/me_';


function getFlashVer() {
	var v = 0;
	if (navigator.plugins && navigator.mimeTypes.length) {
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			var a = x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".");
			if (a && a.length > 0) {
				v = a[0];
			}
		}
	} else {
		try{
			var ax = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			for (var i = 3; ax != null; i++) {
				ax = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
				v = i;
			}
		}catch(e){}
		try{
			var a = ax.GetVariable("$version").split(" ")[1].split(",");
			if (a && a.length > 0) {
				v = a[0];
			}
		}catch(e){}
	}
	return v;
}

var flashVars;
var calorioId;
var userId;
if( calorioId == undefined ){
	calorioId = userId;
	flashVars = '&me=' + userId;
}else{
	flashVars = '&me=' + calorioId;
}

document.open();

if (getFlashVer() < 7) {
	document.write('<a href="http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash&Lang=Japanese" target="_blank">');
	document.write('Flash Player DL hear');
	document.write('</a>');
}else{
	/*
	document.write('<object classid="clssid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="541" height="291" id="orbisu_graph">');
	document.write('<param name="movie" value="' + swfUrl + '">');
	document.write('<param name="flashvars" value="' + flashVars + '">');
	document.write('<param name="wmode"value="transparent">');
	document.write('<param name="scale" value="noscale">');
	document.write('<embed src="' + swfUrl + '" flashvars="' + flashVars + '" scale="noscale" width="541" height="291" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent">');
	document.write('</embed>');
	document.write('</object>');
	*/

	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="173" height="195" id="orbisu_graph">');
	document.write('<param name="movie" value="' + swfUrl + '">');
	document.write('<param name="flashvars" value="' + flashVars + '">');
	document.write('<param name="wmode"value="transparent">');
	document.write('<param name="scale" value="noscale">');
	document.write('<embed src="' + swfUrl + '" flashvars="' + flashVars + '" scale="noscale" width="173" height="195" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent">');
	document.write('</embed>');
	document.write('</object>');
	
	document.write('<div style="line-height:1.3;text-align:left;">');
	document.write('<a href="' + siteUrl + '" target="_blank"><img src="' + imageUrl + 'site_top.gif" border="0" /></a><br/>');
	document.write('<a href="' + mypageUrl + calorioId + '/" target="_blank"><img src="' + imageUrl + 'user_top.gif" border="0" /></a>');
	document.write('</div>');
}
document.close();

