
function MM_openBrWindow(theURL,winName,features) { //v2.0
  var obj = window.open(theURL,winName,features);
  obj.focus();
}

function toggleDisplay(divId) {

  var div = document.getElementById(divId);

  div.style.display = (div.style.display=="block" ? "none" : "block");

}



/*************************************************************************
  This code is from Dynamic Web Coding at www.dyn-web.com
  Copyright 2002-4 by Sharon Paine 
  See Terms of Use at www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

// change speed of slide here
var slide_in_speed = 600;	// millisecond duration of slide into view
var slide_out_speed = 500;// millisecond duration of slide out of view

function initGlideLayers() {
  var glideLyrs = new Array();
  
  // Set up your layers here
  // arguments: id, left=0 (offset calculated based on width), top
  glideLyrs[0] = new dynObj('glideDiv0', 0, 120);
  //glideLyrs[1] = new dynObj('glideDiv1', 0, 120);
  //glideLyrs[2] = new dynObj('glideDiv2', 0, 120);
  //glideLyrs[3] = new dynObj('glideDiv3', 0, 120);
  
  for (var i=0; glideLyrs[i]; i++) {
		// hold original left position 
		glideLyrs[i].yOff = (glideLyrs[i].y = -200);
		glideLyrs[i].shiftTo( null, glideLyrs[i].y )
		glideLyrs[i].show();
  }
}

var curGlideLyr;
function slideEm(id) {
  var oldLyr, newLyr;
  // if link for current layer clicked, slide it out of view 
	if (curGlideLyr == id) { 
    oldLyr = dynObj.getInstance(curGlideLyr);
		oldLyr.slideTo(null, oldLyr.yOff, slide_out_speed, -1);
    curGlideLyr = "";
		// after n seconds, remove holder div
		setTimeout("toggleDisplay('holder')",500); 
	return;
	 
  }
	// if layer currently in view, set up to slide new one into view
	// after current one slides away
	if (curGlideLyr) {
	oldLyr = dynObj.getInstance(curGlideLyr);
		oldLyr.onSlideEnd = function() { 
			dynObj.holder[curGlideLyr].slideTo(0, 300, slide_in_speed, -1); 
			this.onSlideEnd = function() { if (this.el) this.el = null } 
		}
		// slide current layer out of view
		oldLyr.slideTo(null, oldLyr.yOff, slide_out_speed, -1);
		toggleDisplay('holder');
		
	} else { 	// if no layer currently in view
    newLyr = dynObj.getInstance(id);
    newLyr.slideTo(0, 0, slide_in_speed, -1);
	
  }
	curGlideLyr = id;
}

