/* Functions programmed for the NDDHA by:
   Brock Holum
   brock@technomeccalabs.com
   http://www.technomeccalabs.com
*/

// simple function to launch new windows
function launch(url,name,howWide,howHigh)
{
	var i = 0;
	var newWindow = new Array();
	newWindow[i] = window.open(url,name,'toolbar=no,scrollbars=no,width='+howWide+',height='+howHigh+'');
	newWindow[i].focus();
	i++;
}


/******************************************/
/********* IMAGE FUNCTIONS BELOW **********/
/******************************************/
function preload(name, first, second) 
{
  	if (browserOK) 
  	{
  		images[imgCount] = new Array(3);
    		images[imgCount][0] = new Image();
    		images[imgCount][0].src = first;
    		images[imgCount][1] = new Image();
    		images[imgCount][1].src = second;
    		images[imgCount][2] = name;
    		imgCount++;
  	}
}

function on(name)
{
	if (browserOK) 
	{
  	   for (i = 0; i < imgCount; i++) 
  	   {
  	   	if (document.images[images[i][2]] != null)
        	if (name != images[i][2]) 
        	{
          		document.images[images[i][2]].src = images[i][0].src;
        	} 
        	else 
        	{
           		document.images[images[i][2]].src = images[i][1].src;
        	}
    	   }
  	}
}

function off()
{
	if (browserOK) 
	{
        	for (i = 0; i < imgCount; i++) 
        	{
      			if (document.images[images[i][2]] != null)
        			document.images[images[i][2]].src = images[i][0].src;
    		}
  	}
}