/* ** www.vikingmud.org ** ** main.js */ var doc_community='http://community.vikingmud.org/profiles/'; var data_menu = new Array(); data_menu[0] = new Array("Home" , "./" ); data_menu[1] = new Array("Introduction" , "introduction.php" ); data_menu[2] = new Array("News" , "news.php" ); data_menu[3] = new Array("Play Game" , "play.php" ); data_menu[4] = new Array("Community" , doc_community ); data_menu[5] = new Array("Guilds" , "guilds.php" ); data_menu[6] = new Array("Elderhood" , "elders.php" ); data_menu[7] = new Array("Contact us" , "contact.php" ); function __hook_main_resize() { var diff = pageHeight() - (319 + 193 + 60 + 10); var main_width_min = 900; // adjust the top | midth | bottom tree frames (and images) if(diff < 0) diff = Math.round(-diff / 2); else diff = 0; // adjust height on top image if(diff < 319 && (target = query_object("img_trees_top"))) target.style.height = 319 - diff; // adjust height on bottom image if(diff < 193 && (target = query_object("img_trees_bottom"))) target.style.height = 193 - diff; // resize main frame to fit the new browser size if (pageHeight() - 170 > 40 && (target = query_object("frame_main"))) target.style.height = (pageHeight() - (170)); // center main content if browser width >= main_width_min orelse clip from right if ((target = query_object("main"))) { if (pageWidth() < main_width_min) { target.style.left = "0px"; target.style.marginLeft = "-25px"; target.style.width = "" + pageWidth() + "px"; } else { target.style.left = "50%"; target.style.marginLeft = "-475px"; target.style.width = "" + main_width_min + "px"; } } // make main content floating if browser width < 900 if ((target = query_object("frame_main"))) { if (pageWidth() < main_width_min) target.style.width = "" + pageWidth() + "px"; else target.style.width = "" + main_width_min + "px"; } // attempt call active elements 'hook_resize' if any try { __hook_resize(); } catch(err) { } // ignore non existing function, no error msg! } function __document_init_main(arg_title) { var tmp_html = ''; // build menu if ((target = query_object("frame_top"))) { var columns = 0; // datestamp, upper left tmp_html += '
'; tmp_html += '| | | '; tmp_html += ''+data_menu[i][0]+' | '; tmp_html += '