/* linea js collection */


var browser_ok;
var imgs;
var total_img;
var preload;
var img_butt_class;

img_butt_class = new Array ();
img_butt_class["hi"] = "img_butt_active";
img_butt_class["lo"] = "img_butt";

img_x = new Array ();
img_y = new Array ();


if (((navigator.appName.indexOf("Microsoft") > -1 )&&(parseInt(navigator.appVersion.substring(0)) >=4))|| ((navigator.appName.indexOf("Netscape") > -1 )&&(parseInt(navigator.appVersion.substring(0)) >=4)))
{browser_ok="si";}

/* --------------------------------------------------------------------------*/

/* this is for the **** windows explorer, to teach him makin a good navigation */

sfHover = function() {
			var sfEls = document.getElementById("bilder").getElementsByTagName("LI");
			for (var i=0; i<sfEls.length; i++) {
				sfEls[i].onmouseover=function() {
					this.className+=" sfhover";
				}
				sfEls[i].onmouseout=function() {
					this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
				}
			}
		}

		if (window.attachEvent) window.attachEvent("onload", sfHover);


/* --------------------------------------------------------------------------*/
/* image slide thing functions */

function preload_img() {

if (browser_ok && imgs) {

total_img = (imgs.length);
preload = new Array ()

for (i = 1; i <= total_img; i++) {
		preload[i] = new Image();
        preload[i].src = imgs[i-1];
	}
	}
}



function img_display(num) {	

if (document.getElementById('projekt_image') && document.getElementById('projekt_image').src) {
if (preload && preload[num] && preload[num].src) {
	
	// change img
	document.getElementById('projekt_image').src = preload[num].src;
	
	if (img_x[num] && img_y[num]) {
	    document.getElementById('projekt_image').width = img_x[num];
	    document.getElementById('projekt_image').height = img_y[num];
	    }
	
if (document.getElementById('img_butt_'+num) && document.getElementById('img_butt_'+num).className) {
	
	// change active butt
	document.getElementById('img_butt_'+num).className = img_butt_class["hi"] ;
	
	if (total_img && total_img>0) {
		for (i = 1; i <= total_img; i++) {
		if (i!=num && document.getElementById('img_butt_'+i) && document.getElementById('img_butt_'+i).className) {
			document.getElementById('img_butt_'+i).className = img_butt_class["lo"] ;
			}
		}
	}
	}
	
	}
	}	
}

