// *******************************************************************
//	The following section is for image swaping of the header
//	images first it preloads them then swaps images as needed
// *******************************************************************

 var preloadFlag = false;
{
  var the_images = new Array(
	  '/graphics/on_membership.gif',
	  '/graphics/on_meetings.gif',
	  '/graphics/on_publications.gif',
	  '/graphics/on_education.gif',
	  '/graphics/on_employment.gif',
	  '/graphics/on_government.gif',
	  '/graphics/on_directories.gif',
	  '/graphics/on_research.gif',
	  '/graphics/on_international.gif',
	  '/graphics/off_membership.gif',
  	  '/graphics/off_meetings.gif',
  	  '/graphics/off_publications.gif',
  	  '/graphics/off_education.gif',
  	  '/graphics/off_employment.gif',
  	  '/graphics/off_government.gif',
  	  '/graphics/off_directories.gif',
  	  '/graphics/off_research.gif',
	  '/graphics/off_international.gif'
	  );
  preloadImages(the_images);
}

function preloadImages(the_images_array) {
	if (document.images) {
		on_membership = newImage("/graphics/on_membership.gif");
		on_meetings = newImage("/graphics/on_meetings.gif");
		on_publications = newImage("/graphics/on_publications.gif");
		on_education = newImage("/graphics/on_education.gif");
		on_employment = newImage("/graphics/on_employment.gif");
		on_government = newImage("/graphics/on_government.gif");
		on_directories = newImage("/graphics/on_directories.gif");
		on_research = newImage("/graphics/on_research.gif");
		on_international = newImage("/graphics/on_international.gif");
		off_membership = newImage("/graphics/off_membership.gif");
		off_meetings = newImage("/graphics/off_meetings.gif");
		off_publications = newImage("/graphics/off_publications.gif");
		off_education = newImage("/graphics/off_education.gif");
		off_employment = newImage("/graphics/off_employment.gif");
		off_government = newImage("/graphics/off_government.gif");
		off_directories = newImage("/graphics/off_directories.gif");
		off_research = newImage("/graphics/off_research.gif");
		off_international = newImage("/graphics/off_international.gif");
		preloadFlag = true;
	}
}
function newImage(arg) {
  if (document.images) {
	rslt = new Image();
	rslt.src = arg;
	return rslt;
  }
}
function changeImages(a) {
  if (document.images && (preloadFlag == true)) {
	for (var i=0; i<changeImages.arguments.length; i+=2) {
 	  document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
	}
  }
}


// *******************************************************************
//	This is a bleepbleep function because icsc has put choosePic 
//	on alot of different pages in the body tag. copying the front
// 	html code which is no longer used on the front page however 
//	javascript gives errors when a page load becasuse it can't find
//	choosePic.
// *******************************************************************

function choosePic(){
// nothing to be done;
}

// *******************************************************************
//	The following section is for image swaping of the left
//	menu images first it preloads them then swaps images as
//	the mouse goes over the image. No preloading of images in
//	this section that was added by icsc because it would cause
//	to much	overhead on each page.
// *******************************************************************


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_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_findObj(n, d) { //v3.0
  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); 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];}
}

