var id_checked = false; var g_ml_toggle=false; var g_user_toggle=false; var g_confirm_toggle=false; var g_confirm_detail_toggle=false; var g_group_toggle=false; var g_menu_toggle=false; var g_level_toggle=false; var g_diary_toggle=false; var g_board_toggle=false; var skn = document.getElementById("topdeck"); var mouseX = 0; var mouseY = 0; google_ad_client = "pub-4030665487936281"; google_ad_slot = "0882582772"; google_ad_width = 728; google_ad_height = 90; function OpenPicture(name) { var ImageElement = document.createElement('img'); var Canvas = document.getElementById('pictureCanvas'); var body = document.getElementById('idBody'); body.style.backgroundColor = 'transparent'; body.style.filter = 'alpha(opacity=20)'; ImageElement.setAttribute("src",name); Canvas.appendChild(ImageElement); Canvas.style.position = "absolute"; Canvas.style.textAlign="center"; Canvas.style.top = mouseY+"px"; Canvas.style.left = mouseX + "px"; Canvas.style.cursor = 'pointer'; } function ClosePicture() { var body = document.getElementById('idBody'); body.style.backgroundColor = 'transparent'; body.style.filter = 'alpha(opacity=100)'; var Canvas = document.getElementById('pictureCanvas'); while ( Canvas.firstChild) { Canvas.removeChild(Canvas.firstChild); } } function doSearch() { if(document.search_form) { if(document.search_form.search_category.value == 'google') { window.open('http://www.google.co.kr/search?hl=ko&q='+document.search_form.mainSearchString.value+'&lr=','_google_on'); } else if(document.search_form.search_category.value == 'total') { document.search_form.submit(); } } else { window.alert('Invalid page data'); } } function openRSSPreview(id,btn) { e = document.getElementById(id); btn_e = document.getElementById(btn); if(e.style.height.substr(0,3)=="200") { e.style.height="1"; btn_e.value = "Preview"; } else { e.style.height="200px"; btn_e.value = "Open"; } } function guest_reply(tid) { if(document.guest_write_form) { if(document.guest_write_form.parent_tid.value=="") { window.alert('Enabling reply mode'); document.guest_write_form.parent_tid.value = tid; } else { window.alert('Disabling reply mode'); document.guest_write_form.parent_tid.value = ""; } return true; } else { window.alert('Invalid page data'); return false; } } function insert_image_tag() { if(document.user_new_article_form) { var pid; if(document.user_new_article_form.attach.value.length == 0) { if(document.user_new_article_form.attach_pid.value.length > 0) { pid = document.user_new_article_form.attach_pid.value; } else { window.alert('Invalid attaching'); return false; } } else { pid = Number(document.user_new_article_form.last_pid.value) + 1; } document.user_new_article_form.text.value += "
\n"; return true; } else { window.alert('Invalid page data'); return false; } } function insert_play_tag() { if(document.user_new_article_form) { var pid; if(document.user_new_article_form.attach.value.length == 0) { if(document.user_new_article_form.attach_pid.value.length > 0) { pid = document.user_new_article_form.attach_pid.value; } else { window.alert('Invalid attach'); return false; } } else { pid = Number(document.user_new_article_form.last_pid.value) + 1; } document.user_new_article_form.text.value += "
\n"; return true; } else { window.alert('Invalid page data'); return false; } } function music_play(pid,title,sec) { if(window.top.music_play_flag == 1) { window.top.musiccontrol_window.clearMusic(); } window.top.musiccontrol_window.location.href="/musiccontrol.php?pid="+pid+"&sec="+sec+"&title="+title; return true; } function del_music_item(table_name) { if(document.board_form) { document.board_form.command.value = "remove"; } else { window.alert('Invalid command'); return false; } document.board_form.submit(); return true; } function open_new_window(url) { if(url.substr(0,7) == "cyworld") { tid = url.substr(8,url.length); window.open("http://minihp.cyworld.nate.com/pims/main/pims_main.asp?tid="+tid,"minihp","height=538,width=932,scrollbars=no,resizable=no") } else { window.open(url,'__new'); } } function new_article(table_name) { location.href="main.php?content=user_article&sub_action=new&table_name="+table_name; } function save_schedule() { if(document.manage_schedule_form) { if(document.manage_schedule_form.day.value.length==0) { window.alert('Unavailble "DAY" data'); return false; } if(document.manage_schedule_form.title.value.length==0) { window.alert('Too short title'); return false; } if(document.manage_schedule_form.text.value.length<10) { window.alert('To short contents'); return false; } if(document.manage_schedule_form.attach.value.length == 0 && document.manage_schedule_form.attach_pid.value.length ==0) { if(window.confirm("Attached data is not found. are you sure?") == false) { return false; } } if(document.manage_schedule_form.perm.value.length==0) { window.alert('Invalid permission'); return false; } document.manage_schedule_form.sub_action.value="add_schedule"; document.manage_schedule_form.submit(); } else { window.alert('Invalid page data'); } } function del_diary() { document.manage_diary_form.sub_action.value="del_diary"; document.manage_diary_form.submit(); } function del_morning_letter() { document.manage_morning_letter_form.sub_action.value="del_letter"; document.manage_morning_letter_form.submit(); } function manage_confirm_user_mail() { document.manage_confirm_user_form.sub_action.value="send_mail"; document.manage_confirm_user_form.submit(); } function manage_confirm_user_modify() { document.manage_confirm_user_form.sub_action.value="modify_user"; document.manage_confirm_user_form.submit(); } function manage_confirm_user_del() { document.manage_confirm_user_form.sub_action.value="del_user"; document.manage_confirm_user_form.submit(); } function manage_confirm_user_toggle(amount) { g_confirm_toggle=!g_confirm_toggle; if(document.manage_confirm_user_form) { if(amount == 1) { document.manage_confirm_user_form.sel_id.checked=g_confirm_toggle; } else { for(i=0;i= (dotIndex - 1)) return false; return true; } function check_length(str) { if(str.value.length == 0) return false; return true; } function registering() { if(document.register) { if(id_checked == false) { window.alert('Please check the duplication of ID'); return false; } if(check_length(document.register.uid) == false) { window.alert('User ID is too short'); return false; } if(check_length(document.register.pwd) == false) { window.alert('Password is too short'); return false; } if(document.register.name.value == "") { window.alert('Do you have the name?'); return false; } if(document.register.attach.value == "") { window.alert('Attach is not valid, is it empty?'); return false; } if(check_email(document.register.email)==false) { window.alert('You have to set your email'); return false; } window.top.wait_window = window.open("/wait.php","__wait","scrollbars=no,toolbars=no,resizable=no,width=450,height=200"); document.register.submit(); } else { window.alert('Invalid access'); return false; } } function modify() { if(document.manage_modify_user_form) { if(check_length(document.manage_modify_user_form.pwd) == false) { window.alert('Password is too short'); return false; } if(document.manage_modify_user_form.name.value == "") { window.alert('Your name is too short'); return false; } if(document.manage_modify_user_form.attach.value == "") { window.alert('Attach information is not valid'); return false; } document.manage_modify_user_form.submit(); } else { window.alert('Invalid page data'); return false; } return true; } function board_toggle(amount) { g_board_toggle=!g_board_toggle; if(document.board_form) { if(amount == 1) { document.board_form.sel_id.checked=g_board_toggle; } else { for(i=0;i 0) { document.user_new_article_form.is_text_upload.value = "1"; } if(document.user_new_article_form.attach.value.length == 0 && document.user_new_article_form.attach_pid.value.length == 0) { if(window.confirm('Attached PID') == false) { window.alert('test'); return false; } document.user_new_article_form.is_attached.value='0'; } window.top.wait_window = window.open("/wait.php","__wait","scrollbars=no,toolbars=no,resizable=no,width=450,height=200"); document.user_new_article_form.submit(); } else { window.alert('Invalid access'); } } function save_content() { if(document.manage_content_form) { if(document.manage_content_form.table_name.value == 'none') { window.alert('table name'); return false; } if(check_length(document.manage_content_form.title) == false) { window.alert('title'); return false; } if(document.manage_content_form.level.value.length == 0) { window.alert('level'); return false; } if(document.manage_content_form.group.value.length == 0) { window.alert('group'); return false; } if(document.manage_content_form.perm.value.length == 0) { window.alert('permission'); return false; } if(check_length(document.manage_content_form.text) == false && document.manage_content_form.text_upload.value.length == 0 && document.manage_content_form.text_site.value.length == 0) { window.alert('content, upload, site'); return false; } if(document.manage_content_form.text_upload.value.length > 0) { document.manage_content_form.is_text_upload.value = "1"; } if(document.manage_content_form.attach.value.length == 0 && document.manage_content_form.attach_pid.value.length == 0) { if(window.confirm('attched pid') == false) { return false; } document.manage_content_form.is_attached.value='0'; } document.manage_content_form.submit(); } else { window.alert('Invalid access'); } } function GoTop() { window.scrollTo(0,0); } function NCWin(vWin) { if ( vWin.style.height != '0px' ) { vWin.org_height = vWin.style.height; vWin.style.height = '0px'; } else { vWin.style.height = vWin.org_height; //'150px'; } } function ControlLoginWindow() { var vWin = document.getElementById('idLoginWindow'); var vButton = document.getElementById('idLoginButton'); if ( vButton.value == '>>>' ) { vWin.style.width = "900px"; vWin.style.height = "20px"; vButton.value = '<<<'; } else { vWin.style.width = "1px"; vWin.style.height = "1px"; vButton.value = '>>>'; } } function zoom_in_text(object) { object.style.fontSize='20px'; } function zoom_out_text(object) { object.style.fontSize='12px'; } function waitPreloadPage() { if (document.getElementById) { document.getElementById('prepage').style.visibility='hidden'; } else { if (document.layers) { document.prepage.visibility = 'hidden'; } else { document.all.prepage.style.visibility = 'hidden'; } } } function turnOffPage() { var theWidth; var theHeight; if (window.innerWidth) { theWidth=window.innerWidth; } else if (document.documentElement && document.documentElement.clientWidth) { theWidth=document.documentElement.clientWidth; } else if (document.body) { theWidth=document.body.clientWidth; } if (window.innerHeight) { theHeight=window.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { theHeight=document.documentElement.clientHeight; } else if (document.body) { theHeight=document.body.clientHeight; } if (document.getElementById) { //document.getElementById('prepage').style.height=theHeight; document.getElementById('prepage').style.visibility='visible'; } else { if (document.layers) { //document.prepage.height = theHeight; document.prepage.visibility = 'visible'; } else { //document.all.prepage.style.height = theHeight; document.all.prepage.style.visibility = 'visible'; } } } function getMouseXY(e) { if (document.all) { // IE e = event; mouseX = document.body.scrollLeft; mouseY = document.body.scrollTop; mouseX += e.clientX; mouseY += e.clientY; } else { mouseX = e.pageX; mouseY = e.pageY; } //window.status = "X = " + mouseX + " | Y = " + mouseY; } if (!document.all) document.captureEvents(Event.MOUSEMOVE); document.onmousemove = getMouseXY; function pop(msg, bak) { var content = "
Preview
"+msg+"
"; skn.innerHTML = content; skn.style.visibility = "visible"; skn.style.left = mouseX + 10 + "px"; skn.style.top = mouseY + 20 + "px"; //window.alert (skn.style.left + ":" + skn.style.top); } function kill() { skn.style.visibility = "hidden"; } // End of a file