<!-- Hide Javascript

// PRELOAD IMAGES

var preloadFlag = false;

function preloadImages() {
  var arrImages = new Array();
  var strImageName = "";
  var counter = 0;

  for(i=0; i<document.images.length; i++) {
    strImageName = document.images[i].name;
    if (strImageName != "") {
      arrImages[counter] = new Image();
      arrImages[counter].src = "/images/buttons/" + strImageName + "_over.jpg";
      counter++;
    }
  }

  // alert("There are " + arrImages.length + " images loaded");
  preloadFlag = true;
}


// IMAGE SWAPPING SCRIPT

function swap(name, over) {
  if ((document.images) && (preloadFlag)) {
    if (over == "over") {
      var source = "/images/icons/"+name+"_roll.gif";
    }
    else {
      var source = "/images/icons/"+name+".gif";
    }
    document.images[name].src = source;
  }
}


// GOTO MENU AUTO-REDIRECT...
function gotoUrl(whichform, whichelement) {
  menuIndex  = document.forms[whichform].elements[whichelement].options.selectedIndex;
  menuChoice = document.forms[whichform].elements[whichelement].options[menuIndex].value;

  if (menuChoice != "") {
    window.location = menuChoice;
  }
}

// POPUP CODE
var popupWindow = null;
var openwin = null;
var num = 1;

function popup(myTarget, myWidth, myHeight, myScroll) {
  // quick check for parameters...
  if (!myTarget || !myWidth || !myHeight) {
    alert("JAVASCRIPT ERROR: the popup() function is missing parameters.");
    return;
  }

  // internet explorer can close the open window (windows only)...
  isMac = (navigator.appVersion.indexOf("Mac") != -1);
  if (popupWindow && document.all && !isMac) {
    popupWindow.close();
    popupWindow = null;
  }

  // set the width and height based on myWidth and myHeight...
  var winwidth  = myWidth;
  var winheight = myHeight;

  // determine how to position the window based on myHeight and myWidth...
  if (window.screen) {
    var wintop  = eval((screen.availHeight - winheight)/2);  // calculated top value
    var winleft = eval((screen.availWidth - winwidth)/2);    // calculated left value
  }
  else  {
    var wintop  = 100;
    var winleft = 100;
  }

  // take care of window naming...
  var myName = "myriad_window_" + num + "";
  openwin = myName;

  // set attributes...
  var myAttributes = "";
  myAttributes += "top=" + wintop + ",left=" + winleft + ",width=" + winwidth + ",height=" + winheight + ",";
  if (myScroll == "no") {
    myAttributes += "scrollbars=0, resizable=0, status=0";
  }
  else {
    myAttributes += "scrollbars=1, resizable=1, status=0";
  }

  // open the window...
  popupWindow = window.open(myTarget,myName,myAttributes);

  // update the counter...
  num++;

  // focus on window...
  if (parseInt(navigator.appVersion) >= 4) {
    // delay a bit here because of IE4 bug...
    setTimeout('popupWindow.focus();', 250);
  }
}

function embedHouse(size, x) {
  if (size == 'large') {
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="600">');
    document.write('<param name="movie" value="/flash/jm_house.swf">');
    document.write('<param name="quality" value="high">');
    document.write('<embed src="/flash/jm_house.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="600"></embed>');
    document.write('</object>');
  }
  else if (size == 'small') {
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="274" height="221">');
    document.write('<param name="movie" value="/flash/jm_house_sm.swf">');
    document.write('<param name="quality" value="high">');
    document.write('<embed src="/flash/jm_house_sm.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="274" height="221"></embed>');
	document.write('</object>');
  }
}


//  Stop Hiding Javascript -->