// JavaScript Document
//*********************************************************//
// File name: common.js
// Author: TURBINE INTERACTIVE
// Last modified: 2006/05/12
//*********************************************************//

/* ポップアップウインドウ
theURL: ポップするページのURL
winName: ポップウインドウのname
features: 詳細
---------------------------------------------------------*/
function OpenBrWindow(theURL, winName, features) {
  window.open(theURL, winName, features);
}

/* ニュース用ポップアップ
---------------------------------------------------------*/
function OpenSized(theURL) {
	window.open(theURL,'','scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,width=600,height=450');
}

/* フラッシュオブジェクト挿入
---------------------------------------------------------*/
function getFlash(file, w, h){
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width',w,'height',h,'src',file,'quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie',file);
}

/* フラッシュバージョンチェック
---------------------------------------------------------*/
function checkFlash(){
	var ver = false;
	var nn = (navigator.appName.charAt(0) == "N");
	var n6 = (document.getElementById && nn) || false;
	var ie = (document.all && !nn) || false;
	var op = (navigator.userAgent.indexOf("Opera") != -1);
	var mac = (navigator.userAgent.indexOf("Mac") != -1) || false;
	var ver = "" + navigator.appVersion;
	var fno = ver.indexOf(" ");
	ver = eval(ver.substring(0, fno));
	
	if(ie && !mac && !op){
		ver = new ActiveXObject("ShockwaveFlash.ShockwaveFlash").FlashVersion();
		ver = Math.floor(ver / 0x10000);
	}
	
	if(!ver){
		if(!ie && mac && navigator.plugins){
			ver = navigator.plugins["Shockwave Flash"].description.charAt(16);
		}else if(nn && !document.plugins){
			ver = false;
		}else if((nn || n6) && navigator.plugins){
			ver = navigator.plugins["Shockwave Flash"].description.charAt(16);
		}else if(op && !mac && navigator.plugins){
			ver = navigator.plugins["Shockwave Flash"].description.charAt(16);
		}else{
			ver = false;
		}
	}
	
	if(ie && mac){
		ver = 6;
	}
	
	return ver;
}

/* フォームリセット
---------------------------------------------------------*/
function resetForm($param) {
	if($param != "") $param = "&" + $param;
	window.location = "?mode=reset" + $param;
}

/* フォームバック
---------------------------------------------------------*/
function backForm() {
	history.back();
}

