
var app_name="0387878700000046";
function focus_moveto(pos,size,angle,speed,func){if(!speed)speed=32;
focus.moveTo(pos,size,angle,Math.max(32,speed),func);};
function loading_circle_item(param){
this.superClass=container;
this.superClass({});
this.translate=param.translate?param.translate:[0,0,0];
this.width=param.width?param.width:100;
this.height=param.height?param.height:100;
this.visible_p=false;
this.loading=new gimage({rotation:[0,0,0,1],
width:this.width,height:this.height,
color:system.fdp_color.ICON_ONBASE,
src:IMG_PATH+"loading_circle.png",});
this.components.push(this.loading);}
loading_circle_item.prototype.init=function(param){
this.translate=param.translate?param.translate:this.translate;
this.width=param.width?param.width:this.width;
this.height=param.height?param.height:this.height;
this.loading.width=this.width;
this.loading.height=this.height;
delete_timer(this);
this.visible_p=false;
this.loading.rotation=[0,0,0,1];}
loading_circle_item.prototype.setShow=function(bool){
var obj=this;
if(bool==true){
delete_timer(obj);
obj.visible_p=true;
append_timer(obj,SU_IS_SLOW_ANIM?250:100,function(obj,count){
obj.loading.rotation[0]=-(30*count)%360;
force_redraw();});}else{
delete_timer(obj);
obj.visible_p=false;
obj.loading.rotation=[0,0,0,1];}
}

var focus=new Focus();
focus.setSize(1920,1080);
var background=new container({
components:[
new gbox({color:system.fdp_color.BASE,
width:1920,height:1080}),
new gimage({src:IMG_PATH+"apps_back_gradation.png",
width:1920,height:1080,draw_type:DIRECT,
color:system.fdp_color.TEXT_SUB_ONBASE,
})
]
});
var loading_circle=new loading_circle_item({width:100,height:100,});
var notices_screen=new container({});
notices_screen.disclaimer=new container({});
var get_disclaimer=function(func){
var req=http_request({
"url":getHostName().replace("https://","https://startup-user:start-disclaimer@")
+"/data/startup/ssl/disclaimer_mhc/apps_disclaimer.js",
"method":"GET",
"onload":function(status,header,body){
var ret=false;
try{
if(status==200){
notices_screen.disclaimer=secure_eval(body);
notices_screen.components.push(notices_screen.disclaimer);
ret=true;}

}catch(e){
console.log("Error to get \"apps_disclaimer.js\".\n"+e.message);
ret=false;}
if(func){
func(ret);}
},
"sync":false,
});
return req;};
var confirm_errMsg=new Confirmpanel(Confirmpanel.prototype.OPTION_TYPE_OK,
[function(){on_stage("HOME");}],
focus_moveto);
confirm_errMsg.setSize(980,440);
var sobj=stage({
"symbol":app_name,
"components":[
background,
confirm_errMsg,
loading_circle,
notices_screen,
focus
],
"key_hook":function(updown,keysym){
if(updown!=KEY_PRESS)return false;
force_redraw();
var ret;
var result;
switch(keysym){
case TXK_UP:
case TXK_DOWN:
case TXK_RIGHT:
case TXK_LEFT:
try{
result=this.cursor.key_hook(updown,keysym);
if(result instanceof Object){
ret=result.ret;
if(ret==true){
if("sound" in result){
if(result.sound!=-1)HOME_SOUND_PLAY(result.sound);}else{
HOME_SOUND_PLAY(0);}
}
}else{
ret=result;
if(ret==true){
HOME_SOUND_PLAY(0);}
}
}catch(e){
ret=false;}
break;
case TXK_ENTER:
try{
result=this.cursor.key_hook(updown,keysym);
if(result instanceof Object){
ret=result.ret;
if(ret==true){
if("sound" in result){
if(result.sound!=-1)HOME_SOUND_PLAY(result.sound);}else{
HOME_SOUND_PLAY("enter");}
}
}else{
ret=result;
if(ret==true){
HOME_SOUND_PLAY("enter");}
}
}catch(e){
ret=false;}
break;
case TXK_RETURN:
try{
result=this.cursor.key_hook(updown,keysym);
if(result instanceof Object){
ret=result.ret;
if(ret==true){
if("sound" in result){
if(result.sound!=-1)HOME_SOUND_PLAY(result.sound);}else{
HOME_SOUND_PLAY("cancel");}
}
}else{
ret=result;
if(ret==true){
HOME_SOUND_PLAY("cancel");}
}
}catch(e){
ret=false;}
break;}
switch(keysym){
case TXK_ENTER:
case TXK_RETURN:
if(ret==false){
on_stage("HOME");}
break;
default:
}
return ret;}
});
loading_circle.setShow(true);
get_disclaimer(function(bool){
loading_circle.setShow(false);
try{
if(bool==true){
notices_screen.disclaimer.create(1920,focus_moveto,focus.setShow);
notices_screen.disclaimer.setShow(true);
notices_screen.disclaimer.onFocus(true);
sobj.cursor=notices_screen.disclaimer;}else{
throw new Error("Fail: \"get_disclaimer()\"");}
}catch(e){
confirm_errMsg.setMessageText(LANG("LT_W_NORMAL_ERROR"));

confirm_errMsg.setShow(true);
confirm_errMsg.onFocus(true);
sobj.cursor=confirm_errMsg;}
force_redraw();});
