var theImages = new Array()

theImages[0] = 'img/header/bf_pic_02.jpg'
theImages[1] = 'img/header/bf_pic_06.jpg'
theImages[2] = 'img/header/bf_pic_11.jpg'
theImages[3] = 'img/header/bf_pic_18.jpg'
theImages[4] = 'img/header/bf_pic_20.jpg'
theImages[5] = 'img/header/bf_pic_25.jpg'
theImages[6] = 'img/header/bf_pic_36.jpg'


var j = 0
var p = theImages.length;

var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'" height="130" width="670">');
}

function resize_me(n)
{
d=0;
ifObj=document.getElementsByName(n)[0];
p=(document.all)?'scroll':'offset';

//eval("ifObj.style.height=window.frames[n].document.getElementsByTagName('body')[0]."+p+"Height+"+d);
zwischen=eval("window.frames[n].document.getElementsByTagName('body')[0]."+p+"Height+"+d);
if (zwischen <= 600) {
	//alert("Kleiner als 600 /"+zwischen);
	eval("ifObj.style.height=600");
	//alert(ifObj.style.height);
} else {
	//alert("Grösser als 600 /"+zwischen);
	eval("ifObj.style.height=window.frames[n].document.getElementsByTagName('body')[0]."+p+"Height+"+d);
}


}

function openPopup(img, pfad) {
	myImg = new Image();
	myImg.src = pfad + img;
	var width = myImg.width;
	var height = myImg.height;
	
	if (!width || !height) {
		width = 640;
		height = 480;
	}
	if (img && width && height) {
		width = Math.min(width, 640);
		height = Math.min(height, 480);
		var popUp = window.open(img,"popUp",'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=' + width + ',height=' + height);
	}
	return true;
}