function getHTTPObject() { var xmlhttp = false; if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; } function makeRequest(url, elementID) { var xmlhttp = getHTTPObject(); var targetElement = document.getElementById(elementID); targetElement.innerHTML = '
'+'\n'; xmlhttp.open("GET", url, true); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.responseText) { targetElement.innerHTML = xmlhttp.responseText + '\n'; } } xmlhttp.send(null); xmlhttp.close; } function fetch_uni_tab(tabname) { filearray = new Object(); filearray['heroes'] = "/universe3zx/utility/templates/top_chars.htm"; filearray['villains'] = "/universe3zx/utility/templates/top_villains.htm"; filearray['teams'] = "/universe3zx/utility/templates/top_teams.htm"; filearray['places'] = "/universe3zx/utility/templates/top_places.htm"; tabarray = new Object(); tabarray['heroes'] = "uni_tab_heroes"; tabarray['villains'] = "uni_tab_villains"; tabarray['teams'] = "uni_tab_teams"; tabarray['places'] = "uni_tab_places"; document.getElementById('main_issue_tab_content').innerHTML = '



'+'\n'; url = filearray[tabname]; makeRequest(url,'main_issue_tab_content'); for (i in tabarray) { document.getElementById(tabarray[i]).className = 'tab'; } document.getElementById('uni_tab_'+tabname).className = 'tab_on'; } function hide_panel() { document.getElementById('editpanel').style.display = 'none'; } function show_panel() { document.getElementById('editpanel').style.display = 'block'; } function mrvl_dis(ele) { for (var abc=0; abc < mrvl_dispArray.length; abc++) { document.getElementById(mrvl_dispArray[abc]).style.display = 'none'; } document.getElementById(ele).style.display = ''; } function mrvl_randis() { var mrvl_randNum = Math.floor(Math.random()*9); document.getElementById(mrvl_dispArray[mrvl_randNum]).style.display = ''; } w = window.screen.availWidth; h = window.screen.availHeight; function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features); } function showEditTools() { //alert('yeap'); str = document.editform.wpTextbox1.value; var outputstuff = 'Creating a new article:
Please click on the appropriate template below to get started:'; if (str.length == 0) { document.getElementById('templatetools').innerHTML = outputstuff; } } function fetchTemplate(type) { switch(type) { case 'person': var output = "{{Powerbox|\nuniverse =\n| blurb =\n| real_name = \n| aliases = \n| identity = \n| occupation = \n| citizenship = \n| place_of_birth = \n| relatives = \n| groups = \n| education = \n| height = \n| weight = \n| eyes = \n| hair =\n| powers = \n| abilities = \n| weapons = \n| paraphernalia = \n| debut =\n| origin = \n| significant_issues = \n}}{{Headshot|\nmain_image= image_not_available.gif\n}}{{bio|\nbio_text= \n}}\n{{person}}"; break; case 'team': var output = "{{teambox|\nuniverse = Marvel Universe\n| blurb =\n| base_of_operations = \n| debut =\n| significant_issues = \n| current_members = \n| former_members = \n| other_members =\n}}\n{{headshot|\nmain_image=image_not_available.gif\n}}\n{{teamhistory|\nbio_text = \n}}\n{{team}}"; break; case 'place': var output = "{{Placebox|\nuniverse =\n| location = \n| builder = \n| owner = \n| points_of_interest = \n| features = \n| debut =\n| significant_issues = \n}}{{Headshot|\nmain_image=image_not_available.gif\n}}{{placehistory|\nplace_text=\n}}\n{{place}}"; break; case 'object': var output = "{{Objectbox|\nuniverse =\n| location =\n| creator =\n| owner =\n| features = \n| powers =\n| debut =\n| significant_issues = \n}}{{Headshot|\nmain_image = image_not_available.gif\n}}{{objecthistory|\nobject_text=\n}}\n{{object}}"; break; case 'species': var output = "{{speciesbox|\nuniverse =\n| home_world = \n| appearance =\n| distinguishing_features =\n| technology = \n| government = \n| debut =\n| significant_issues = \n| significant_citizens = \n}}{{headshot|\nmain_image=image_not_available.gif\n}}\n{{sp_history|\nspecieshistory = \n}}\n{{species}}"; break; } document.getElementById('maineditform').value = output; }