// JavaScript Document

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];}}
}


//************************************************************************************************
// showHide
//   This function makes the div with id="id" visible (display: ''), 
//      and all other divs with class="name" are hidden (display:'none')
//
//************************************************************************************************
function showHide(id, name){
	if (document.getElementById(id).style.display=="") {
	   document.getElementById(id).style.display = "none";
	   //reset default paragraph to display
	   document.getElementById('default').style.display = "";
	   return;
  	}
	
	subs_array = document.getElementsByTagName('div');
	for (i=0;i<subs_array.length;i++){
		if (subs_array[i].className == name) {
			subs_array[i].style.display = "none";
		}
	}

	document.getElementById(id).style.display = "";
	return;
}

//************************************************************************************************
// OpenWindow()
//   Taken from SFX code in js/azlist/common.js
//
//************************************************************************************************
function OpenWindow(url,winname,w,h,needChild) {
//---------------------------------------------------------
// Standard function for opening an sfx menu window
//---------------------------------------------------------
    if (typeof winname == 'undefined' || ! winname.length) winname = 'openwin';
    if (typeof url     == 'undefined' || ! url.length) url = '';
    var child;
    if (!w && !h){
        child = window.open(url,winname,'width=575,height=625,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no');
    }
	else{
        child = window.open(url,winname,"width="+w+",height="+h+",toolbar=no,menubar=no,location=no");
    }
    child.focus();
    if (needChild) return child;
}
