function onloadHandler() {
  // handles onload event from body tag
  if (document.form1.page) {
    var ourhappypage = document.form1.page.value;
    if (ourhappypage == "name") {
      if (document.form1.cm_name) {
        document.form1.cm_name.focus();
      }
    }
    if (ourhappypage == "trainer") {
      update_skills_display();
      resizeSkillWindow();
//      window.onResize = "resizeSkillWindow()";
    }
    if (ourhappypage == "skills") {
      update_skills_display();
    }
  }
}

var webTimerID;

function onresizeHandler() {
  // handles onresizeend event from body tag
  if (document.form1.page) {
    var ourhappypage = document.form1.page.value;
    if (ourhappypage == "trainer") {
      if (webTimerID) {
      } else {
        webTimerID = window.setTimeout("resizeSkillWindow();", 500);
      }
    }
  }
}

function skillkey () {
    keywindow = window.open ("/gs4/info/professions/skillkey.asp", "Skills", "height=350,width=500,scrollbars=no,toolbar=no,menubar=no,resizeable=no,location=no,directories=no,status=no,titlebar=no,screenx=150,screeny=150")
    keywindow.focus()
}
function definitions () {
    keywindow = window.open ("/gs4/info/professions/definitions.asp", "Definitions", "height=430,width=500,scrollbars=no,toolbar=no,menubar=no,resizeable=no,location=no,directories=no,status=no,titlebar=no,screenx=150,screeny=150")
    keywindow.focus()
}
function showpolicy () {
    keywindow = window.open ("/gs4/info/spells/spell-policy.asp", "Policy", "height=370,width=500,scrollbars=no,toolbar=no,menubar=no,resizeable=no,location=no,directories=no,status=no,titlebar=no,screenx=150,screeny=150")
    keywindow.focus()
}


function hsnCredits(theAnchor) {
	MM_openBrWindow('/gs4/news/hotsummernights/hsn_review_credits.asp#' + theAnchor,'credits','width=600,height=500,scrollbars=yes');
}

function popAnfelt() {
	var theURL = '/gs4/quests/info/anfelt_map.asp';
	MM_openBrWindow(theURL,'anfelt_map','scrollbars=yes,width=850,height=1150');
}