var base_domain="www.movilibo.com/studio"; var taxrate=5; var ga_flag=true; var current_page=""; var source_format=".pdf.PDF"; var icon_format=".jpg.JPG.jpeg.JPEG"; var movie_format=".mp4.MP4.m4v.M4V"; var sound_format=".mp3.MP3"; var image_format=".png.PNG.jpg.JPG.jpeg.JPEG.gif.GIF"; var html_format=".zip.ZIP"; var job_limit=50; var thumbnail_width=64; var thumbnail_height=96; var arrow_width=16; var low_width=320; var low_height=480; var high_width=640; var high_height=960; var step=0; var user_id=""; var work_path=""; var job_id=""; var status=0; var name=""; var nickname=""; var page=0; var frame=0; var flow=0; var pixel=0; var quality=0; var mask=0; var allocate=""; var index=""; var hyperlink=""; var progress=null; var progressbar=null; var timer_id=0; if (ga_flag){ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-15491623-1"); pageTracker._trackPageview();} catch(err) {}}
function init(page_name){ current_page=page_name; if (document.getElementById("menu_"+current_page)){ rollover(document.getElementById("menu_"+current_page));}}
function blank(){ }
function get_time_stamp(){ time_stamp=new Date().getTime(); return time_stamp;}
function arr(num,col){ while(String(num).length<col){ num="0"+String(num);}
return String(num);}
function af(str) { var num = new String(str).replace(/,/g, ""); while(num != (num = num.replace(/^(-?\d+)(\d{3})/, "$1,$2"))); return num;}
function get_style(target_object,property_name){ if(target_object.currentStyle) { return target_object.currentStyle[property_name];}
else if( document.defaultView.getComputedStyle ) { return document.defaultView.getComputedStyle(target_object, null).getPropertyValue(property_name);}
return "";}
function rollover(button_object){ var button_name=button_object.id; button_object.firstChild.src="image/"+button_name+"_highlight.png";}
function rollout(button_object){ var button_name=button_object.id; if (button_name!=("menu_"+current_page)){ button_object.firstChild.src="image/"+button_name+"_default.png";}}
function go(page_name){ location.href=page_name+".html?ts="+get_time_stamp();}
function check_email(target_object){ if (target_object.value.match(/^\S+@\S+\.\S+$/)){ return true;}
else{ return false;}}
function check_hankaku(target_object){ target_string=target_object.value; for (i=0; i<target_string.length; i++) { chrcd=target_string.charCodeAt(i); if ((48<=chrcd && chrcd <=57) || (65<= chrcd && chrcd <=90) || (97 <= chrcd && chrcd <= 122)){ }
else{ return false;}}
return true;}
function check_number(target_object){ target_string=target_object.value; for (i=0; i<target_string.length; i++) { chrcd=target_string.charCodeAt(i); if ((48<=chrcd && chrcd <=57)){ }
else{ return false;}}
return true;}
function check_length(target_object,min,max){ if (target_object.value.length>=min && target_object.value.length<=max){ return true;}
else{ return false;}}
function check_blank(target_object){ if (target_object.value!=""){ return true;}
else{ return false;}}
function set_option_parameter(option_parameter,option_name,option_value){ var i=0; var set_flag=false; var temp_parameter=""; for (i=0; i<option_parameter.split(";").length; i++) { if (option_parameter.split(";")[i]!=""){ if (option_parameter.split(";")[i].split(":")[0]==option_name){ if (!set_flag){ temp_parameter=temp_parameter+option_name+":"+option_value+";"; set_flag=true;}}
else{ temp_parameter=temp_parameter+option_parameter.split(";")[i]+";";}}}
if (!set_flag){ temp_parameter=temp_parameter+option_name+":"+option_value+";";}
return temp_parameter;}
function get_option_parameter(option_parameter,option_name){ var i=0; for (i=0; i<option_parameter.split(";").length; i++) { if (option_parameter.split(";")[i].split(":")[0]==option_name){ return option_parameter.split(";")[i].split(":")[1];}}
return "";}
function delete_option_parameter(option_parameter,option_name){ var i=0; var temp_parameter=""; for (i=0; i<option_parameter.split(";").length; i++) { if (option_parameter.split(";")[i]!=""){ if (option_parameter.split(";")[i].split(":")[0]==option_name){ }
else{ temp_parameter=temp_parameter+option_parameter.split(";")[i]+";";}}}
return temp_parameter;}
function login(){ if (!check_blank(document.form.account) || !check_blank(document.form.password)){ alert("アカウントまたはパスワードが入力されていません。"); return;}
document.form.action="login.html?mode=2&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function cancel_login(){ location.href="index.html";}
function confirm_monitor(){ if (!check_blank(document.form.account) || !check_blank(document.form.account_confirm) || !check_blank(document.form.password) || !check_blank(document.form.password_confirm) || !check_blank(document.form.name) || !check_blank(document.form.company) || !check_blank(document.form.zip) || !check_blank(document.form.address1) || !check_blank(document.form.tel)){ alert("必須項目が入力されていません。"); return;}
if (document.form.account.value != document.form.account_confirm.value){ alert("アカウント（E-mailアドレス）の入力内容が一致しません。"); return;}
if (!check_email(document.form.account)){ alert("正しいE-mailアドレスを入力してください。"); return;}
if (document.form.password.value != document.form.password_confirm.value){ alert("パスワードの入力内容が一致しません。"); return;}
if (!check_length(document.form.password,4,20)){ alert("パスワードの文字数が正しくありません。"); return;}
if (!check_hankaku(document.form.password)){ alert("パスワードに半角英数字以外の文字は使用できません。"); return;}
document.form.action="monitor.html?mode=2&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function submit_monitor(){ document.form.action="monitor.html?mode=3&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function return_monitor(){ history.go(-1);}
function cancel_monitor(){ location.href="index.html";}
function show_agreement()
{ window.open("agreementgist.html","agreement","width=580,height=580,scrollbars=yes,location=no,menubar=no,left=10,top=30");}
function confirm_registration(){ if (!check_blank(document.form.account) || !check_blank(document.form.account_confirm) || !check_blank(document.form.password) || !check_blank(document.form.password_confirm) || !check_blank(document.form.name) || !check_blank(document.form.company) || !check_blank(document.form.zip) || !check_blank(document.form.address1) || !check_blank(document.form.tel)){ alert("必須項目が入力されていません。"); return;}
if (document.form.account.value != document.form.account_confirm.value){ alert("アカウント（E-mailアドレス）の入力内容が一致しません。"); return;}
if (!check_email(document.form.account)){ alert("正しいE-mailアドレスを入力してください。"); return;}
if (document.form.password.value != document.form.password_confirm.value){ alert("パスワードの入力内容が一致しません。"); return;}
if (!check_length(document.form.password,4,20)){ alert("パスワードの文字数が正しくありません。"); return;}
if (!check_hankaku(document.form.password)){ alert("パスワードに半角英数字以外の文字は使用できません。"); return;}
if (!document.form.agreement.checked){ alert("ご利用規約に同意いただけない場合はお申し込みいただけません。"); return;}
document.form.action="registration.html?mode=2&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function submit_registration(){ document.form.action="registration.html?mode=3&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function return_registration(){ history.go(-1);}
function cancel_registration(){ location.href="registration.html";}
function confirm_profile(){ if (!check_blank(document.form.password) || !check_blank(document.form.password_confirm) || !check_blank(document.form.name) || !check_blank(document.form.zip) || !check_blank(document.form.address1) || !check_blank(document.form.tel)){ alert("必須項目が入力されていません。"); return;}
if (document.form.password.value != document.form.password_confirm.value){ alert("パスワードの入力内容が一致しません。"); return;}
if (!check_length(document.form.password,4,20)){ alert("パスワードの文字数が正しくありません。"); return;}
if (!check_hankaku(document.form.password)){ alert("パスワードに半角英数字以外の文字は使用できません。"); return;}
document.form.action="profile.html?mode=2&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function submit_profile(){ document.form.action="profile.html?mode=3&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function return_profile(){ history.go(-1);}
function cancel_profile(){ location.href="service.html?ts="+get_time_stamp();}
function forget(){ if (!check_blank(document.form.account)){ alert("アカウントが入力されていません。"); return;}
document.form.action="forget.html?mode=2&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function cancel_forget(){ location.href="login.html?ts="+get_time_stamp();}
function confirm_contact(){ if (!check_blank(document.form.account) || !check_blank(document.form.account_confirm) || !check_blank(document.form.name)){ alert("必須項目が入力されていません。"); return;}
if (document.form.account.value != document.form.account_confirm.value){ alert("アカウント（E-mailアドレス）の入力内容が一致しません。"); return;}
if (!check_email(document.form.account)){ alert("正しいE-mailアドレスを入力してください。"); return;}
document.form.action="contact.html?mode=2&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function submit_contact(){ document.form.action="contact.html?mode=3&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function return_contact(){ history.go(-1);}
function cancel_contact(){ location.href="index.html";}
function earr(cd,num,col){ var k=0; var r=0; var l=new Array(); var e="9u_oil2ws1vqj0ac"; num=arr(num,col); k=parseInt(cd.substr(7,1), 16); r=k%5; if (r==0){ l=new Array(3,2,1);}
if (r==1){ l=new Array(2,1,3);}
if (r==2){ l=new Array(3,1,2);}
if (r==3){ l=new Array(2,3,1);}
if (r==4){ l=new Array(1,3,2);}
num=e.substr(((parseInt(num.substr(l[0]-1,1))+k)%16),1)+e.substr(((parseInt(num.substr(l[1]-1,1))+k)%16),1)+e.substr(((parseInt(num.substr(l[2]-1,1))+k)%16),1); return num;}
function confirm_charge(){ if (document.getElementById("total").value==0){ alert("数量が入力されていません。"); return;}
document.form.action="charge.html?mode=2&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function submit_charge(){ document.form.action="charge.html?mode=3&ts="+get_time_stamp(); document.form.target=""; document.form.submit();}
function return_charge(){ history.go(-1);}
function cancel_charge(){ location.href="charge.html";}
function update_total(){ var total=(document.getElementById("ticket_1_price").value)*(document.getElementById("ticket_1_piece").value)+(document.getElementById("ticket_5_price").value)*(document.getElementById("ticket_5_piece").value)+(document.getElementById("ticket_10_price").value)*(document.getElementById("ticket_10_piece").value); document.getElementById("vtotal").innerHTML=af(total); document.getElementById("total").value=total;}
function show_help(page_name){ var help_window=null; var help_anchor=""; if (page_name=="service"){ if(step==0){ help_anchor="#servicestep0";}
if(step==1){ help_anchor="#servicestep1";}
if(step==2){ help_anchor="#servicestep2";}
if(step==3){ help_anchor="#servicestep3";}
if(step==4){ help_anchor="#servicestep4";}
if(step==5){ help_anchor="#servicestep5";}
if(step==6){ help_anchor="#servicestep6";}
if(step==7){ help_anchor="#servicestep7";}
if(step==8){ help_anchor="#servicestep8";}
if(step==9){ help_anchor="#entry";}}
if (page_name=="charge"){ help_anchor="#charge";}
if (page_name=="shelf"){ help_anchor="#shelf";}
if (page_name=="store"){ help_anchor="#store";}
if (page_name=="condition"){ help_anchor="#condition";}
help_window=window.open("http://"+base_domain+"/help.html"+help_anchor,"help","width=540,height=720,scrollbars=yes,location=no,menubar=no,left=10,top=30"); help_window.blur(); help_window.focus();}
function submit_mailbox(){ var email_object=document.getElementById("mailboxaddress"); if (!check_email(email_object)){ alert("正しいE-mailアドレスを入力してください。"); return;}
request_parameter=$H({email:email_object.value}).toQueryString(); new Ajax.Request( "mailbox.html?ts="+get_time_stamp(), { method:"post", postBody:request_parameter, onSuccess:function(httpObject){ document.getElementById("mailbox").innerHTML="<img src=\"images/common/mailboxcomplete.gif\" alt=\"ご登録が完了しました。\" width=\"244\" height=\"144\" style=\"margin:8px;\" />";}, onFailure:function(){ }} );}

