/* 

Copyright ©2000 by getunik. Neue Medien GmbH. All rights reserved!
http://www.unm.ch ||  info@unm.ch

Library Name:       img_replace.js

Required Libraries: -
Optional Libraries: -

Function:           This library handles the core image-replacements. 
                    
HTML-Spec.:         Necessary declarations are:
                    
                    preload("name", "Image Normal", "Image Active");
                    
                      Example:
                      preload("caro", "#root#images/btn_blau_off.gif", "#root#images/btn_blau_over.gif");
                      
                      <a href="easy_caro.cfm" onMouseOver="on('caro');" onMouseOut="off('caro');">
                        <img src="#root#images/btn_blau_off.gif" width="72" height="17" alt="" border="0" name="caro">
                      </a>
                      
Created by:         Marco Zaugg, 10/10/1999

Modified by:        Marco Zaugg, 05/04/2000


*/

<!-- hide from older Browser


	Img = new Array();
	var ImgCount = 0;
		
	function preload(name, loffSrc, lonSrc, lon1Src) {  
	Img[ImgCount] = new Array(5);
	Img[ImgCount][0] = new Image();
	Img[ImgCount][0].src = loffSrc;
	Img[ImgCount][1] = new Image();
	Img[ImgCount][1].src = lonSrc;
	Img[ImgCount][2] = name;
  Img[ImgCount][3] = new Image();
	Img[ImgCount][3].src = lon1Src;
	ImgCount++;
	}
		
	function on(name){
		      
	 for (i = 0; i < ImgCount; i++) {
		    
		if (document.images[name] != null)
		        if (name == Img[i][2]) { 
		          	
		           // ATTENTION This javascript has a bug on NC 4.03 Macintosh
					document.images[name].src = Img[i][1].src;
		        }
		}
	}
  
  function off(name){
		 		
	 for (i = 0; i < ImgCount; i++) {

	if (document.images[name] != null)
		 if (name == Img[i][2]) { 
		             
		  // ATTENTION This javascript has a bug on NC 4.03 Macintosh
		 	 document.images[name].src = Img[i][0].src;
		 }
	} 
	}
		


  	preload("getunik", "/images/btn_getunik_off.gif", "/images/btn_getunik_on.gif");

// -->