
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function ChangeMenuStyle(evt) {
	var evt = evt || window.event;
   	var target = evt.target || evt.srcElement;
	var div_id = "div" + target.id;
	if (document.getElementById(div_id).className == "expand") { 
		document.getElementById(div_id).className = "shrink"
	}
	else if  (document.getElementById(div_id).className == "shrink") {
		document.getElementById(div_id).className = "expand"
	}
	else {
		alert("Unable to expand menu")
	}
		return;
}



/**
*  Javascript open window
*  Code from: http://www.webtoolkit.info/
*
*  Sample Usage:
*  <a href="http://www.webtoolkit.info" title="Free code and tutorials"
*  onclick="return openWindow(this, {width:790,height:450,center:true})"
*  Free code and tutorials</a>
*
*  Optional parameters (below) may be passed as a second object parameter to the openWindow function:
*  width 
*  height 
*  left 
*  top 
*  center 
*  name 
*  scrollbars 
*  menubar 
*  locationbar 
*  resizable 
*  
**/ 
function openWindow(anchor, options) {
	var args = '';
 
	if (typeof(options) == 'undefined') { var options = new Object(); }
	if (typeof(options.name) == 'undefined') { options.name = 'win' + Math.round(Math.random()*100000); }
 
	if (typeof(options.height) != 'undefined' && typeof(options.fullscreen) == 'undefined') {
		args += "height=" + options.height + ",";
	}
 
	if (typeof(options.width) != 'undefined' && typeof(options.fullscreen) == 'undefined') {
		args += "width=" + options.width + ",";
	}
 
	if (typeof(options.fullscreen) != 'undefined') {
		args += "width=" + screen.availWidth + ",";
		args += "height=" + screen.availHeight + ",";
	}
 
	if (typeof(options.center) == 'undefined') {
		options.x = 0;
		options.y = 0;
		args += "screenx=" + options.x + ",";
		args += "screeny=" + options.y + ",";
		args += "left=" + options.x + ",";
		args += "top=" + options.y + ",";
	}
 
	if (typeof(options.center) != 'undefined' && typeof(options.fullscreen) == 'undefined') {
		options.y=Math.floor((screen.availHeight-(options.height || screen.height))/2)-(screen.height-screen.availHeight);
		options.x=Math.floor((screen.availWidth-(options.width || screen.width))/2)-(screen.width-screen.availWidth);
		args += "screenx=" + options.x + ",";
		args += "screeny=" + options.y + ",";
		args += "left=" + options.x + ",";
		args += "top=" + options.y + ",";
	}
 
	if (typeof(options.scrollbars) != 'undefined') { args += "scrollbars=1,"; }
	if (typeof(options.menubar) != 'undefined') { args += "menubar=1,"; }
	if (typeof(options.locationbar) != 'undefined') { args += "location=1,"; }
	if (typeof(options.resizable) != 'undefined') { args += "resizable=1,"; }
 
	var win = window.open(anchor, options.name, args);
	return false;
}

