//フラッシュで使用するJAVASCRIPT
myWnd = "";
function openWnd(url){
	if (myWnd.closed){
		myWnd = "";
	}
	if (myWnd){
		myWnd.location.href = url;
		myWnd.focus();
	} else {
		myWnd = window.open(url,"sim",'width=640,height=480');
	}
}

function openOF(){
	//url = "https://www.fujicorporation.com/index.php?module=FJPC0701&action=OrderLogin";
	//英語版対応済み FJPC0701→FJPC0702
	//window.location.href = "https://" + window.location.host + "/index.php?module=FJPC0702&action=OrderLogin";
	window.location.href = "https://" + window.location.host + "/eng/index.php?module=FJPC0702&action=OrderLogin";
}

function nouse(){
	orderFormWnd = window.opener;
	if (orderFormWnd){	
	
		if (orderFormWnd.closed){
			orderFormWnd = window.open(url,"","");
			window.close();
		} else {
			orderFormWnd.location.href = url;
			window.close();
		}
	} else {
		orderFormWnd = window.open(url,"","");
		window.close();
	}
}

function winopn(){
	para = unescape(location.search).substr(1,1000);
	para = para.replace(/[^0-9a-z\_\=\&\.\,\-]/g,"");
	window.open('ec.html?' + para,'OnlineShop','width=740,height=540,scrollbars=yes,resizable=yes');
	return false;
}

function autoopn(){
	para = unescape(location.search).substr(1,1000);
	if (para.length > 0 ){
		winopn();
	}
	return false;
}
function writeECFlashHead( param ){
	//バージョン判定して貼り付けるよ
	var version;
	try{
		version = deconcept.SWFObjectUtil.getPlayerVersion();
	}catch(e){
		return;
	}
	if(version['major'] < 8){
		location.href = "http://" + window.location.host + "/eng/ec/noflash.html";
	}else{
	var extParam = unescape(location.search).substr(1,1000);
	document.write('<div class="shopflash" id="shopflash">');
	document.write('<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="100%" height="100%" id="main" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="scale" value="noscale" />');
	document.write('<param name="movie" value="main.swf?date=070726&'+ extParam +'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#FFFFFF" />');
	document.write('<embed src="main.swf?date=070726" FlashVars="' + extParam + '" quality="high" bgcolor="#FFFFFF" width="100%" height="100%" name="main" scale="noscale" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
	document.write('</div>');
	}
}
function variscale( prm_width,prm_height ){
	f = document.getElementById("shopflash");
	f.style.width=prm_width+"px";
	f.style.height=prm_height+"px";
	f.blur();
	f.focus();
}
function returnmenu(){
		window.location.href = "http://" + window.location.host + "/eng/ecb/?direct=tireandwheel";
}
