//  *************************************************************
//  *                                                           *
//  *           Javascript cross-platform library               *
//  *                                                           *
//  *  authors:  Rob Brosnan, Michael Dickson                   *
//  *  created:  20 December, 2000                              *
//  *  revised:  24 March, 2001                                 *
//  *  version:  1.1                                            *
//  *                                                           *
//  *  Copyright 2000, 2001, epimorphic incorporated.           *
//  *  This code may not be used or distributed without prior   *
//  *  permission from epimorphic.  Contact us at               *
//  *                                                           *
//  *          info@epimorphic.com                              *
//  *                                                           *
//  *  or visit us on the web at                                *
//  *                                                           *
//  *          www.epimorphic.com                               *
//  *                                                           *
//  *  NOTE:  + this library must be included in the HEAD part  *
//  *           of the html code, or it will not work properly! *
//  *                                                           *
//  *************************************************************
//  ----------------------------------------------------------
//  | This version of the library is for Internet Explorer 5 |
//  ---------------------------------------------------------
//  

function swap(imgname,imgsrc) {

    // Required variables
    var defloc = "http://news-info.wustl.edu/pub/libs/images/interior/"; //the default image location -> saves some typing
    
    if (document.images[imgname]) {
        document.images[imgname].src = defloc + imgsrc;
    }    
}

function epiPreloadImage(imgUrl) {

    // define a new image
    returnImg = new Image();
    
    // set the source of that image
    returnImg.src = imgUrl;
    
    // return the image
    return returnImg;
}

function go(f) {
	if (f.value!="") {
		location.href = f.value;
	}
	return true;
}

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];}
}
