﻿var membership = false;
var dialogCurrent = null;
var notifyCode = "";
var recommend_server = "";
var flashvars = {};
var params = {wmode:"transparent"};
var attributes = { style: "position:relative; z-index:1;", wmode: "transparent", allowScriptAccess: "sameDomain" };
var fb_key = '<%= ConfigurationManager.AppSettings["facebook_key"] %>';

// member
function init_membership() { $("div_membership").innerHTML = "<span style=\"display:block; width:180px; height:50px; padding-top:50px; text-align:center;\">Loading login status...<span>"; sendCommand("Member.Init", "", "init_membership_cb"); }
function init_membership_cb(s) { var ss = s.split(","); if (ss[0] == "1" && ss.length == 3) { init_membership_cb_yes(ss[1], ss[2]); membership = true; } else { init_membership_cb_no(); membership = false; } }
function init_membership_cb_yes(_name, _validated) { $("div_membership").innerHTML = "<div style=\"padding-left:18px; padding-right:18px;\"><p style=\"padding-left:25px; line-height:18px;\">Hi ! <span class=\"red\">" + _name + "</span></p><span style=\"font-style:italic; font-family:'Times New Roman'; font-size:20px; color:#FFee00;\">Now you can :</span><br /><ul class=\"login_menu\"><li style=\"cursor:pointer\" onclick=\"show_server()\" onmouseover=\"this.style.backgroundColor='#666'\" onmouseout=\"this.style.backgroundColor='#231707'\">show serverlist</li><li onclick=\"location='account.aspx'\" style=\"cursor:pointer\" onclick=\"todo_signOut()\" onmouseover=\"this.style.backgroundColor='#666'\" onmouseout=\"this.style.backgroundColor='#231707'\">show my informations</li><li style=\"cursor:pointer\" onclick=\"todo_signOut()\" onmouseover=\"this.style.backgroundColor='#666'\" onmouseout=\"this.style.backgroundColor='#231707'\">Logout</li></ul></div>"; }
function init_membership_cb_no() { $("div_membership").innerHTML = "&nbsp;<div style=\"text-align:center\"><img src=\"/_images/register_text.gif\" /></div><form method=\"post\" action=\"http://www.worldoflordcraft.com/welcome.aspx" + "\" id=\"form_welcome\" onsubmit=\"return check_form(this);\"><div style=\"padding:5px 0px 0px 22px;line-height:18px;\" class=\"bold text_11\">Your Email Address:<br /><input id=\"signup_u\" name=\"signup_u\" accept=\"Email\" alt=\"Please input your email address.(example: bill@buss.com)\" style=\"width:140px;border:1px solid #CAC0A8; background-color:#463B2F;color:#ffffff;\" /><br />Password:<input name=\"signup_g\" id=\"signup_g\" value=\"1\" type=\"hidden\" /><br /><input id=\"signup_p\" name=\"signup_p\" type=\"password\" accept=\"Text,6,50\" alt=\"Please input your password.\" style=\"width:140px;border:1px solid #CAC0A8; background-color:#463B2F;color:#ffffff;\" /><br />Confirm Password:<br /><input id=\"signup_a\" name=\"signup_a\" type=\"password\" accept=\"Equal,signup_p\" alt=\"Please re-input your password.\" style=\"width:140px;border:1px solid #CAC0A8; background-color:#463B2F;color:#ffffff;\" /><div style=\"margin-top:10px;\"><input name=\"image\" type=\"image\" src=\"/_images/btn_registerandplay3.jpg\" /></div><div style=\"margin-top:5px;\">&nbsp;<a href=\"#\" onclick=\"show_pass();return false;\" class=\"red\">Forgot your password?</a></div></div></form>"; }

function send_validate() { sendCommand("Member.SendValidate", "", "send_validate_cb"); show_notify(2, "Validate", "Sending validate mail.", "", 0); }
function send_validate_cb(s) { if (s == "1") { show_notify(1, "Validate", "Validate mail has been sent.", "Plz check your mailbox.", 2); } else { show_notify(0, "Validate", "Mail send failed.", s, 2); } }
function show_signIn() { showDialog(dialogSignIn, 530, 270); $("signin_u").focus(); }
function hide_signIn() { hideDialog(dialogSignIn); }
function clear_signIn() { $("signin_u").value = ""; $("signin_p").value = ""; }
function todo_signIn() { if (check_form($("form_signIn"))) { this.hide_signIn(); this.show_notify(2, "Login", "Please wait a moment...", "", 0); sendForm("Member.SignIn", $("form_signIn"), "todo_signIn_cb"); } }
function todo_signIn_cb(s) { clear_signIn(); if (s == "1") { this.show_notify(1, "Login", "Welcome back my lord.", "", 2); init_membership(); show_server(); } else { show_notify(0, "Login", "Incorrect Account or Password!", "", 5); } }
function todo_signOut() { sendCommand("Member.SignOut", "", "todo_signOut_cb"); }
function todo_signOut_cb(s) { init_membership(); }

//facebook login
function todo_facebook_login() { show_notify("2", "Login Facebook", "Login to Facebook.com.", "Please wait a moment...", 0); FB.login(function (response) { if (response.session) { /*var _token = response.session["access_token"];*/ FB.api('/me', function (response) { show_notify("2", "Login Wol", "Login to World of Lordcraft.", "Please wait a moment...", 0); this.sendCommand("Facebook.SignIn", "email=" + response["email"]/* + "&token=" + _token*/, "todo_facebook_login_cb"); }); } else { show_notify("0", "Login", "Login to Facebook failed.", "Please check Facebook account.", 3); } }); }
function todo_facebook_login_cb(s) { var ss = s.split(","); if (ss[0] == "1" || ss[0] == "2") { hide_notify("Login Wol"); init_membership(); show_server(); } else { show_notify("0", "Login", "Login to World of Lordcraft failed.", "Please check your account or content our support.", 3); } }

// support
function show_support() { showDialog(dialogSupport, 520, 570);$("support_title").focus();}
function hide_support() { hideDialog(dialogSupport); clear_support(); }
function clear_support() { $("support_title").value = ""; $("support_content").value = ""; $("support_name").value = ""; $("support_email").value = ""; }
function todo_support() { if (check_form($("form_support"))) { sendForm("Member.Support", $("form_support"), "todo_support_cb"); hide_support(); this.show_notify(2, "Support", "Sending data plz wait a moment.", "", 0); } }
function todo_support_cb(s) { if (s == "1") { this.show_notify(1, "Support", "Support send successed.", "We will answer your question ASAP.", 2); } else { this.show_notify(0, "Support", "Support send failed.", s, 2); } }

// upload
function show_upload() { showDialog(dialogUpload, 400, 320); }
function hide_upload() { hideDialog(dialogUpload); }

// photo
function show_photo(o) { $("photo_title").innerHTML = o.alt; $("photo_image").alt = o.alt; $("photo_image").src = o.src.replace("_s", "");showDialog(dialogPhoto, 720, 573);}
function hide_photo() { hideDialog(dialogPhoto); }

// video
function show_video() { showDialog(dialogVideo, 518, 328); swfobject.embedSWF("/_images/wol_videoplay.swf", "swf_video", "498", "280", "9.0.0", flashvars, params, attributes); }
function hide_video() { hideDialog(dialogVideo);swfobject.embedSWF("/_images/none.swf", "swf_video", "498", "280", "9.0.0", flashvars, params, attributes);}

// pass
function show_pass() { showDialog(dialogPass, 340, 190); $("pass_email").focus(); }
function hide_pass() { hideDialog(dialogPass); }
function todo_pass() { if (check_form($("form_pass"))) { sendForm("Member.GetPassword", $("form_pass"), "todo_pass_cb"); hide_pass(); this.show_notify(2, "Get Password", "Sending email plz wait a moment.", "", 0); } }
function todo_pass_cb(s) { if (s == "1") { this.show_notify(1, "Get Password", "Mail send successed.", "Please check your mailbox.", 2); } else { this.show_notify(0, "Get Password", "Mail send failed.", s, 2); } }

// server
function show_server() { sendCommand("Server.List", "", "show_server_cb"); show_notify(2, "Loading...", "Loading server list,plz wait a moment.", "", 0); }
function show_server_cb(s) { var ss = s.split(":"); if (ss[0] == "") { $("server_list_current").style.display = "none"; } else { var sc = ss[0].split(","); $("server_list_current").style.display = ""; $("server_list_current").innerHTML = "<li onmouseover=\"this.className='over'\" onmouseout=\"this.className=''\" onclick=\"goto_server('" + sc[0] + "')\"><span style=\"float:right; padding:9px 10px 0px 0px;\"><img src=\"_images/server_icon" + sc[2] + ".gif\" /></span><span style=\"float:right;\" class=\"red2 text_10\">Last login server </span>" + sc[1] + "</span></li>"; } var sl = ss[1].split("|"); var list_html = ""; var select_html = ""; for (var i = 0; i < sl.length; i++) { var si = sl[i].split(","); if (i < 30) { try { if (sc[1] == si[1]) { continue; } } catch (e) { } list_html += "<li onmouseover=\"this.className='over'\" onmouseout=\"this.className=''\" style=\"cursor:pointer\" onclick=\"goto_server('" + si[0] + "')\"><span style=\"float:right; padding:9px 10px 0px 0px;\"><img src=\"_images/server_icon" + si[2] + ".gif\" /></span>" + si[1] + "</li>"; } else { select_html += "<option value=\"" + si[0] + "\">" + si[1] + "</option>"; } } $("server_list").innerHTML = list_html; $("server_select_area").style.display = select_html == "" ? "none" : ""; $("server_select").innerHTML = select_html; showDialog(dialogServer, 335, 380); }
function hide_server() { hideDialog(dialogServer); }
function goto_server(s) {window.location.href = "/server.aspx?" + s;}

// notify type:0-false 1-true 2-loading
function show_notify(type, title, message, advice, timeout) {notifyCode = title; showDialog(dialogNotify, 340, 130);$("notify_image").innerHTML = "";switch (type) {case 0: $("notify_close").style.display = ""; $("notify_image").innerHTML = "<img src=\"/_images/loadinfo_1.gif\" />"; break;case 1: $("notify_close").style.display = ""; $("notify_image").innerHTML = "<img src=\"/_images/loadinfo_2.gif\" width=\"80\" height=\"80\" />"; break;case 2: $("notify_close").style.display = "none"; $("notify_image").innerHTML = "<img src=\"/_images/loadinfo_0.gif\" width=\"80\" height=\"80\" />"; break; } $("notify_title").innerHTML = title; $("notify_warning").innerHTML = message; $("notify_advice").innerHTML = advice; if (timeout > 0) { setTimeout("hide_notify('" + title + "')", timeout * 1000); $("notify_timeout").innerHTML = "(Note will disappear after " + timeout + " seconds.)"; } else { $("notify_timeout").innerHTML = ""; } }
function hide_notify(title) { if (title == "" || (title == notifyCode && dialogNotify.style.display == "")) { hideDialog(dialogNotify); } }

// display
function top_menu_over(obj) { obj.src = "/_images/top" + obj.id + ".gif"; }
function top_menu_out(obj) { obj.src = "/_images/top" + obj.id + "_.gif"; }
function default_show_news(obj, code) { if ($("news_list_" + code).style.display != "none") { return; }; $("news_list_all").style.display = code == "all" ? "" : "none"; $("news_list_notices").style.display = code == "notices" ? "" : "none"; $("news_list_events").style.display = code == "events" ? "" : "none"; $("news_list_others").style.display = code == "others" ? "" : "none";$("news_list_forums").style.display = code == "forums" ? "" : "none"; for (var i = 0; i < obj.parentNode.childNodes.length; i++) { if (obj.parentNode.childNodes[i].tagName != "LI") { continue; } obj.parentNode.childNodes[i].className = obj.parentNode.childNodes[i] == obj ? "down" : ""; } }
function default_show_photo(obj, code) { if ($("photo_list_" + code).style.display != "none") { return; }; $("photo_list_screenshots").style.display = code == "screenshots" ? "" : "none"; $("photo_list_wallpapers").style.display = code == "wallpapers" ? "" : "none"; $("photo_list_photos").style.display = code == "photos" ? "" : "none"; for (var i = 0; i < obj.parentNode.childNodes.length; i++) { if (obj.parentNode.childNodes[i].tagName != "LI") { continue; } obj.parentNode.childNodes[i].className = obj.parentNode.childNodes[i] == obj ? "down" : ""; } }
function showMask() { if ($("div_membership")) { $("div_membership").style.display = ""; } dialogMask.style.width = document.body.scrollWidth.toString() + "px"; dialogMask.style.height = document.body.scrollHeight.toString() + "px"; dialogMask.style.display = ""; };
function hideMask() { if ($("div_membership")) { $("div_membership").style.display = ""; } dialogMask.style.display = "none"; };
function showDialog(obj, w, h) { showMask(); obj.style.top = ((window.screen.availHeight - h - 100) / 2 + scrollTop()).toString() + "px"; obj.style.left = ((document.body.scrollWidth - w) / 2 + scrollLeft()).toString() + "px"; if (dialogCurrent != null) { dialogCurrent.style.display = "none"; dialogCurrent = null; } dialogCurrent = obj; dialogCurrent.style.display = ""; }
function hideDialog(obj) { obj.style.display = "none"; dialogCurrent = null; hideMask(); }
function onResize() { if (dialogMask.style.display == "") { dialogMask.style.width = document.body.scrollWidth.toString() + "px"; dialogMask.style.height = document.body.scrollHeight.toString() + "px"; } if (dialogCurrent != null) { dialogCurrent.style.top = ((window.screen.availHeight - dialogCurrent.offsetHeight - 100) / 2 + scrollTop()).toString() + "px"; dialogCurrent.style.left = ((document.body.offsetWidth - dialogCurrent.offsetWidth) / 2 + scrollLeft()).toString() + "px"; } }
function onScroll() { if (dialogCurrent != null) { dialogCurrent.style.top = ((window.screen.availHeight - dialogCurrent.offsetHeight - 100) / 2 + scrollTop()).toString() + "px"; dialogCurrent.style.left = ((document.body.offsetWidth - dialogCurrent.offsetWidth) / 2 + scrollLeft()).toString() + "px"; } }
function show_account() { if (membership) { window.location.href = "/account.aspx"; } else { show_signIn(); } }

// init
function init_common() {
    document.body.insertBefore(dialogMask, document.body.childNodes[0]);
    document.body.insertBefore(dialogNotify, document.body.childNodes[0]);
    document.body.insertBefore(dialogWarning, document.body.childNodes[0])
    document.body.insertBefore(dialogSignIn, document.body.childNodes[0]);
    document.body.insertBefore(dialogPass, document.body.childNodes[0])
    document.body.insertBefore(dialogServer, document.body.childNodes[0])
    document.body.insertBefore(dialogVideo, document.body.childNodes[0])
    document.body.insertBefore(dialogNews, document.body.childNodes[0])
    document.body.insertBefore(dialogPhoto, document.body.childNodes[0])
    document.body.insertBefore(dialogUpload, document.body.childNodes[0])
    document.body.insertBefore(dialogSupport, document.body.childNodes[0])
    window.onresize = onResize; window.onscroll = onScroll;
}
function init_ads() {
    document.body.insertBefore(dialogMask, document.body.childNodes[0]);
    document.body.insertBefore(dialogNotify, document.body.childNodes[0]);
    document.body.insertBefore(dialogWarning, document.body.childNodes[0])
    window.onresize = onResize; window.onscroll = onScroll;
}

// form
function check_form(obj) {
    dialogWarning.style.display = "none"; var is = new Array("INPUT", "TEXTAREA", "SELECT");
    for (var j = 0; j < is.length; j++) {
        var inputs = obj.getElementsByTagName(is[j]);
        for (var i = 0; i < inputs.length; i++) {
            if (inputs[i].accept) {
                if (!check_input(inputs[i])) {
                    dialogWarning.style.top = (getTop(inputs[i]) + getHeight(inputs[i])+1).toString() + "px";
                    dialogWarning.style.left = (getLeft(inputs[i]) + 1).toString() + "px";
                    dialogWarning.innerHTML = inputs[i].alt;
                    dialogWarning.style.display = "";
                    setTimeout("dialogWarning.style.display='none'", 5000);
                    inputs[i].focus(); 
                    return false;
                }
            }
        }
    }
    return true;
}
function check_input(obj) {
    var code = obj.accept; var r = true; var cl = code.split("|"); for (var i = 0; (i < cl.length); i++) {
        if (r) {
            var codes = cl[i].split(",");switch (codes[0]) {
                case "Checked": r = obj.checked; break;
                case "Email": r = check_form_Email(obj.value); break;
                case "Equal": r = (obj.value == $(codes[1]).value); break;
                case "Text": r = check_form_Text(obj.value, parseInt(codes[1]), parseInt(codes[2])); break;
            } 
        } 
    } return r;
}
function check_form_Email(str) {return (str.match(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/ig) == str); }
function check_form_Text(str, min, max) { var c = 0; for (var i = 0; i < str.replace(/(^\s*)|(\s*$)/g, "").length; i++) { if (str.charCodeAt(i) > 255) { c += 2; } else { c++; } } if (min > 0 && c < min) { return false; } if (max > 0 && c > max) { return false; } return true; }

// common
function $(s) { return document.getElementById(s); };
function getXmlhttp() { var http_request; if (window.XMLHttpRequest) { http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType("text/xml"); } } else if (window.ActiveXObject) { try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } } } if (!http_request) { return null; } return http_request; }
function sendCommand(cmd, dat, evt) { var xhttp = getXmlhttp(); xhttp.open("post", "/_.aspx?" + cmd, true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.setRequestHeader("Content-length", dat.length); xhttp.setRequestHeader("Connection", "close"); xhttp.send(dat); xhttp.onreadystatechange = function () { if (xhttp.readyState == 4 && xhttp.status == 200) { eval(evt + "('" + xhttp.responseText + "')"); } } }
function sendForm(cmd, form, evt) { var dat = ""; var is = new Array("INPUT", "TEXTAREA", "SELECT"); for (var j = 0; j < is.length; j++) { var inputs = form.getElementsByTagName(is[j]); for (var i = 0; i < inputs.length; i++) { if (inputs[i].id && inputs[i].id != "") { dat += dat == "" ? "" : "&"; dat += inputs[i].id + "=" + escape(inputs[i].value); } } } sendCommand(cmd, dat, evt); }
function getLeft(obj) { var left = obj.offsetLeft; while (obj.offsetParent && obj.offsetParent.tagName != "BODY") { left += obj.offsetParent.offsetLeft; obj = obj.offsetParent } return left; }
function getTop(obj) { var top = obj.offsetTop; while (obj.offsetParent && obj.offsetParent.tagName != "BODY") { top += obj.offsetParent.offsetTop; obj = obj.offsetParent; } return top; }
function getWidth(obj) { return obj.offsetWidth; }
function getHeight(obj) { return obj.offsetHeight }
function scrollTop() { if (document.body.scrollTop) { return document.body.scrollTop; } else { return document.documentElement.scrollTop; } }
function scrollLeft() { if (document.body.scrollLeft) { return document.body.scrollLeft; } else { return document.documentElement.scrollLeft; } }

// dialog
var dialogMask = document.createElement("DIV");dialogMask.style.top="0px";dialogMask.style.left="0px";dialogMask.style.width="0px";dialogMask.style.height="0px";dialogMask.style.zIndex="2";dialogMask.style.position="absolute";dialogMask.style.backgroundColor="#000000";dialogMask.style.display="none";dialogMask.className = "alpha";
var dialogWarning = document.createElement("DIV"); dialogWarning.style.cursor = "pointer"; dialogWarning.style.backgroundColor = "#FFFF99"; dialogWarning.style.padding = "5px"; dialogWarning.style.borderStyle = "solid"; dialogWarning.style.borderWidth = "1px"; dialogWarning.style.borderColor = "#FF3333"; dialogWarning.style.color = "#FF3333"; dialogWarning.style.position = "absolute"; dialogWarning.style.zIndex = "999999"; dialogWarning.style.display = "none"; dialogWarning.onclick = function () { dialogWarning.style.display = "none"; };
var dialogNotify = document.createElement("DIV"); dialogNotify.className = "openwindow"; dialogNotify.style.width = "380px"; dialogNotify.style.position = "absolute"; dialogNotify.style.display = "none"; dialogNotify.style.zIndex = 3; dialogNotify.innerHTML = "<div class=\"title_openwindow\"><span id=\"notify_close\"><img src=\"/_images/btn_close.gif\" style=\"cursor:pointer\" onclick=\"hide_notify('')\" /></span><p id=\"notify_title\"></p></div>" + "<div style=\"padding:10px; line-height:20px;\">" + "<div id=\"notify_image\" style=\"float:left;width:80px;height:80px;\">&nbsp;</div>" + "<div style=\"float:left; padding:15px 0px 0px 10px;\">" + "<span id=\"notify_warning\" class=\" text_13 bold\"></span><br />" + "<span id=\"notify_advice\" class=\"bold\"></span><br />" + "<span id=\"notify_timeout\" class=\"text_10\"></span></div>" + "<div style=\"clear:both\"></div></div>"; /*onclick=\"todo_facebook_login()\"*/
var dialogSignIn = document.createElement("DIV"); dialogSignIn.className = "openwindow"; dialogSignIn.style.width = "530px"; dialogSignIn.style.height = "270px"; dialogSignIn.style.position = "absolute"; dialogSignIn.style.display = "none"; dialogSignIn.style.zIndex = 3; dialogSignIn.innerHTML = "<form id=\"form_signIn\" onsubmit=\"todo_signIn();return false;\">" + "<div class=\"title_openwindow\"><span><img src=\"/_images/btn_close.gif\" style=\"cursor:pointer\" onclick=\"hide_signIn()\" /></span><p>Sign in</p></div>" + "<div style=\"float:left; width:260px;\"><div style=\"padding:35px 20px 20px 20px;\" class=\"line_h\"><div style=\"border-right:1px solid #804104; height:170px;\"><span style=\" font-size:20px; font-weight:bold\">Facebook user ?</span><br/><span class=\"bold text_13 red\">Sign in with Facebook Connect</span><br /><img src=\"/_images/btn_facebook.gif\" style=\"margin-top:10px; cursor:pointer\" onclick=\"todo_facebook_login()\"></div></div></div>" + "<div style=\"float:left; width:260px;\"><div class=\"line_h\" style=\"padding:30px;\">" + "<span class=\"bold\">Email Address:</span><br />" + "<input style=\"width:200px;\" id=\"signin_u\" accept=\"Email\" alt=\"Please input e-mail address.(example:apple@ms.com)\" class=\"textarea\" onfocus=\"this.className='textarea_down'\" onblur=\"this.className='textarea'\"><br />" + "<a href=\"/welcome.aspx\" class=\"text_11 red bold\">Not for Member?</a><br />" + "<span class=\"bold\">Password:</span><br />" + "<input type=\"password\" style=\"width:200px;\" id=\"signin_p\" accept=\"Text,6,50\" alt=\"Please input your password.\" class=\"textarea\" onfocus=\"this.className='textarea_down'\" onblur=\"this.className='textarea'\"><br />" + "<a href=\"#\" onclick=\"show_pass();return false;\" class=\"text_11 red bold\">Forgot password?</a>" + "<div style=\"margin-top:10px;\"><input type=\"button\" class=\"btn_80\" value=\"Sign In\" onclick=\"todo_signIn();\"></div>" + "</div></div></form>";
var dialogPass = document.createElement("DIV"); dialogPass.className = "openwindow"; dialogPass.style.width = "340px"; dialogPass.style.position = "absolute"; dialogPass.style.display = "none"; dialogPass.style.zIndex = 3; dialogPass.innerHTML = "<form id=\"form_pass\" onsubmit=\"todo_pass();return false;\"><div class=\"title_openwindow\"><span><img src=\"/_images/btn_close.gif\" style=\"cursor:pointer\" onclick=\"hide_pass();\" /></span><p>Get Password</p></div>" + "<div style=\"padding:30px; line-height:20px;\"><span class=\"bold\">Email address:</span><br />" + "<input id=\"pass_email\" class=\"textarea\" style=\"width:250px;\" alt=\"Please input your email address here.(example: jobs@pple.com)\" accept=\"Email\" /><br />" + "<span class=\"red bold text_11\">We will send a mail to your mailbox;</span><br />" + "<input name=\"button2\" type=\"button\" class=\"btn_200\" value=\"Send password to the mailbox\" style=\"margin-top:10px;\" onclick=\"todo_pass();\">" + "</div></form>";
var dialogServer = document.createElement("DIV"); dialogServer.className = "openwindow";dialogServer.style.background = "none"; dialogServer.style.width = "335px"; dialogServer.style.position = "absolute"; dialogServer.style.display = "none"; dialogServer.style.zIndex = 3; dialogServer.innerHTML = "<div class=\"title_openwindow\"><p>Choose  Server</p><span><img src=\"/_images/btn_close.gif\" style=\"cursor:pointer\" onclick=\"hide_server();\" /></span></div>" + "<div class=\"server_list\"><div class=\"server_list_top\"></div><div id=\"server_list_current\" class=\"server_list_inner\" style=\"cursor:pointer\"></div>" + "<div class=\"server_list_inner\"><ul id=\"server_list\"></ul>" + "</div><div style=\"margin-top:5px;\" id=\"server_select_area\"><span class=\"bold\">Other :</span> " + "<select id=\"server_select\" style=\"width:200px;\"></select>" + "</div><div class=\"server_list_foot\"></div></div>";
var dialogVideo = document.createElement("DIV"); dialogVideo.className = "openwindow"; dialogVideo.style.width = "518px"; dialogVideo.style.position = "absolute"; dialogVideo.style.display = "none"; dialogVideo.style.zIndex = 3; dialogVideo.innerHTML = "<div class=\"title_openwindow\"><span><img src=\"/_images/btn_close.gif\" style=\"cursor:pointer\" onclick=\"hide_video();\" /></span></div>" + "<div style=\"padding:10px; background-color:#ffffff;\"><div id=\"swf_video\"></div></div>";
var dialogNews = document.createElement("DIV"); dialogNews.className = "openwindow"; dialogNews.style.width = "540px"; dialogNews.style.position = "absolute"; dialogNews.style.display = "none"; dialogNews.style.zIndex = 3;dialogNews.innerHTML = "<div class=\"title_openwindow\"><p>News</p><span><img src=\"/_images/btn_close.gif\" style=\"cursor:pointer\" onclick=\"hide_news();\" /></span></div>" + "<div style=\"height:540px;overflow:scroll;overflow-x:hidden; margin:20px;\">" + "<div id=\"news_info\" class=\"shownews\" style=\"margin-top:0px;\"></div></div>";
var dialogPhoto = document.createElement("DIV");dialogPhoto.className = "openwindow";dialogPhoto.style.width = "720px";dialogPhoto.style.position = "absolute";dialogPhoto.style.display = "none";dialogPhoto.style.zIndex = 3;dialogPhoto.innerHTML = "<div class=\"title_openwindow\"><p id=\"photo_title\"></p><span><img src=\"/_images/btn_close.gif\" style=\"cursor:pointer\" onclick=\"hide_photo();\" /></span></div>" + "<div style=\"background-color:#ffffff;padding:10px;width:700px;height:525px;overflow:scroll;\"><img id=\"photo_image\" /></div>";
var dialogUpload = document.createElement("DIV"); dialogUpload.className = "openwindow"; dialogUpload.style.width = "400px"; dialogUpload.style.position = "absolute"; dialogUpload.style.display = "none"; dialogUpload.style.zIndex = 3; dialogUpload.innerHTML = "<div class=\"title_openwindow\"><p>Upload</p><span><img src=\"/_images/btn_close.gif\" style=\"cursor:pointer\" onclick=\"hide_upload();\" /></span></div>" + "<form method=\"post\" enctype=\"multipart/form-data\" action=\"/photos.aspx?upload\">" + "<div style=\"padding:30px; line-height:20px;\"><span class=\"bold\">Categories:</span><br />" + "<select name=\"upload_type\" style=\"width:200px;\" /><option value=\"screenshot\">ScreenShot</option><option value=\"photo\">Player Photos</option></select><br />" + "<span class=\"red bold text_11\">Choose Picture category</span><br />" + "<span class=\"bold\">Picture Title:</span><br />" + "<input name=\"upload_title\" style=\"width:300px;\" /><br />" + "<span class=\"red bold text_11\">6~50 Characters</span><br />" + "<span class=\"bold\">Choose a Picture:</span><br />" + "<input name=\"upload_file\" type=\"file\" style=\"width:330px;\" /><br />" + "<span class=\"text_10\">The picture should be JPG/JPEG format within 1440*900 pixel and no more than 500Kb.</span><br />" + "<input name=\"button2\" type=\"submit\" class=\"btn_80\" value=\"Upload\" style=\"margin-top:10px;\" /></div></form>";
var dialogSupport = document.createElement("DIV"); dialogSupport.className = "openwindow"; dialogSupport.style.width = "520px"; dialogSupport.style.position = "absolute"; dialogSupport.style.display = "none"; dialogSupport.style.zIndex = 3; dialogSupport.innerHTML = "<div class=\"title_openwindow\"><p>Support</p><span><img src=\"/_images/btn_close.gif\" style=\"cursor:pointer\" onclick=\"hide_support();\" /></span></div>" + "<form id=\"form_support\" onsubmit=\"todo_support(); return false;\">" + "<div style=\"padding:25px;\" class=\"line_h\"><span class=\"red bold\">Subject:</span><br /><div style=\"border:1px solid #666; padding:6px; height:80px;\">" + "<div style=\"float:left;width:220px;\" class=\"bold\"><input name=\"support_type\" type=\"radio\" onclick=\"$('support_type').value='Tech Support'\" checked=\"checked\">Tech Support</div>" + "<div style=\"float:left;width:220px;\" class=\"bold\"><input name=\"support_type\" type=\"radio\" onclick=\"$('support_type').value='Accounts & Billing'\">Accounts & Billing</div>" + "<div style=\"float:left;width:220px;\" class=\"bold\"><input name=\"support_type\" type=\"radio\" onclick=\"$('support_type').value='Report a Name'\">Report a Name</div>" + "<div style=\"float:left;width:220px;\" class=\"bold\"><input name=\"support_type\" type=\"radio\" onclick=\"$('support_type').value='Community'\">Community</div>" + "<div style=\"float:left;width:220px;\" class=\"bold\"><input name=\"support_type\" type=\"radio\" onclick=\"$('support_type').value='Bonus Package'\">Bonus Package</div>" + "<div style=\"float:left;width:220px;\" class=\"bold\"><input name=\"support_type\" type=\"radio\" onclick=\"$('support_type').value='Report Abuse'\">Report Abuse</div>" + "<input type=\"hidden\" id=\"support_type\" value=\"Tech Support\" />" + "<div style=\"clear:both\"></div></div>" + "<span class=\"red bold\">Title:</span><br /><input id=\"support_title\" accept=\"Text,4,200\" alt=\"Please input title here.\" style=\"width:462px;\" /><br />" + "<span class=\"red bold\">Message:</span><br /><textarea id=\"support_content\" style=\"width:462px; height:100px;\" accept=\"Text,4,2000\" alt=\"Please input text here.\" /></textarea><br />" + "<span class=\"text_11\" style=\"line-height:15px;\">Please make sure to include as much information as possible, and we'll get back to you within 2 business days.</span><br /><br />" + "<span class=\"red bold\">Your Name:</span><br /><input id=\"support_name\" style=\"width:462px;\" class=\"textarea\" accept=\"Text,4,50\" alt=\"Please input your name here.\" /><br />" + "<span class=\"red bold\">Email Address:</span><br /><input id=\"support_email\" style=\"width:462px;\" class=\"textarea\" accept=\"Email\" alt=\"Please input your email address here.\" /><br /><br />" + "<input type=\"button\" class=\"btn_80\" value=\"Send\" onclick=\"todo_support();\"></div></form>";
