NS4=IE4=IE5=IE=NS6=0;NS=1;doc=document;ly=null;
if (doc.layers) {NS4=1;ly=doc.layers;}
else if (doc.all) {IE=1;NS=0;ly=doc.all; IE5=(doc.recalc)?1:0; IE4=1-IE5; }
else {NS6=1; ly=doc.getElementsByTagName("*");}
win=window;

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function swapImage(arg, over)
{
	if (document.images && (preloadFlag == true))
	{
		var divname = 'box' + arg;
		var imgname = 'link' + arg;
		var img = ly[imgname];
		var div = (NS4)?ly[divname]:ly[divname].style;
		if (over)
		{
			if (div.display == "none")
				img.src = "themes/adc/plus-over.gif";
			else
				img.src = "themes/adc/minus-over.gif";
		}
		else
		{
			if (div.display == "none")
				img.src = "themes/adc/plus.gif";
			else
				img.src = "themes/adc/minus.gif";
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		plusImgLoader =			newImage("themes/adc/plus.gif");
		plusImgOverLoader =		newImage("themes/adc/plus-over.gif");
		minusImgLoader =		newImage("themes/adc/minus.gif");
		minusImgOverLoader =	newImage("themes/adc/minus-over.gif");
		homeimgover = 			newImage("../buttons/Home_over.jpg");
		homeimgdown = 			newImage("../buttons/Home_down.jpg");
		galleryimgover = 		newImage("../buttons/Gallery_over.jpg");
		galleryimgdown = 		newImage("../buttons/Gallery_down.jpg");
		bioimgover = 			newImage("../buttons/Biography_over.jpg");
		bioimgdown = 			newImage("../buttons/Biography_down.jpg");
		eventimgover = 			newImage("../buttons/Event_over.jpg");
		eventimgdown = 			newImage("../buttons/Event_down.jpg");
		processimgover = 		newImage("../buttons/Process_over.jpg");
		processimgdown = 		newImage("../buttons/Process_down.jpg");
		contactimgover = 		newImage("../buttons/Contact_over.jpg");
		contactimgdown = 		newImage("../buttons/Contact_down.jpg");
		preloadFlag = true;
	}
}
function toggle(arg)
{
	if (document.images && (preloadFlag == true))
	{
		var divname = 'box' + arg;
		var imgname = 'link' + arg;
		var img = ly[imgname];
		var div = (NS4)?ly[divname]:ly[divname].style;
		if (div.display != "none")
		{
			div.display = "none";
			img.src = "themes/adc/plus.gif";
		}
		else
		{
			div.display = "block";
			img.src = "themes/adc/minus.gif";
		}
	}
}

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 MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

