﻿var flg_3d_check=false;
var flg_tooltip=true;
var flg_event=false;

function init3d()
{
	if(document.Applet1.isSceneLoaded()&&top.page_head==true&&top.page_right==true){
		flg_3d_check=true;
//		flg_move=(-1);//20040227
		top.frames['header'].document.form1.elements['select'].disabled=true;//20040227
		if(flg_event) document.Applet1.setEventsFunction("My3daEventFunction");//
		document.Applet1.setToolbarVisible(false);
		now_flg='opening';
		setTimeout("start_anim('opening')",500);
	}else{
		setTimeout("init3d()",500);
	}
}
function isWin()
{
	var uAgent = navigator.userAgent.toUpperCase();
	return (uAgent.indexOf('WIN')>=0)?(true):(false);
}
function isIE()
{
	var aName = navigator.appName.toUpperCase();
	var uAgent = navigator.userAgent.toUpperCase();
	if(uAgent.indexOf('SAFARI')>=0) return false;
	if(uAgent.indexOf('OPERA')>=0) return false;
	return (aName.indexOf('MICROSOFT')>=0)?(true):(false);
}
function isNS4()
{
	return (!!document.layers);
}
function isMac()
{
	var uAgent = navigator.userAgent.toUpperCase();
	return (uAgent.indexOf('MAC')>=0)?(true):(false);
}

function isMacOSX()
{
	if(!isMac()) return false;
	for(var i=0; i<navigator.plugins.length; i++){
		if (navigator.plugins[i].filename.indexOf(".") >= 0) return true;
	}
	return false;
}
function init()
{
		var uOS = navigator.platform;//
		var uAgent = navigator.userAgent;//
		var uVersion = navigator.appVersion;//
		
		if(uOS.indexOf('Mac')>=0 && isNS4() && !isMacOSX()){//
			flg_tooltip=false;
		}
		if((isWin()&&isIE())||(isNS4())){
//			document.Applet1.setEventsFunction("My3daEventFunction");//
			flg_event=true;
		}
		if ((uOS.indexOf('Mac')>=0)&&(uAgent.indexOf('IE')>=0)) return;
		init3d();
}
function onResizeFunction()
{
	if(document.layers) location.href=location;
}
