﻿// JavaScript Document

// Region "onload"

function waehleframe(frame) {
	if (frame != 'index') {
		document.location.href = 'index.htm?' + frame;
	}
	else {
		if (window.location.search.replace('?', '') != '') {
			var Frame_iframe = document.getElementById('iframe');
				Frame_iframe.src = window.location.search.replace('?', '') + window.location.hash;
		}
	}
}

function checklevel(frame)
{
	if (top == self)
		self.location = '../index.htm?' + frame;
}

function resizeiframe()
{
	var margin_top = 0;
	if (!isNaN(parseInt(document.body.style.marginTop))) {
		margin_top = parseInt(document.body.style.marginTop);
	}

	var margin_bottom = 0;
	if (!isNaN(parseInt(document.body.style.marginBottom))) {
		margin_bottom = parseInt(document.body.style.marginBottom);
	}
	
	var size = 0;
	if (document.body.clientHeight) {
		size = document.body.clientHeight + margin_top + margin_bottom;
	}
	else {
		size = self.innerHeight + margin_top + margin_bottom;
	}

	var mindesthoehe = 600;
	var Frame_iframe = parent.document.getElementById('iframe');

	if (size > mindesthoehe) {
		Frame_iframe.style.height = size + 'px';
	}
	else {
		Frame_iframe.style.height = mindesthoehe + 'px';
	}
}

function ladebilder(srcArray)
{
	var bilder = new Array();
	for (var i = 0; i < srcArray.length; i++) {
		bilder[i] = new Image;
		bilder[i].src = srcArray[i];
	}
}

// End Region "onload"
