var ajax__do_request=false;var clock__current_second=0;var clock__next_interval=0;var clock__func_state=0;var clock__is_alive=true;var clock__is_restarted=false;var clock__is_func_locked=false;var clock__is_reload_clock=false;var clock__is_set_delayed_timeout=false;var clock__timeform="0000-00-00 00:00:00";var javascript__ready_state=0;var global__main_menu_window_object=false;var global__app_version=parseInt(navigator.appVersion);var global__user_agent=navigator.userAgent.toLowerCase();var global__is_windows=((global__user_agent.indexOf("win")!=-1)||(global__user_agent.indexOf("16bit")!=-1));var global__is_internet_explorer=((global__user_agent.indexOf("msie")!=-1)&&(!(global__user_agent.indexOf("opera")!=-1))&&(!((global__user_agent.indexOf("safari")!=-1)||(navigator.vendor=="Apple Computer, Inc.")))&&(!(global__user_agent.indexOf("webtv")!=-1)));function setup_function_onload(){stop_loading_screen();session_set_active_timeout(true);setTimeout("request_localtime()", 500);}function start_loading_screen(){if(document.getElementById("loading_screen")){document.getElementById("loading_screen").style.visibility="visible";}javascript__ready_state=0;}function stop_loading_screen(){if(document.getElementById("loading_screen")){document.getElementById("loading_screen").style.visibility="hidden";}javascript__ready_state=1;}function uniqid(){var dateobj=new Date();return dateobj.getTime();}function reverse(string){if(!(string)){string='';}return string.split('').reverse().join('');}function do_received(url, auth_type){if(!(url)){return false;}if(!(auth_type)){auth_type="default";}try{ajax__do_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(a){try{ajax__do_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(b){try{ajax__do_request=new XMLHttpRequest();if(ajax__do_request.overrideMimeType){ajax__do_request.overrideMimeType("text/plain");}}catch(c){ajax__do_request=false;return false;}}}ajax__do_request.onreadystatechange=function(){if(ajax__do_request.readyState==4){if(ajax__do_request.status==200){return true;}}return false;};ajax__do_request.open("GET", url, false);ajax__do_request.send(null);switch(auth_type){default:case 'default':var return_data=String(ajax__do_request.responseText);var tag_start_position=return_data.indexOf("");var tag_end_position=return_data.indexOf("");if((tag_start_position!=-1)&&(tag_end_position!=-1)){return_data=return_data.substring(tag_start_position+39, tag_end_position);if(return_data.length>0){return return_data;}else{return false;}}else{return false;}break;case 'raw':return ajax__do_request.responseText;break;}}function session_set_active_timeout(mode){var is_delayed=mode==false?false:true;if(is_delayed==true){setTimeout("session_set_active_timeout(false)", 1830000);return true;}else{try{var session_status=do_received(cp_location+"?set_session_active_timeout=true&id=7c60459b78425198eaa09c687bc9741d&unique_id=1"+reverse(String(uniqid()).substring(0, 10)), "default");}catch(e){setTimeout("session_set_active_timeout(false)", 930000);return false;}switch(session_status){case '0x0100':setTimeout("session_set_active_timeout(false)", 1830000);return true;break;case '0x0101':return false;break;default:setTimeout("session_set_active_timeout(false)", 930000);return false;break;}}}function switch_locked_clock_function(mode){if(!(mode)){mode=false;}clock__is_func_locked=mode==false?false:true;}function clock_settimeout(object, interval){if(clock__is_set_delayed_timeout==false){if(object.length>0){clock__is_set_delayed_timeout=true;setTimeout("clock_cleartimeout();"+object, interval);}}}function clock_cleartimeout(){if(clock__is_set_delayed_timeout==true){clock__is_set_delayed_timeout=false;}}function reload_localtime(){switch(clock__func_state){case 0:case 1:if(document.getElementById("clock_platform")){if(javascript__ready_state==1){if((clock__is_func_locked==false)&&(clock__func_state==0)){clock__is_reload_clock=true;clock__is_func_locked=true;}return false;}else{return false;}}else{return false;}break;case 2:if(document.getElementById("clock_platform")){if(javascript__ready_state==1){if(clock__is_func_locked==false){if(confirm_with_lockscreen("Are you sure you want to restart the clock?")){clock__is_func_locked=true;if(clock__is_alive==false){clock__is_reload_clock=true;clock__is_restarted=true;clock__func_state=0;request_localtime();return false;}else{return false;}}else{return false;}}else{return false;}}else{return false;}}else{return false;}break;default:return false;break;}}function request_localtime(){switch(clock__func_state){case 0:case 1:if(document.getElementById("clock_platform")){var valid_time='';var unique_id=String(uniqid());unique_id=unique_id.substring(0, 10);unique_id="1"+reverse(unique_id);clock__func_state=1;if(clock__current_second>60){try{valid_time=do_received(cp_location+"?setup_localtime=true&type=microtime&unique_id="+unique_id, "default");}catch(a){clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__is_restarted=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;return false;}if(((valid_time.length>3)&&(valid_time.length<7))&&(is_valid_string(valid_time, "time"))){var valid_time_array=valid_time.split(":");clock__next_interval=parseInt(valid_time_array[0]);clock__current_second=parseInt(valid_time_array[1], 10)+1;try{clock__timeform=do_received(cp_location+"?setup_localtime=true&type=default&unique_id="+unique_id, "default");}catch(b){clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__is_restarted=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;return false;}if((clock__timeform.length==19)&&(is_valid_string(clock__timeform, "time"))){if(document.getElementById("clock_platform")){document.getElementById("clock_platform").innerHTML=clock__timeform;}clock_settimeout("request_localtime()", clock__next_interval);clock__func_state=0;clock__next_interval=0;return true;}else{clock__timeform="0000-00-00 00:00:00";clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__is_restarted=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;return false;}}else{clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__is_restarted=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;return false;}}else{var year_unit="0000";var dateobj=new Date();var new_format_timeform='';var minute, hour, day, month, year=0;var minute_effect, hour_effect, day_effect, month_effect=false;var second_unit, minute_unit, hour_unit, day_unit, month_unit="00";var month_2_dateobj=new Date("February 29 "+dateobj.getYear()+", 0:00:00");var ttl_days_in_month_2=29-parseInt(month_2_dateobj.getDate())<=0?29:28;var ttl_days_of_monthobj=new Array(31, ttl_days_in_month_2, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);if(clock__timeform=="0000-00-00 00:00:00"){try{clock__timeform=do_received(cp_location+"?setup_localtime=true&type=default&unique_id="+unique_id, "default");}catch(a){clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;if(clock__is_restarted==true){clock__is_restarted=false;alert("An error occurred during start the clock, command cancelled!");}else{clock__is_restarted=false;}return false;}if((clock__timeform.length==19)&&(is_valid_string(clock__timeform, "time"))){try{valid_time=do_received(cp_location+"?setup_localtime=true&type=microtime&unique_id="+unique_id, "default");}catch(b){clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;if(clock__is_restarted==true){clock__is_restarted=false;alert("An error occurred during start the clock, command cancelled!");}else{clock__is_restarted=false;}return false;}if(((valid_time.length>3)&&(valid_time.length<7))&&(is_valid_string(valid_time, "time"))){var clock__timeform_sub_array=new Array();var valid_time_array=valid_time.split(":");clock__next_interval=parseInt(valid_time_array[0]);clock__current_second=parseInt(valid_time_array[1], 10);clock__timeform_array=clock__timeform.split(" ");clock__timeform_sub_array[0]=clock__timeform_array[0].split("-");clock__timeform_sub_array[1]=clock__timeform_array[1].split(":", 2);if((clock__current_second>=0)&&(clock__current_second<=9)){second_unit="0"+clock__current_second;}else{if(clock__current_second>=60){second_unit="00";}else{second_unit=clock__current_second;}}if(clock__current_second>=60){minute=(parseInt(clock__timeform_sub_array[1][1], 10)+1)>=60?0:(parseInt(clock__timeform_sub_array[1][1], 10)+1);if((minute>=0)&&(minute<=9)){minute_unit="0"+minute;}else{minute_unit=minute;}minute_effect=true;}else{minute=parseInt(clock__timeform_sub_array[1][1], 10);if((minute>=0)&&(minute<=9)){minute_unit="0"+minute;}else{minute_unit=minute;}}if((minute==0)&&(minute_effect==true)){hour=(parseInt(clock__timeform_sub_array[1][0], 10)+1)>=24?0:(parseInt(clock__timeform_sub_array[1][0], 10)+1);if((hour>=0)&&(hour<=9)){hour_unit="0"+hour;}else{hour_unit=hour;}hour_effect=true;}else{hour=parseInt(clock__timeform_sub_array[1][0], 10);if((hour>=0)&&(hour<=9)){hour_unit="0"+hour;}else{hour_unit=hour;}}if((hour==0)&&(hour_effect==true)){day=(parseInt(clock__timeform_sub_array[0][2], 10)+1)>=(ttl_days_of_monthobj[dateobj.getMonth()]+1)?1:(parseInt(clock__timeform_sub_array[0][2], 10)+1);if((day>=1)&&(day<=9)){day_unit="0"+day;}else{day_unit=day;}day_effect=true;}else{day=parseInt(clock__timeform_sub_array[0][2], 10);if((day>=1)&&(day<=9)){day_unit="0"+day;}else{day_unit=day;}}if((day==1)&&(day_effect==true)){month=(parseInt(clock__timeform_sub_array[0][1], 10)+1)>=13?1:(parseInt(clock__timeform_sub_array[0][1], 10)+1);if((month>=1)&&(month<=9)){month_unit="0"+month;}else{month_unit=month;}month_effect=true;}else{month=parseInt(clock__timeform_sub_array[0][1], 10);if((month>=1)&&(month<=9)){month_unit="0"+month;}else{month_unit=month;}}if((month==1)&&(month_effect==true)){year_unit=parseInt(clock__timeform_sub_array[0][0])+1;}else{year_unit=parseInt(clock__timeform_sub_array[0][0]);}new_format_timeform=year_unit+"-"+month_unit+"-"+day_unit+" "+hour_unit+":"+minute_unit+":"+second_unit;if(document.getElementById("clock_platform")){document.getElementById("clock_platform").innerHTML=new_format_timeform;}clock_settimeout("request_localtime()", clock__next_interval);clock__current_second=clock__current_second+1;clock__is_reload_clock=false;clock__is_restarted=false;clock__func_state=0;clock__next_interval=0;clock__is_alive=true;return true;}else{clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;if(clock__is_restarted==true){clock__is_restarted=false;alert("Unable to start the clock, command cancelled!");}else{clock__is_restarted=false;}return false;}}else{clock__timeform="0000-00-00 00:00:00";clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;if(clock__is_restarted==true){clock__is_restarted=false;alert("Unable to start the clock, command cancelled!");}else{clock__is_restarted=false;}return false;}}else{if(clock__is_alive==false){clock__is_alive=true;try{do_received(cp_location+"?setup_localtime=true&type=check_status&unique_id="+unique_id, "default");}catch(e){clock__is_alive=false;if(clock__is_restarted==true){clock__is_restarted=false;alert("Unable to start the clock, command cancelled!");}}}if(clock__is_alive==true){var clock__timeform_sub_array=new Array();clock__timeform_array=clock__timeform.split(" ");clock__timeform_sub_array[0]=clock__timeform_array[0].split("-");clock__timeform_sub_array[1]=clock__timeform_array[1].split(":", 2);if((clock__current_second>=0)&&(clock__current_second<=9)){second_unit="0"+clock__current_second;}else{if(clock__current_second>=60){second_unit="00";}else{second_unit=clock__current_second;}}if(clock__current_second>=60){minute=(parseInt(clock__timeform_sub_array[1][1], 10)+1)>=60?0:(parseInt(clock__timeform_sub_array[1][1], 10)+1);if((minute>=0)&&(minute<=9)){minute_unit="0"+minute;}else{minute_unit=minute;}minute_effect=true;}else{minute=parseInt(clock__timeform_sub_array[1][1], 10);if((minute>=0)&&(minute<=9)){minute_unit="0"+minute;}else{minute_unit=minute;}}if((minute==0)&&(minute_effect==true)){hour=(parseInt(clock__timeform_sub_array[1][0], 10)+1)>=24?0:(parseInt(clock__timeform_sub_array[1][0], 10)+1);if((hour>=0)&&(hour<=9)){hour_unit="0"+hour;}else{hour_unit=hour;}hour_effect=true;}else{hour=parseInt(clock__timeform_sub_array[1][0], 10);if((hour>=0)&&(hour<=9)){hour_unit="0"+hour;}else{hour_unit=hour;}}if((hour==0)&&(hour_effect==true)){day=(parseInt(clock__timeform_sub_array[0][2], 10)+1)>=(ttl_days_of_monthobj[dateobj.getMonth()]+1)?1:(parseInt(clock__timeform_sub_array[0][2], 10)+1);if((day>=1)&&(day<=9)){day_unit="0"+day;}else{day_unit=day;}day_effect=true;}else{day=parseInt(clock__timeform_sub_array[0][2], 10);if((day>=1)&&(day<=9)){day_unit="0"+day;}else{day_unit=day;}}if((day==1)&&(day_effect==true)){month=(parseInt(clock__timeform_sub_array[0][1], 10)+1)>=13?1:(parseInt(clock__timeform_sub_array[0][1], 10)+1);if((month>=1)&&(month<=9)){month_unit="0"+month;}else{month_unit=month;}month_effect=true;}else{month=parseInt(clock__timeform_sub_array[0][1], 10);if((month>=1)&&(month<=9)){month_unit="0"+month;}else{month_unit=month;}}if((month==1)&&(month_effect==true)){year_unit=parseInt(clock__timeform_sub_array[0][0])+1;}else{year_unit=parseInt(clock__timeform_sub_array[0][0]);}new_format_timeform=year_unit+"-"+month_unit+"-"+day_unit+" "+hour_unit+":"+minute_unit+":"+second_unit;if(clock__is_reload_clock==false){if(document.getElementById("clock_platform")){document.getElementById("clock_platform").innerHTML=new_format_timeform;}clock_settimeout("request_localtime()", 1000);clock__current_second=clock__current_second+1;clock__func_state=0;clock__next_interval=0;return true;}else{clearTimeout(10500);setTimeout("switch_locked_clock_function(false)", 60500);try{valid_time=do_received(cp_location+"?setup_localtime=true&type=microtime&unique_id="+unique_id, "default");}catch(a){clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__is_restarted=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;alert("An error occurred during load the clock, command cancelled!");return false;}if(((valid_time.length>3)&&(valid_time.length<7))&&(is_valid_string(valid_time, "time"))){var valid_time_array=valid_time.split(":");clock__next_interval=parseInt(valid_time_array[0]);clock__current_second=parseInt(valid_time_array[1], 10);try{clock__timeform=do_received(cp_location+"?setup_localtime=true&type=default&unique_id="+unique_id, "default");}catch(b){clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__is_restarted=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;alert("An error occurred during load the clock, command cancelled!");return false;}if((clock__timeform.length==19)&&(is_valid_string(clock__timeform, "time"))){if(document.getElementById("clock_platform")){document.getElementById("clock_platform").innerHTML=clock__timeform;}setTimeout("request_localtime()", clock__next_interval);clock__current_second=clock__current_second+1;clock__is_reload_clock=false;clock__is_restarted=false;clock__func_state=0;clock__next_interval=0;return true;}else{clock__timeform="0000-00-00 00:00:00";clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;if(clock__is_restarted==true){clock__is_restarted=false;alert("Unable to start the clock, command cancelled!");}else{clock__is_restarted=false;alert("An error occurred during load the clock, command cancelled!");}return false;}}else{clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__func_state=2;clock__is_alive=false;clock__next_interval=0;clock__current_second=0;if(clock__is_restarted==true){clock__is_restarted=false;alert("Unable to start the clock, command cancelled!");}else{clock__is_restarted=false;alert("An error occurred during load the clock, command cancelled!");}return false;}}}else{clock__is_set_delayed_timeout=false;clock__is_reload_clock=false;clock__is_func_locked=false;clock__func_state=2;clock__next_interval=0;clock__current_second=0;return false;}}}}else{return false;}break;case 2:default:return false;break;}}function parent_window_link(url){if((window.opener)&&(!(window.opener.closed))){window.opener.location=url;}return false;}function reload_parent_window(){if((window.opener)&&(!(window.opener.closed))){window.opener.location.reload();}}function open_mm_window(authcode){if(authcode.length>0){var window_name="MainMenuWindow";var window_properties="width=220, height=520, resizable=0, scrollbars=1";var window_location=cp_location+"?open_main_menu_window=true&auth_code="+authcode;if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){global__main_menu_window_object=window.open(window_location, window_name, window_properties);global__main_menu_window_object.focus();global__main_menu_window_object=false;}else if((global__main_menu_window_object)&&(!(global__main_menu_window_object.closed))){global__main_menu_window_object.focus();}else{global__main_menu_window_object=window.open(window_location, window_name, window_properties);}}return false;}function select_action_with_mm_window(url, id){if(document.getElementById("is_locked_action_form").value==0){if(document.getElementById("action_link_id_"+id).style.fontWeight==''){for(int=0;int(totalpage*result_perpage-result_perpage)){start=totalpage*result_perpage-result_perpage;}switch(type){case 1:var last_querystring=document.MemoForm.last_querystring.value;window.location.href=cp_location+"?showforum="+id+"&st="+start+last_querystring;return false;break;case 2:window.location.href=cp_location+"?showtopic="+id+"&st="+start;return false;break;case 3:var last_querystring=document.MemoForm.last_querystring.value;window.location.href=cp_location+"?"+last_querystring+"&st="+start;return false;break;default:alert("Invalid type, command cancelled!");return false;break;}}else{return false;}}function select_jumppage_option(obj){var start=obj.value;var location=String(window.location);var add_string=location.indexOf("?")==-1?"?":'';var remove_string=location.indexOf("&st=")==-1?'':location.substring(location.indexOf("&st="), location.length);if(start.length>0){if(remove_string.length>0){window.location.href=location.replace(remove_string, '')+ add_string+"&st="+start;}else{window.location.href=location+ add_string+"&st="+start;}}}function confirm_delete_post(url){if(confirm_with_lockscreen("Are you sure you want to delete this post?")){window.location.href=url;return false;}else{return false;}}function check_topic_option(){var optionobj=document.TopicOptionForm.option;var submitobj=document.TopicOptionForm.submit;if(optionobj.selectedIndex==0){return false;}else if((optionobj.value=="c4ca4238a0b923820dcc509a6f75849b")||(optionobj.value=="c81e728d9d4c2f636f067f89cc14862c")||(optionobj.value=="eccbc87e4b5ce2fe28308fd9f2a7baf3")||(optionobj.value=="c9f0f895fb98ab9159f51fd0297e236d")){if(confirm_with_lockscreen("Are you sure you want to continue this action?")){submitobj.disabled=true;return true;}else{return false;}}else{submitobj.disabled=true;return true;}}function view_email(email){if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){if(confirm("Are you sure you want to add this e-mail by Windows Live Messenger?")){window.location.href="msnim:add?contact="+email;}else{view_contents("E-mail Address", email);}return false;}else{view_contents("E-mail Address", email);return false;}}function open_fastreply_window(){var postform_obj=document.PostActionForm;var window_obj=document.getElementById("fastreply_table");if(window_obj.style.display=="none"){window_obj.style.display='';if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){document.getElementsByTagName("html")[0].style.filter="none";}else{var screen_object=document.getElementsByTagName("body")[0];screen_object.style.opacity=1.01;screen_object.style.KhtmlOpacity=1.01;screen_object.style.MozOpacity=1.01;}}else{if(postform_obj.pmessage.value.length>0){if(confirm_with_lockscreen("Are you sure you want to discard changes?")){window_obj.style.display="none";document.getElementById("do_bold").background='';document.getElementById("do_italic").background='';document.getElementById("do_underline").background='';document.getElementById("do_strike").background='';document.getElementById("do_quote").background='';document.getElementById("do_code").background='';postform_obj.memo_tagclosed.value='';postform_obj.reset();}}else{window_obj.style.display="none";document.getElementById("do_bold").background='';document.getElementById("do_italic").background='';document.getElementById("do_underline").background='';document.getElementById("do_strike").background='';document.getElementById("do_quote").background='';document.getElementById("do_code").background='';postform_obj.memo_tagclosed.value='';if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){document.getElementsByTagName("html")[0].style.filter='';}else{var screen_object=document.getElementsByTagName("body")[0];screen_object.style.opacity=1.0;screen_object.style.KhtmlOpacity=1.0;screen_object.style.MozOpacity=1.0;}}}return false;}function delete_message(pobject, mobject){if(document.getElementById("insertobj").value==0){var current_length=pobject.value.length;if((current_length<=0)||(current_length==undefined)){current_length=0;}if(current_length>0){if(confirm("Are you sure you want to delete all messages?")){closeall_tag(pobject, mobject);pobject.value='';pobject.focus();}}else{pobject.focus();}}return false;}function check_length(pobject){if(document.getElementById("insertobj").value==0){if(max_message_length<=0){max_message_length=20000;}var message=pobject.value;var current_length=pobject.value.length;if((current_length<=0)||(current_length==undefined)){current_length=0;}var remain_length=max_message_length-current_length;var duplicate_remain_length=max_message_length-current_length;if(remain_length<0){remain_length=0;}if((current_length>=0)&&(current_length!=undefined)){if(duplicate_remain_length>=0){alert("Result:\n\nCurrent message length: "+current_length+" characters\nRemaining message length: "+remain_length+" characters\nMaximize message length: "+max_message_length+" characters");}else{if(confirm("Over messages!\n\nCurrent message length: "+current_length+" characters\nRemaining message length: "+remain_length+" characters\nMaximize message length: "+max_message_length+" characters\n\nAre you sure you want to delete all over messages?")){pobject.value=message.substring(0, max_message_length);pobject.focus();}}}}return false;}function change_content_height(type, pobject){if(document.getElementById("insertobj").value==0){var current_height=parseInt(pobject.style.height)?parseInt(pobject.style.height):250;if(type!=1){var pixel=100;}else{var pixel=-100;}var new_height=current_height+pixel;if(new_height>=150){pobject.style.height=new_height+"px";var adjust_height_id=String(new_height/2);if(parseInt(parseInt(adjust_height_id.substring(adjust_height_id.length-2, adjust_height_id.length))/50)==1){if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){document.getElementsByTagName("html")[0].style.filter="none";}else{var screen_object=document.getElementsByTagName("body")[0];screen_object.style.opacity=1.01;screen_object.style.KhtmlOpacity=1.01;screen_object.style.MozOpacity=1.01;}}else{if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){document.getElementsByTagName("html")[0].style.filter='';}else{var screen_object=document.getElementsByTagName("body")[0];screen_object.style.opacity=1.0;screen_object.style.KhtmlOpacity=1.0;screen_object.style.MozOpacity=1.0;}}}}return false;}function insert_prompt(type, fobject){if(document.getElementById("insertobj").value==0){if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){var selection=document.selection.createRange();var selected_text=selection.text;}else{var selected_text=(fobject.value).substring(fobject.selectionStart,(fobject.selectionEnd<=0?fobject.textLength:fobject.selectionEnd));}if(selected_text.length>0){if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){if(type==0){if(is_valid_string(selected_text, "url")){setup_bbcode("[img]"+selected_text+"[/img]", '', fobject, false, false, false);}else{var image=window.prompt("Enter the complete URL for the image", "http://");if((image!="http://")&&(image!=undefined)){setup_bbcode("[img]"+image+"[/img]", '', fobject, false, false, false);}else{alert("You must enter a URL");}}}else if(type==1){if(is_valid_string(selected_text, "url")){var title=window.prompt("Enter the title of the webpage", "My Webpage");if((title!="My Webpage")&&(title!=undefined)){setup_bbcode("[url="+selected_text+"]"+title+"[/url]", '', fobject, false, false, false);}else{alert("You must enter a title of the webpage");}}else{var url=window.prompt("Enter the complete URL for the hyperlink", "http://");if((url!="http://")&&(url!=undefined)){var title=window.prompt("Enter the title of the webpage", "My Webpage");if((title!="My Webpage")&&(title!=undefined)){setup_bbcode("[url="+url+"]"+title+"[/url]", '', fobject, false, false, false);}else{alert("You must enter a title of the webpage");}}else{alert("You must enter a URL");}}}else if(type==2){if(is_valid_string(selected_text, "email")){setup_bbcode("[email]"+selected_text+"[/email]", '', fobject, false, false, false);}else{var email=window.prompt("Enter the e-mail address", '');if((email!='')&&(email!=undefined)){setup_bbcode("[email]"+email+"[/email]", '', fobject, false, false, false);}else{alert("You must enter an e-mail address");}}}}else if(fobject.selectionEnd){if(type==0){if(is_valid_string(selected_text, "url")){setup_bbcode("[img]"+selected_text+"[/img]", '', fobject, false, false, true);}else{var image=window.prompt("Enter the complete URL for the image", "http://");if((image!="http://")&&(image!=undefined)){setup_bbcode("[img]"+image+"[/img]", '', fobject, false, false, false);}else{alert("You must enter a URL");}}}else if(type==1){if(is_valid_string(selected_text, "url")){var title=window.prompt("Enter the title of the webpage", "My Webpage");if((title!="My Webpage")&&(title!=undefined)){setup_bbcode("[url="+selected_text+"]"+title+"[/url]", '', fobject, false, false, true);}else{alert("You must enter a title of the webpage");}}else{var url=window.prompt("Enter the complete URL for the hyperlink", "http://");if((url!="http://")&&(url!=undefined)){var title=window.prompt("Enter the title of the webpage", "My Webpage");if((title!="My Webpage")&&(title!=undefined)){setup_bbcode("[url="+url+"]"+title+"[/url]", '', fobject, false, false, false);}else{alert("You must enter a title of the webpage");}}else{alert("You must enter a URL");}}}else if(type==2){if(is_valid_string(selected_text, "email")){setup_bbcode("[email]"+selected_text+"[/email]", '', fobject, false, false, true);}else{var email=window.prompt("Enter the e-mail address", '');if((email!='')&&(email!=undefined)){setup_bbcode("[email]"+email+"[/email]", '', fobject, false, false, false);}else{alert("You must enter an e-mail address");}}}}}else{if(type==0){var image=window.prompt("Enter the complete URL for the image", "http://");if((image!="http://")&&(image!=undefined)){setup_bbcode("[img]"+image+"[/img]", '', fobject, false, false, false);}else{alert("You must enter a URL");}}else if(type==1){var url=window.prompt("Enter the complete URL for the hyperlink", "http://");if((url!="http://")&&(url!=undefined)){var title=window.prompt("Enter the title of the webpage", "My Webpage");if((title!="My Webpage")&&(title!=undefined)){setup_bbcode("[url="+url+"]"+title+"[/url]", '', fobject, false, false, false);}else{alert("You must enter a title of the webpage");}}else{alert("You must enter a URL");}}else if(type==2){var email=window.prompt("Enter the e-mail address", '');if((email!='')&&(email!=undefined)){setup_bbcode("[email]"+email+"[/email]", '', fobject, false, false, false);}else{alert("You must enter an e-mail address");}}}}return false;}function insert_fonttype(tagname, tagvalue, pobject, fobject, mobject){if(document.getElementById("insertobj").value==0){if(tagvalue!=-1){if(tagvalue!='custom'){setup_bbcode("["+tagname+"="+tagvalue+"]", "[/"+tagname+"]", fobject, false, mobject, false);pobject.selectedIndex=0;}else{var font_type='';switch(tagname){case 'font':font_type='family';break;case 'size':font_type='size';break;case 'color':font_type='color';break;default:font_type='family';break;}pobject.selectedIndex=0;var custom_font=window.prompt("Enter the font "+font_type, '');if((custom_font!='')&&(custom_font!=undefined)){switch(font_type){case 'size':if(is_valid_string(custom_font, "number")){setup_bbcode("["+tagname+"="+parseInt(custom_font.substring(0, 2))+"]", "[/"+tagname+"]", fobject, false, mobject, false);}else{alert("You must enter the font-size with number only!");}break;case 'color':if(is_valid_string(custom_font, "hexadecimal")){if(custom_font.length<6){alert("You must enter a valid font-color");}else{custom_font=custom_font.substring(0, 6).toLowerCase();if(custom_font.indexOf("#")==-1){setup_bbcode("["+tagname+"=#"+custom_font+"]", "[/"+tagname+"]", fobject, false, mobject, false);}else{setup_bbcode("["+tagname+"="+custom_font+"]", "[/"+tagname+"]", fobject, false, mobject, false);}}}else{setup_bbcode("["+tagname+"="+custom_font+"]", "[/"+tagname+"]", fobject, false, mobject, false);}break;default:setup_bbcode("["+tagname+"="+custom_font+"]", "[/"+tagname+"]", fobject, false, mobject, false);break;}}else{alert("You must enter the font-"+font_type);}}}else{pobject.selectedIndex=0;}}else{pobject.selectedIndex=0;}}function insert_bbcode(tagname, pobject, fobject, mobject){var insertobj=document.getElementById("insertobj").value;if((pobject.background!=undefined)&&(pobject.background!='')){if(insertobj!=1){setup_bbcode("[/"+tagname+"]", '', fobject, pobject, mobject, false);setup_tagclose("[/"+tagname+"]", 1, mobject);}}else{if(insertobj!=1){switch(tagname){case 'hide':setup_bbcode("["+tagname+"="+String("0x"+String(uniqid()).substring(5, 11))+"]", "[/"+tagname+"]", fobject, pobject, mobject, false);break;case 'list':if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){var selection=document.selection.createRange();var selected_text=selection.text;}else{var selected_text=(fobject.value).substring(fobject.selectionStart,(fobject.selectionEnd<=0?fobject.textLength:fobject.selectionEnd));}if(selected_text.length>0){if((selected_text.indexOf("[list]")==-1)&&(selected_text.indexOf("[/list]")==-1)){var new_insert_text='';var split_new_line_array=selected_text.split("\n");for(int=0;int0){new_insert_text+="[*]"+split_new_line_array[int]+"\n";}}setup_bbcode("["+tagname+"]\n"+new_insert_text, "[/"+tagname+"]", fobject, pobject, mobject, true);}else{setup_bbcode("["+tagname+"]\n"+selected_text, "[/"+tagname+"]", fobject, pobject, mobject, true);}}else{setup_bbcode("["+tagname+"]\n", '', fobject, false, false, false);insert_list_item(fobject, tagname);}break;default:setup_bbcode("["+tagname+"]", "[/"+tagname+"]", fobject, pobject, mobject, false);break;}}}return false;}function insert_list_item(fobject, tagname){var list_item=window.prompt("Enter a list item", '');if((list_item!='')&&(list_item!=undefined)){setup_bbcode("[*]"+list_item+"\n", '', fobject, false, false, false);insert_list_item(fobject, tagname);}else{setup_bbcode("[/"+tagname+"]", '', fobject, false, false, false);}}function insert_emotion(data, fobject){if(window.parent.document.getElementById("insertobj")){var insertobj=window.parent.document.getElementById("insertobj").value;}else{var insertobj=document.getElementById("insertobj").value;}if(insertobj!=1){if(data.length>0){window.parent.setup_bbcode(" "+data+" ", '', fobject, false, false, false);}}return false;}function bbcode_button_highlight(name, mode){if(document.getElementById("insertobj").value==0){var mode=mode==false?0:mode;var highlight_obj=document.getElementById("do_highlight_"+name);switch(mode){case 0:highlight_obj.background='';break;case 1:highlight_obj.background=theme_path+"/images/posting_open_background.gif";break;}}}function closeall_tag(aobject, mobject){if(document.getElementById("insertobj").value==0){aobject.focus();var memo_tagclosed=mobject.value;if(memo_tagclosed.length>3){var memo_array=memo_tagclosed.split("|");for(int=0;int=4)&&(global__is_internet_explorer)&&(global__is_windows)){if(!(is_insert_selected_text)){is_insert_selected_text=false;}if(fobject.isTextEdit){fobject.focus();var is_emotion=false;var selection=document.selection;var range=ie_range_cache?ie_range_cache:selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText(fobject);stored_range.setEndPoint("EndToEnd", range);fobject.selectionStart=stored_range.text.length-range.text.length;fobject.selectionEnd=fobject.selectionStart+range.text.length;if(((selection.type=="Text")||(selection.type=="None"))&&(range!=null)){if((closetag!='')&&(range.text)&&(range.text.length>0)){if(is_insert_selected_text){opentag+=closetag;}else{opentag+=range.text+closetag;}}if((opentag.substring(0, 2)==" :")&&(opentag.substring((opentag.length-2), opentag.length)==": ")){opentag+=range.text;is_emotion=true;}if(opentag.indexOf(closetag)==-1){setup_tageffect(0, pobject);setup_tagclose(closetag, 0, mobject);}else{setup_tageffect(1, pobject);setup_tagclose(closetag, 1, mobject);}range.text=opentag;if((fobject.selectionEnd-fobject.selectionStart)>0){if(is_emotion==false){var last_select_range=fobject.createTextRange();if(last_select_range.findText(opentag)){last_select_range.select();}}}}else{fobject.value+=opentag;}}else{fobject.value+=opentag;}ie_range_cache=null;}else if(fobject.selectionEnd){fobject.focus();if(!(is_insert_selected_text)){is_insert_selected_text=false;}var selectstart=fobject.selectionStart;var selectend=fobject.selectionEnd;var scrolltop=fobject.scrollTop;if(selectend<=0){selectend=fobject.textLength;}var start=(fobject.value).substring(0, selectstart);var middle=(fobject.value).substring(selectstart, selectend);var end=(fobject.value).substring(selectend, fobject.textLength);if(is_insert_selected_text){if(closetag.length>0){middle=opentag+closetag;}else{middle=opentag;}}else{if(fobject.selectionEnd-fobject.selectionStart>0){middle=opentag+middle+closetag;}else{middle=opentag+middle;if(middle.indexOf(closetag)==-1){setup_tagclose(closetag, 0, mobject);setup_tageffect(0, pobject);}else{setup_tagclose(closetag, 1, mobject);setup_tageffect(1, pobject);}}}fobject.value=start+middle+end;var cposition=selectstart+(middle.length);fobject.selectionStart=cposition;fobject.selectionEnd=cposition;fobject.scrollTop=scrolltop;}else{setup_tagclose(closetag, 0, mobject);setup_tageffect(0, pobject);fobject.value+=opentag;}}function setup_tagclose(data, type, mobject){if(data.length>3){var memo_closetag=mobject.value;if(type!=1){mobject.value=data+"|"+memo_closetag;}else{var break_array=0;var memo_array=memo_closetag.split("|");for(int=0;int="0"&&checkstring<="9"){}else{return false;}}else if(type=="hexadecimal"){if((checkstring>="0"&&checkstring<="9")||(checkstring>="a"&&checkstring<="f")||(checkstring>="A"&&checkstring<="F")){}else{return false;}}else if(type=="id"){if((checkstring>="a"&&checkstring<="z")||(checkstring>="A"&&checkstring<="Z")||(checkstring>="0"&&checkstring<="9")||(checkstring=="_")){}else{return false;}}else if(type=="password"){if((checkstring>="a"&&checkstring<="z")||(checkstring>="A"&&checkstring<="Z")||(checkstring>="0"&&checkstring<="9")){}else{return false;}}else if(type=="email"){if((checkstring>="a"&&checkstring<="z")||(checkstring>="A"&&checkstring<="Z")||(checkstring>="0"&&checkstring<="9")||(checkstring=="_")||(checkstring=="@")||(checkstring=="-")||(checkstring==".")){}else{return false;}}else if(type=="url"){if((checkstring>="a"&&checkstring<="z")||(checkstring>="A"&&checkstring<="Z")||(checkstring>="0"&&checkstring<="9")||(checkstring=="_")||(checkstring=="-")||(checkstring==".")||(checkstring==":")||(checkstring=="/")||(checkstring=="?")||(checkstring=="=")||(checkstring=="&")||(checkstring=="#")||(checkstring=="%")){}else{return false;}}else if(type=="time"){if((checkstring>="0"&&checkstring<="9")||(checkstring=="-")||(checkstring==":")||(checkstring==" ")){}else{return false;}}}return true;}function check_registration(){var userid=document.RegisterForm.userid.value;var password=document.RegisterForm.password.value;var repassword=document.RegisterForm.repassword.value;var slspassword=document.RegisterForm.slspassword.value;var reslspassword=document.RegisterForm.reslspassword.value;var email=document.RegisterForm.email.value;var securecode=document.RegisterForm.securecode.value;if(userid.length<4){alert("Please enter id at least 4 characters");document.RegisterForm.userid.focus();return false;}else if(!(is_valid_string(userid, "id"))){alert("Please enter id with characters A-Z 0-9 _");document.RegisterForm.userid.focus();return false;}else if(password.length<4){alert("Please enter password at least 4 characters");document.RegisterForm.password.focus();return false;}else if(!(is_valid_string(password, "password"))){alert("Please enter password with characters A-Z 0-9");document.RegisterForm.password.focus();return false;}else if(repassword.length<4){alert("Please enter password at least 4 characters");document.RegisterForm.repassword.focus();return false;}else if(!(is_valid_string(repassword, "password"))){alert("Please enter password with characters A-Z 0-9");document.RegisterForm.repassword.focus();return false;}else if(password!=repassword){alert("The password and retry password must be the same");document.RegisterForm.password.focus();return false;}else if(slspassword.length<4){alert("Please enter SLS password at least 4 characters");document.RegisterForm.slspassword.focus();return false;}else if(!(is_valid_string(slspassword, "password"))){alert("Please enter SLS password with characters A-Z 0-9");document.RegisterForm.slspassword.focus();return false;}else if(reslspassword.length<4){alert("Please enter SLS password at least 4 characters");document.RegisterForm.reslspassword.focus();return false;}else if(!(is_valid_string(reslspassword, "password"))){alert("Please enter SLS password with characters A-Z 0-9");document.RegisterForm.reslspassword.focus();return false;}else if(slspassword!=reslspassword){alert("The SLS password and retry SLS password must be the same");document.RegisterForm.slspassword.focus();return false;}else if(password==slspassword){alert("The password and SLS password must not the same");document.RegisterForm.slspassword.focus();return false;}else if((email.length<12)||(email.indexOf("@")==-1)||(email.indexOf(".")==-1)){alert("Please enter a valid e-mail address");document.RegisterForm.email.focus();return false;}else if(!(is_valid_string(email, "email"))){alert("Please enter e-mail address with characters A-Z 0-9 _ - @ .");document.RegisterForm.email.focus();return false;}else if((securecode.length<6)||(!(is_valid_string(securecode, "number")))){alert("Please enter security-code at least 6 characters and enter with characters 0-9");document.RegisterForm.securecode.focus();return false;}else{document.RegisterForm.submit.disabled=true;return true;}}function check_change_password(){var oldpass=document.ChangePassForm.oldpass.value;var newpass=document.ChangePassForm.newpass.value;var renewpass=document.ChangePassForm.renewpass.value;if(oldpass.length<4){alert("Please enter old password at least 4 characters");document.ChangePassForm.oldpass.focus();return false;}else if(!(is_valid_string(oldpass, "password"))){alert("Please enter old password with characters A-Z 0-9");document.ChangePassForm.oldpass.focus();return false;}else if(newpass.length<4){alert("Please enter new-password at least 4 characters");document.ChangePassForm.newpass.focus();return false;}else if(!(is_valid_string(newpass, "password"))){alert("Please enter new password with characters A-Z 0-9");document.ChangePassForm.newpass.focus();return false;}else if(renewpass.length<4){alert("Please enter new-password at least 4 characters");document.ChangePassForm.renewpass.focus();return false;}else if(!(is_valid_string(renewpass, "password"))){alert("Please enter new password with characters A-Z 0-9");document.ChangePassForm.renewpass.focus();return false;}else if(newpass!=renewpass){alert("The new password and retry new password must be the same");document.ChangePassForm.newpass.focus();return false;}else if(oldpass==newpass){alert("The old password and new password must not the same");document.ChangePassForm.newpass.focus();return false;}else{document.ChangePassForm.submit.disabled=true;return true;}}function check_change_sls_password(){var oldlockpass=document.ChangeLockPassForm.oldlockpass.value;var newlockpass=document.ChangeLockPassForm.newlockpass.value;var renewlockpass=document.ChangeLockPassForm.renewlockpass.value;if(oldlockpass.length<4){alert("Please enter old SLS password at least 4 characters");document.ChangeLockPassForm.oldlockpass.focus();return false;}else if(!(is_valid_string(oldlockpass, "password"))){alert("Please enter old SLS password with characters A-Z 0-9");document.ChangeLockPassForm.oldlockpass.focus();return false;}else if(newlockpass.length<4){alert("Please enter new SLS password at least 4 characters");document.ChangeLockPassForm.newlockpass.focus();return false;}else if(!(is_valid_string(newlockpass, "password"))){alert("Please enter new SLS password with characters A-Z 0-9");document.ChangeLockPassForm.newlockpass.focus();return false;}else if(renewlockpass.length<4){alert("Please enter new SLS password at least 4 characters");document.ChangeLockPassForm.renewlockpass.focus();return false;}else if(!(is_valid_string(renewlockpass, "password"))){alert("Please enter new SLS password with characters A-Z 0-9");document.ChangeLockPassForm.renewlockpass.focus();return false;}else if(newlockpass!=renewlockpass){alert("The new SLS password and retry new SLS password must be the same");document.ChangeLockPassForm.newlockpass.focus();return false;}else if(oldlockpass==newlockpass){alert("The old SLS password and new SLS password must not the same");document.ChangeLockPassForm.newlockpass.focus();return false;}else{document.ChangeLockPassForm.submit.disabled=true;return true;}}function check_change_email(){var oldemail=document.ChangeEmailForm.oldemail.value;var newemail=document.ChangeEmailForm.newemail.value;var renewemail=document.ChangeEmailForm.renewemail.value;if((oldemail.length<12)||(oldemail.indexOf("@")==-1)||(oldemail.indexOf(".")==-1)){alert("Please enter a valid old e-mail address");document.ChangeEmailForm.oldemail.focus();return false;}else if(!(is_valid_string(oldemail, "email"))){alert("Please enter old e-mail with characters A-Z 0-9 _ - @ .");document.ChangeEmailForm.oldemail.focus();return false;}else if((newemail.length<12)||(newemail.indexOf("@")==-1)||(newemail.indexOf(".")==-1)){alert("Please enter a valid new e-mail address");document.ChangeEmailForm.newemail.focus();return false;}else if(!(is_valid_string(newemail, "email"))){alert("Please enter new e-mail with characters A-Z 0-9 _ - @ .");document.ChangeEmailForm.newemail.focus();return false;}else if((renewemail.length<12)||(renewemail.indexOf("@")==-1)||(renewemail.indexOf(".")==-1)){alert("Please enter a valid new e-mail address");document.ChangeEmailForm.renewemail.focus();return false;}else if(!(is_valid_string(renewemail, "email"))){alert("Please enter new e-mail with characters A-Z 0-9 _ - @ .");document.ChangeEmailForm.renewemail.focus();return false;}else if(newemail!=renewemail){alert("The new e-mail and retry new e-mail must be the same");document.ChangeEmailForm.newemail.focus();return false;}else if(oldemail==newemail){alert("The old e-mail and new e-mail must not the same");document.ChangeEmailForm.newemail.focus();return false;}else{document.ChangeEmailForm.submit.disabled=true;return true;}}function check_update_sls_status(){var slspassword=document.SLSStatusForm.slspassword.value;if(slspassword.length<4){alert("Please enter SLS password at least 4 characters");document.SLSStatusForm.slspassword.focus();return false;}else if(!(is_valid_string(slspassword, "password"))){alert("Please enter SLS password with characters A-Z 0-9");document.SLSStatusForm.slspassword.focus();return false;}else{document.SLSStatusForm.submit.disabled=true;return true;}}function check_postdata(){var selected_code=document.PostMemoForm.memo_selectedcode.value;if(max_message_length<=0){max_message_length=20000;}if(selected_code=="01"){var title=document.PostActionForm.ptitle.value;var message=document.PostActionForm.pmessage.value;if(title.length<4){alert("Please enter topic-title at least 4 characters");document.PostActionForm.ptitle.focus();return false;}else if((message.length<4)||(message.length>max_message_length)){alert("Please enter message between 4 - "+max_message_length+" characters");document.PostActionForm.pmessage.focus();return false;}}else if(selected_code=="02"){var title=document.PostActionForm.ptitle.value;var polltitle=document.PostActionForm.ppolltitle.value;var pollchoice=document.PostActionForm.ppollchoice.value;var message=document.PostActionForm.pmessage.value;if(title.length<4){alert("Please enter topic-title at least 4 characters");document.PostActionForm.ptitle.focus();return false;}else if(polltitle.length<4){alert("Please enter poll-title at least 4 characters");document.PostActionForm.ppolltitle.focus();return false;}else if(pollchoice.length<1){alert("Please enter poll-choice at least 1 choice and 1 character");document.PostActionForm.ppollchoice.focus();return false;}else if((message.length<4)||(message.length>max_message_length)){alert("Please enter message between 4 - "+max_message_length+" characters");document.PostActionForm.pmessage.focus();return false;}}else if((selected_code=="03")||(selected_code=="05")){var message=document.PostActionForm.pmessage.value;if((message.length<4)||(message.length>max_message_length)){alert("Please enter message between 4 - "+max_message_length+" characters");document.PostActionForm.pmessage.focus();return false;}}else if(selected_code=="04"){var edit_topic_data_type=document.PostActionForm.edit_topic_data_type.value;var message=document.PostActionForm.pmessage.value;if(edit_topic_data_type==1){var title=document.PostActionForm.ptitle.value;}if((edit_topic_data_type==1)&&(title.length<4)){alert("Please enter topic-title at least 4 characters");document.PostActionForm.ptitle.focus();return false;}else if((message.length<4)||(message.length>max_message_length)){alert("Please enter message between 4 - "+max_message_length+" characters");document.PostActionForm.pmessage.focus();return false;}}document.PostActionForm.submit.disabled=true;return true;}function check_fastreply_data(){if(max_message_length<=0){max_message_length=20000;}var message=document.PostActionForm.pmessage.value;if((message.length<4)||(message.length>max_message_length)){alert("Please enter message between 4 - "+max_message_length+" characters");document.PostActionForm.pmessage.focus();return false;}else{document.PostActionForm.submit.disabled=true;return true;}}function check_changetopicdata(){var tname=document.EditTopicDataForm.tname.value;if(tname.length<4){alert("Please enter topic-title at least 4 characters");document.EditTopicDataForm.tname.focus();return false;}else{document.EditTopicDataForm.submit.disabled=true;return true;}}function check_change_poll_data(){var choice_id=0;var error_focus_type=false;var error_message="Error:\n\n";var total_choice=document.AddAndEditPollForm.ttlc.value;var polltitle=document.AddAndEditPollForm.polltitle.value;if(polltitle.length<4){alert("Please enter poll-title at least 4 characters");document.AddAndEditPollForm.polltitle.focus();return false;}for(int=0;int0)&&(!(is_valid_string(score_data, "number")))){error_message=error_message+" - Please enter poll-score no."+choice_id+" with numbers only - \n";error_focus_type="score:"+int;break;}else{if(choice_data.length<1){error_message=error_message+" - Please enter poll-choice no."+choice_id+" at least 1 character - \n";error_focus_type="choice:"+int;break;}else if(score_data.length<1){error_message=error_message+" - Please enter poll-score no."+choice_id+" at least 1 character - \n";error_focus_type="score:"+int;break;}}}}if(error_focus_type.length>0){alert(error_message);var error_focus_type_array=error_focus_type.split(":");switch(error_focus_type_array[0]){default:case 'choice':document.getElementById("choice_"+error_focus_type_array[1]).focus();break;case 'score':document.getElementById("score_"+error_focus_type_array[1]).focus();break;}return false;}else{document.AddAndEditPollForm.submit.disabled=true;return true;}}function check_new_total_choice(){var new_total_choice=document.ChoiceLimitForm.new_total_choice.value;if(new_total_choice.length<1){alert("Please enter total-choice at least 1 character");document.ChoiceLimitForm.new_total_choice.focus();return false;}else if(!(is_valid_string(new_total_choice, "number"))){alert("Please enter total-choice with numbers only");document.ChoiceLimitForm.new_total_choice.focus();return false;}else{document.ChoiceLimitForm.submit.disabled=true;return true;}}function confirm_clearscore(){if(confirm_with_lockscreen("Are you sure you want to clear score on this poll?")){document.ClearScoreForm.submit.disabled=true;return true;}else{return false;}}function confirm_deletepoll(){if(confirm_with_lockscreen("Are you sure you want to delete this poll?")){document.DeletePollForm.submit.disabled=true;return true;}else{return false;}}function confirm_write_pollform(){if(document.PostActionForm.poll_form_mode.value==0){if((document.PostActionForm.ppolltitle.value.length==0)||(document.PostActionForm.ppollchoice.value.length==0)){if(confirm("Are you sure you want to write a message to poll form?")){document.PostActionForm.poll_form_mode.value=1;return true;}else{return false;}}}return true;}function select_report_board(switchid){var switchid=switchid==false?0:switchid;var select_board_obj=document.SelectReportForm.select_board;switch(switchid){default:case 0:select_board_obj.disabled=true;setTimeout("select_report_board(1)", 500);break;case 1:if(select_board_obj.value=="aldeg"){document.getElementById("aldeg_board").style.display='';document.getElementById("gefg_board").style.display="none";document.getElementById("payg_board").style.display="none";document.getElementById("prtg_board").style.display="none";document.getElementById("schg_board").style.display="none";document.getElementById("arug_board").style.display="none";document.getElementById("novg_board").style.display="none";}else if(select_board_obj.value=="gefg"){document.getElementById("aldeg_board").style.display="none";document.getElementById("gefg_board").style.display='';document.getElementById("payg_board").style.display="none";document.getElementById("prtg_board").style.display="none";document.getElementById("schg_board").style.display="none";document.getElementById("arug_board").style.display="none";document.getElementById("novg_board").style.display="none";}else if(select_board_obj.value=="payg"){document.getElementById("aldeg_board").style.display="none";document.getElementById("gefg_board").style.display="none";document.getElementById("payg_board").style.display='';document.getElementById("prtg_board").style.display="none";document.getElementById("schg_board").style.display="none";document.getElementById("arug_board").style.display="none";document.getElementById("novg_board").style.display="none";}else if(select_board_obj.value=="prtg"){document.getElementById("aldeg_board").style.display="none";document.getElementById("gefg_board").style.display="none";document.getElementById("payg_board").style.display="none";document.getElementById("prtg_board").style.display='';document.getElementById("schg_board").style.display="none";document.getElementById("arug_board").style.display="none";document.getElementById("novg_board").style.display="none";}else if(select_board_obj.value=="schg"){document.getElementById("aldeg_board").style.display="none";document.getElementById("gefg_board").style.display="none";document.getElementById("payg_board").style.display="none";document.getElementById("prtg_board").style.display="none";document.getElementById("schg_board").style.display='';document.getElementById("arug_board").style.display="none";document.getElementById("novg_board").style.display="none";}else if(select_board_obj.value=="arug"){document.getElementById("aldeg_board").style.display="none";document.getElementById("gefg_board").style.display="none";document.getElementById("payg_board").style.display="none";document.getElementById("prtg_board").style.display="none";document.getElementById("schg_board").style.display="none";document.getElementById("arug_board").style.display='';document.getElementById("novg_board").style.display="none";}else if(select_board_obj.value=="novg"){document.getElementById("aldeg_board").style.display="none";document.getElementById("gefg_board").style.display="none";document.getElementById("payg_board").style.display="none";document.getElementById("prtg_board").style.display="none";document.getElementById("schg_board").style.display="none";document.getElementById("arug_board").style.display="none";document.getElementById("novg_board").style.display='';}else{document.getElementById("aldeg_board").style.display='';document.getElementById("gefg_board").style.display='';document.getElementById("payg_board").style.display='';document.getElementById("prtg_board").style.display='';document.getElementById("schg_board").style.display='';document.getElementById("arug_board").style.display='';document.getElementById("novg_board").style.display='';}select_board_obj.disabled=false;break;}return false;}function increase_content_height(int){if(int<900){int=900;}document.getElementById("main_contents").style.height=int+"px";if(document.getElementById("menu_contents")){document.getElementById("menu_contents").style.height=int+"px";}stop_loading_screen();}function check_charladder(){var value=document.CharacterLadderForm.value.value;var type=document.CharacterLadderForm.type.value;if((type!="all")&&(type!="class")&&(type!="gender_male")&&(type!="gender_female")&&(type!="status_online")&&(type!="status_offline")){if(value.length<1){alert("Please enter keyword at least 1 character");document.CharacterLadderForm.value.focus();return false;}else if(((type=="base_level")||(type=="job_level"))&&(value.length>0)&&(!(is_valid_string(value, "number")))){alert("Please enter keyword with number only!");document.CharacterLadderForm.value.focus();return false;}else{document.CharacterLadderForm.submit.disabled=true;return true;}}else{document.CharacterLadderForm.submit.disabled=true;return true;}}function check_guildladder(){var value=document.GuildLadderForm.value.value;var type=document.GuildLadderForm.type.value;if(type!="all"){if(value.length<1){alert("Please enter keyword at least 1 character");document.GuildLadderForm.value.focus();return false;}else if(((type=="guild_level")||(type=="average_level")||(type=="max_member"))&&(value.length>1)&&(!(is_valid_string(value, "number")))){alert("Please enter keyword with number only!");document.GuildLadderForm.value.focus();return false;}else{document.GuildLadderForm.submit.disabled=true;return true;}}else{document.GuildLadderForm.submit.disabled=true;return true;}}function check_homunladder(){var value=document.HomunculusLadderForm.value.value;var type=document.HomunculusLadderForm.type.value;if((type!="all")&&(type!="class")&&(type!="is_alive")&&(type!="is_vaporize")){if(value.length<1){alert("Please enter keyword at least 1 character");document.HomunculusLadderForm.value.focus();return false;}else if((type=="homunculus_level")&&(value.length>0)&&(!(is_valid_string(value, "number")))){alert("Please enter keyword with number only!");document.HomunculusLadderForm.value.focus();return false;}else{document.HomunculusLadderForm.submit.disabled=true;return true;}}else{document.HomunculusLadderForm.submit.disabled=true;return true;}}function init_guildladder_selecttype(){var value=document.GuildLadderForm.value.value;var type=document.GuildLadderForm.type.value;switch(type){case 'all':document.GuildLadderForm.value.disabled=true;document.GuildLadderForm.ctype.disabled=true;break;case 'guild_name':case 'guild_master':document.GuildLadderForm.value.disabled=false;document.GuildLadderForm.ctype.disabled=false;break;case 'guild_level':case 'average_level':case 'max_member':document.GuildLadderForm.value.disabled=false;document.GuildLadderForm.ctype.disabled=true;break;}}function init_charladder_selecttype(){var value=document.CharacterLadderForm.value.value;var type=document.CharacterLadderForm.type.value;switch(type){case 'all':case 'gender_male':case 'gender_female':case 'status_online':case 'status_offline':document.CharacterLadderForm.value.disabled=true;document.CharacterLadderForm.ctype.disabled=true;document.CharacterLadderForm.class_id.disabled=true;break;case 'char_name':case 'party_name':case 'guild_name':document.CharacterLadderForm.value.disabled=false;document.CharacterLadderForm.ctype.disabled=false;document.CharacterLadderForm.class_id.disabled=true;break;case 'class':document.CharacterLadderForm.value.disabled=true;document.CharacterLadderForm.ctype.disabled=true;document.CharacterLadderForm.class_id.disabled=false;break;case 'base_level':case 'job_level':document.CharacterLadderForm.value.disabled=false;document.CharacterLadderForm.ctype.disabled=true;document.CharacterLadderForm.class_id.disabled=true;break;}}function init_homunladder_selecttype(){var value=document.HomunculusLadderForm.value.value;var type=document.HomunculusLadderForm.type.value;switch(type){case 'all':case 'is_alive':case 'is_vaporize':document.HomunculusLadderForm.value.disabled=true;document.HomunculusLadderForm.ctype.disabled=true;document.HomunculusLadderForm.class_id.disabled=true;break;case 'homunculus_name':case 'master_name':document.HomunculusLadderForm.value.disabled=false;document.HomunculusLadderForm.ctype.disabled=false;document.HomunculusLadderForm.class_id.disabled=true;break;case 'class':document.HomunculusLadderForm.value.disabled=true;document.HomunculusLadderForm.ctype.disabled=true;document.HomunculusLadderForm.class_id.disabled=false;break;case 'homunculus_level':document.HomunculusLadderForm.value.disabled=false;document.HomunculusLadderForm.ctype.disabled=true;document.HomunculusLadderForm.class_id.disabled=true;break;}}function init_charladder_select_classtype(){document.CharacterLadderForm.value.disabled=true;document.CharacterLadderForm.ctype.disabled=true;document.CharacterLadderForm.type.selectedIndex=4;}function init_homunladder_select_classtype(){document.HomunculusLadderForm.value.disabled=true;document.HomunculusLadderForm.ctype.disabled=true;document.HomunculusLadderForm.type.selectedIndex=3;}function library_details(name, version, size, state, time){confirm(" - Library File Details:\n\n - Name: "+name+" \n - Version: "+version+" \n - Size: "+size+" \n - Status: "+state+" \n - Last Modified: "+time+" \n");return false;}function avatar_details(){confirm("Details:\n\nPlease type in the direct link to your avatar image.\nAnd the size it should be resized to "+max_avatar_pixel+"x"+max_avatar_pixel+" pixels.\n");}function view_avatar(){var maxpixel=max_avatar_pixel;var source=document.ProfileForm.avatar_source.value;var width=parseInt(document.ProfileForm.avatar_width.value);var height=parseInt(document.ProfileForm.avatar_height.value);if((source.length>0)&&(source.indexOf("\?")==-1)&&(width>0)&&(height>0)){if(width>maxpixel){width=maxpixel;}if(height>maxpixel){height=maxpixel;}window.open(cp_location+"?loadfunc=view_avatar&source="+source+"&width="+width+"&height="+height, "ViewAvatar", "width="+parseInt(width+20)+", height="+parseInt(height+20)+", , resizable=0, scrollbars=0");return true;}else{return false;}}function view_signature(){if(document.getElementById("postcontent").style.display=="none"){document.getElementById("signature_button").disabled=true;setTimeout("document.getElementById('insertobj').value=0", 1000);setTimeout("document.PostActionForm.submit.disabled=false", 1000);setTimeout("document.getElementById('resetform').disabled=false", 1000);setTimeout("document.getElementById('signature_button').disabled=false", 1000);setTimeout("document.getElementById('add_content_height').disabled=false", 1000);setTimeout("document.getElementById('remove_content_height').disabled=false", 1000);setTimeout("document.getElementById('check_post_length').disabled=false", 1000);setTimeout("document.getElementById('delete_all_message').disabled=false", 1000);setTimeout("document.getElementById('postcontent').style.display=''", 1000);setTimeout("document.getElementById('tablecontent').style.display='none'", 1000);}else if(confirm("If you want to view current signature, you need to save it before this action.\nAre you sure you want to view this signature?")){document.getElementById("insertobj").value=1;document.PostActionForm.submit.disabled=true;document.getElementById("resetform").disabled=true;document.getElementById("signature_button").disabled=true;document.getElementById("add_content_height").disabled=true;document.getElementById("remove_content_height").disabled=true;document.getElementById("check_post_length").disabled=true;document.getElementById("delete_all_message").disabled=true;setTimeout("document.getElementById('signature_button').disabled=false", 1000);setTimeout("document.getElementById('postcontent').style.display='none'", 1000);setTimeout("document.getElementById('tablecontent').style.display=''", 1000);}}function check_post_length(){if(max_message_length<=0){max_message_length=20000;}var message=document.PostActionForm.pmessage.value;if(message.length>max_message_length){alert("Please enter message between 0 - "+max_message_length+" characters");document.PostActionForm.pmessage.focus();return false;}else{document.PostActionForm.submit.disabled=true;return true;}}function delete_space_file(id){if(confirm_with_lockscreen("Are you sure you want to delete this file?")){document.getElementById("submit_"+id).disabled=true;return true;}else{return false;}}function check_accountform(){var userid=document.AccountForm.userid.value;var displayname=document.AccountForm.display_name.value;var email=document.AccountForm.email.value;var lastlogin=document.AccountForm.lastlogin.value;var level=document.AccountForm.level.value;var ranking=document.AccountForm.ranking.value;var lastip=document.AccountForm.last_ip.value;if((userid.length<4)||(!(is_valid_string(userid, "id")))){alert("Please enter a valid account-id");document.AccountForm.userid.focus();return false;}else if(displayname.length<1){alert("Please enter display name at least 1 characters");document.AccountForm.display_name.focus();return false;}else if((email.length<12)||(email.indexOf("@")==-1)||(email.indexOf(".")==-1)){alert("Please enter a valid e-mail address");document.AccountForm.email.focus();return false;}else if(!(is_valid_string(email, "email"))){alert("Please enter e-mail with characters A-Z 0-9 _ - @ .");document.AccountForm.email.focus();return false;}else if(lastlogin.length<19){alert("Please enter a valid last login");document.AccountForm.lastlogin.focus();return false;}else if(level.length<1){alert("Please enter command level at least 1 character");document.AccountForm.level.focus();return false;}else if(!(is_valid_string(level, "number"))){alert("Please enter command level with number only!");document.AccountForm.level.focus();return false;}else if(ranking.length<1){alert("Please enter ranking at least 1 character");document.AccountForm.ranking.focus();return false;}else if(!(is_valid_string(ranking, "number"))){alert("Please enter ranking with number only!");document.AccountForm.ranking.focus();return false;}else if((lastip.length<7)&&(email.indexOf(".")==-1)){alert("Please enter a valid last ip");document.AccountForm.last_ip.focus();return false;}else if(confirm_with_lockscreen("Are you sure you want to save this account?")){document.AccountForm.submit.disabled=true;return true;}else{return false;}}function check_search_accountform(){var keyword=document.SearchAccountForm.keyword.value;if(keyword.length<1){alert("Please enter keyword at least 1 character");document.SearchAccountForm.keyword.focus();return false;}else{document.SearchAccountForm.submit.disabled=true;return true;}}function confirm_send_activate_mail(url){if(confirm_with_lockscreen("Are you sure you want to send activation e-mail?")){document.getElementById("send_activate_mail").disabled=true;window.location.href=url;}}function confirm_delete_account(url){if(confirm_with_lockscreen("Are you sure you want to delete this account?")){document.getElementById("delete_account").disabled=true;window.location.href=url;}}function select_announce_type(){var type=document.SelectAnnounceTypeForm.type.value;if(type.length>0){window.location.href=cp_location+"?acp=true&module=announce_manage&type="+type;}}function confirm_delete_announce(){if(confirm_with_lockscreen("Are you sure you want to delete this announcement?")){document.DeleteAnnounceForm.submit.disabled=true;return true;}else{return false;}}function check_announceform(){if(max_message_length<=0){max_message_length=20000;}var message=document.PostActionForm.pmessage.value;var type=document.PostActionForm.confirm_type.value;switch(type){case 'add_announce':case 'edit_announce':var subject=document.PostActionForm.subject.value;if(subject.length<1){alert("Please enter subject at least 1 character");document.PostActionForm.subject.focus();return false;}else if((message.length<1)||(message.length>max_message_length)){alert("Please enter message between 1 - "+max_message_length+" characters");document.PostActionForm.pmessage.focus();return false;}else{document.PostActionForm.submit.disabled=true;return true;}break;case 'update_welcome_message':if((message.length<1)||(message.length>max_message_length)){alert("Please enter message between 1 - "+max_message_length+" characters");document.PostActionForm.pmessage.focus();return false;}else{document.PostActionForm.submit.disabled=true;return true;}break;}}function select_edit_categoryid(){var category_id=document.LoadCategoryDataForm.category_id.value;if(category_id.length>0){window.location.href=cp_location+"?acp=true&module=category_and_forum_manage&category_id="+category_id;}}function select_edit_forumid(){var forum_id=document.LoadForumDataForm.forum_id.value;if(forum_id.length>0){window.location.href=cp_location+"?acp=true&module=category_and_forum_manage&forum_id="+forum_id;}}function check_addcategoryform(){var name=document.AddCategoryForm.add_category_name.value;if(name.length<4){alert("Please enter category-name at least 4 character");document.AddCategoryForm.add_category_name.focus();return false;}else{document.AddCategoryForm.submit.disabled=true;return true;}}function check_addforumform(){var name=document.AddForumForm.add_forum_name.value;var description=document.AddForumForm.add_forum_description.value;var is_redirect=document.AddForumForm.add_is_redirect[0].checked;var redirect_address=document.AddForumForm.add_redirect_address.value;if(parseInt(max_message_length/10)<=0){max_message_length=2000;}if(name.length<4){alert("Please enter forum-name at least 4 character");document.AddForumForm.add_forum_name.focus();return false;}else if(description.length>max_message_length){alert("Please enter forum-description between 0 - "+max_message_length+" characters");document.AddForumForm.add_forum_description.focus();return false;}else if((is_redirect)&&(redirect_address.length<=0)){alert("Please enter a valid redirect address");document.AddForumForm.add_redirect_address.focus();return false;}else{document.AddForumForm.submit.disabled=true;return true;}}function check_editcategoryform(){var name=document.EditCategoryForm.edit_category_name.value;if(name.length<4){alert("Please enter category-name at least 4 character");document.EditCategoryForm.edit_category_name.focus();return false;}else{document.EditCategoryForm.submit.disabled=true;return true;}}function check_editforumform(){var name=document.EditForumForm.edit_forum_name.value;var description=document.EditForumForm.edit_forum_description.value;var is_redirect=document.EditForumForm.edit_is_redirect[0].checked;var redirect_address=document.EditForumForm.edit_redirect_address.value;if(parseInt(max_message_length/10)<=0){max_message_length=2000;}if(name.length<4){alert("Please enter forum-name at least 4 character");document.EditForumForm.edit_forum_name.focus();return false;}else if(description.length>max_message_length){alert("Please enter forum-description between 0 - "+max_message_length+" characters");document.EditForumForm.edit_forum_description.focus();return false;}else if((is_redirect)&&(redirect_address.length<=0)){alert("Please enter a valid redirect address");document.EditForumForm.edit_redirect_address.focus();return false;}else{document.EditForumForm.submit.disabled=true;return true;}}function confirm_delete_category(){if(confirm_with_lockscreen("Are you sure you want to delete this category?")){document.DeleteCategoryForm.submit.disabled=true;return true;}else{return false;}}function confirm_delete_forum(){if(confirm_with_lockscreen("Are you sure you want to delete this forum?")){document.DeleteForumForm.submit.disabled=true;return true;}else{return false;}}function select_edit_addonid(){var id=document.LoadAddonDataForm.id.value;if(id.length>0){window.location.href=cp_location+"?acp=true&module=addon_manage&id="+id;}}function check_addaddonform(){var key=document.AddAddonForm.add_addon_key.value;var name=document.AddAddonForm.add_addon_name.value;var filename=document.AddAddonForm.add_addon_filename.value;if(key.length<1){alert("Please enter addon-key at least 1 character");document.AddAddonForm.add_addon_key.focus();return false;}else if(!(is_valid_string(key, "id"))){alert("Please enter addon-key with characters A-Z 0-9 _");document.AddAddonForm.add_addon_key.focus();return false;}else if(name.length<1){alert("Please enter addon-name at least 1 character");document.AddAddonForm.add_addon_name.focus();return false;}else if(filename.length<4){alert("Please enter addon-filename at least 4 character");document.AddAddonForm.add_addon_filename.focus();return false;}else{document.AddAddonForm.submit.disabled=true;return true;}}function check_editaddonform(){var key=document.EditAddonForm.edit_addon_key.value;var name=document.EditAddonForm.edit_addon_name.value;var filename=document.EditAddonForm.edit_addon_filename.value;if(key.length<1){alert("Please enter addon-key at least 1 character");document.EditAddonForm.edit_addon_key.focus();return false;}else if(!(is_valid_string(key, "id"))){alert("Please enter addon-key with characters A-Z 0-9 _");document.EditAddonForm.edit_addon_key.focus();return false;}else if(name.length<1){alert("Please enter addon-name at least 1 character");document.EditAddonForm.edit_addon_name.focus();return false;}else if(filename.length<4){alert("Please enter addon-filename at least 4 character");document.EditAddonForm.edit_addon_filename.focus();return false;}else{document.EditAddonForm.submit.disabled=true;return true;}}function confirm_delete_addon(){if(confirm_with_lockscreen("Are you sure you want to delete this addon?")){document.DeleteAddonForm.submit.disabled=true;return true;}else{return false;}}function confirm_edit_configuration_file(){if(confirm_with_lockscreen("Are you sure you want to save configuration file?")){document.ConfigurationForm.submit.disabled=true;return true;}else{return false;}}function make_hide_addon(type){switch(type){case 0:var key_value=document.AddAddonForm.add_addon_key.value;if(document.AddAddonForm.add_hide_addon.checked){if(key_value.length>0){document.AddAddonForm.add_addon_key.value=key_value.toLowerCase();document.AddAddonForm.add_addon_name.value="#"+key_value.toLowerCase()+"#";document.AddAddonForm.add_addon_name.readOnly=true;}else{document.AddAddonForm.add_hide_addon.checked=false;alert("Please enter addon-key at least 1 character");document.AddAddonForm.add_addon_key.focus();return false;}}else{if(key_value.length>0){document.AddAddonForm.add_addon_name.value=key_value;document.AddAddonForm.add_addon_name.readOnly=false;}else{document.AddAddonForm.add_addon_name.value='';document.AddAddonForm.add_addon_name.readOnly=false;}}break;case 1:var key_value=document.EditAddonForm.edit_addon_key.value;if(document.EditAddonForm.edit_hide_addon.checked){if(key_value.length>0){document.EditAddonForm.edit_addon_key.value=key_value.toLowerCase();document.EditAddonForm.edit_addon_name.value="#"+key_value.toLowerCase()+"#";document.EditAddonForm.edit_addon_name.readOnly=true;}else{document.EditAddonForm.edit_hide_addon.checked=false;alert("Please enter addon-key at least 1 character");document.EditAddonForm.edit_addon_key.focus();return false;}}else{if(key_value.length>0){document.EditAddonForm.edit_addon_name.value=key_value;document.EditAddonForm.edit_addon_name.readOnly=false;}else{document.EditAddonForm.edit_addon_name.value='';document.EditAddonForm.edit_addon_name.readOnly=false;}}break;}}function confirm_with_lockscreen(content){switch_lockscreen_mode(true);if(confirm(content)){switch_lockscreen_mode(false);return true;}else{switch_lockscreen_mode(false);return false;}}function switch_lockscreen_mode(mode){if(!(use_new_confirm_style)){use_new_confirm_style=0;}if(use_new_confirm_style>0){var is_enabled=mode==''?false:true;if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){var screen_object=document.getElementsByTagName("html")[0];if(is_enabled==true){screen_object.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity=50,FinishOpacity=0,Style=0,StartX=0,FinishX=100,StartY=0,FinishY=100)";}else{screen_object.style.filter='';}}else{var screen_object=document.getElementsByTagName("body")[0];if(is_enabled==true){screen_object.style.opacity=0.5;screen_object.style.KhtmlOpacity=0.5;screen_object.style.MozOpacity=0.5;}else{screen_object.style.opacity=1.0;screen_object.style.KhtmlOpacity=1.0;screen_object.style.MozOpacity=1.0;}}}}function confirm_thisform(object, content){if(confirm_with_lockscreen(content)){object.disabled=true;return true;}else{return false;}}function switch_update_server_type(mode){var select_update_server_name_object=document.UpdateForm.select_update_server_name;var custom_update_server_name_object=document.UpdateForm.custom_update_server_name;if(!(mode)){var mode=0;}if(mode>0){switch(mode){case 1:default:document.UpdateForm.update_server_type[0].checked=true;break;case 2:document.UpdateForm.update_server_type[1].checked=true;break;}}if(document.UpdateForm.update_server_type[0].checked){if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){select_update_server_name_object.style.color=document.UpdateForm.submit.currentStyle.color;custom_update_server_name_object.style.color="#808080";custom_update_server_name_object.readOnly=true;}else{select_update_server_name_object.disabled=false;custom_update_server_name_object.disabled=true;}}else{if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){select_update_server_name_object.style.color="#808080";custom_update_server_name_object.style.color=document.UpdateForm.submit.currentStyle.color;custom_update_server_name_object.readOnly=false;}else{select_update_server_name_object.disabled=true;custom_update_server_name_object.disabled=false;}}}function check_updateform(){if(document.UpdateForm.update_server_type[1].checked){var custom_update_server_name_object=document.UpdateForm.custom_update_server_name;if(custom_update_server_name_object.value.length<=0){alert("Please enter update-server address");custom_update_server_name_object.focus();return false;}}if(confirm_with_lockscreen("Are you sure you want to check for update?")){setTimeout("document.DisconnectForm.submit.disabled=false", 3000);setTimeout("document.UpdateForm.submit.disabled=false", 3000);setTimeout("document.UpdateForm.reset.disabled=false", 3000);document.DisconnectForm.submit.disabled=true;document.UpdateForm.submit.disabled=true;document.UpdateForm.reset.disabled=true;return true;}else{return false;}}function reset_updateform(){var select_update_server_name_object=document.UpdateForm.select_update_server_name;var custom_update_server_name_object=document.UpdateForm.custom_update_server_name;if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){select_update_server_name_object.style.color=document.UpdateForm.submit.currentStyle.color;custom_update_server_name_object.style.color="#808080";custom_update_server_name_object.readOnly=true;}else{select_update_server_name_object.disabled=false;custom_update_server_name_object.disabled=true;}}function disconnect_update_console(){if(confirm_with_lockscreen("Are you sure you want to disconnect update console?")){var updateform_obj=document.UpdateForm;document.DisconnectForm.submit.disabled=true;if((global__app_version>=4)&&(global__is_internet_explorer)&&(global__is_windows)){updateform_obj.select_update_server_name.style.color=document.UpdateForm.submit.currentStyle.color;updateform_obj.custom_update_server_name.style.color="#808080";updateform_obj.custom_update_server_name.readOnly=true;}else{updateform_obj.select_update_server_name.disabled=false;updateform_obj.custom_update_server_name.disabled=true;}updateform_obj.select_update_server_name.selectedIndex=0;document.UpdateForm.update_server_type[0].checked=true;document.UpdateForm.update_type[0].checked=true;updateform_obj.custom_update_server_name.value='';return true;}else{return false;}}function calculate_transfer_zeny(is_set_timeout, is_click_from_button){var transfer_zeny=document.TransferForm.transfer_zeny.value;var your_total_zeny=parseInt(document.getElementById("ttl_zeny_1").value);var destination_total_zeny=parseInt(document.getElementById("ttl_zeny_2").value);var is_click_from_button=is_click_from_button==''?false:is_click_from_button;var is_set_timeout=is_set_timeout==''?false:is_set_timeout;if(is_set_timeout==true){document.TransferForm.submit.disabled=true;document.getElementById("reset").disabled=true;document.UnsetTransferForm.submit.disabled=true;document.TransferForm.transfer_zeny.readOnly=true;document.getElementById("calculate_button").disabled=true;setTimeout("document.getElementById('calculate_button').disabled=false", 1000);setTimeout("document.TransferForm.transfer_zeny.readOnly=false", 1000);setTimeout("document.UnsetTransferForm.submit.disabled=false", 1000);setTimeout("document.getElementById('reset').disabled=false", 1000);setTimeout("document.TransferForm.submit.disabled=false", 1000);setTimeout("document.TransferForm.transfer_zeny.focus()", 1000);}if(is_valid_string(transfer_zeny, "number")){if(your_total_zeny>0){if(parseInt(transfer_zeny)<=0){document.getElementById("total_zeny").value=destination_total_zeny;return true;}else{if(transfer_zeny.substring(0, 1)==0){document.getElementById("total_zeny").value=destination_total_zeny;document.TransferForm.transfer_zeny.value=0;alert("Please enter a valid transfer-zeny");return false;}else{var duplicate_transfer_zeny=parseInt(transfer_zeny)>your_total_zeny?your_total_zeny:parseInt(transfer_zeny);if((destination_total_zeny+duplicate_transfer_zeny)>1000000000){var complete_calculate_transfer_zeny=(duplicate_transfer_zeny-parseInt((destination_total_zeny+duplicate_transfer_zeny)-1000000000));if(complete_calculate_transfer_zeny>0){document.TransferForm.transfer_zeny.value=complete_calculate_transfer_zeny;document.getElementById("total_zeny").value=1000000000;}return true;}else{if(parseInt(transfer_zeny)>your_total_zeny){document.TransferForm.transfer_zeny.value=your_total_zeny;document.getElementById("total_zeny").value=(your_total_zeny+destination_total_zeny);}else{document.getElementById("total_zeny").value=((parseInt(transfer_zeny)?parseInt(transfer_zeny):0)+destination_total_zeny);}return true;}}}}else{document.TransferForm.transfer_zeny.value=0;return true;}}else{document.getElementById("total_zeny").value=destination_total_zeny;document.TransferForm.transfer_zeny.value=0;alert("Please enter a valid transfer-zeny");return false;}}function confirm_submit_transfer_process(){if(calculate_transfer_zeny(false, false)==true){if(confirm_with_lockscreen("Are you sure you want to continue transfer process?")){document.getElementById("calculate_button").disabled=true;document.TransferForm.transfer_zeny.readOnly=false;document.UnsetTransferForm.submit.disabled=true;document.getElementById("reset").disabled=true;document.TransferForm.submit.disabled=true;return true;}else{return false;}}else{return false;}}function confirm_cancel_transfer_process(){if(confirm_with_lockscreen("Are you sure you want to cancel transfer process?")){var calcute_button_obj=document.getElementById("calculate_button");var transfer_zeny_obj=document.TransferForm.transfer_zeny;var reset_obj=document.getElementById("reset");var submit_obj=document.TransferForm.submit;if(calcute_button_obj.disabled==false){calcute_button_obj.disabled=true;}if(transfer_zeny_obj){transfer_zeny_obj.disabled=true;}if(reset_obj.disabled==false){reset_obj.disabled=true;}if(submit_obj.disabled==false){submit_obj.disabled=true;}document.UnsetTransferForm.submit.disabled=true;return true;}else{return false;}}