/* === Größenberechnungen ==================================================================================================== */
function GetSizeStrMin (iMinus, iMin) {
	var iH = WinHeight();
	var iW = WinWidth();
	iSize = GetLess (iW, iH);	
	if (iSize != iW) {
		iSize = iSize-iMinus;
		if (iSize < iMin) { iSize = iMin };
		return "height='"+iSize+"'";
	} else {
		iSize = iSize-iMinus;
		if (iSize < iMin) { iSize = iMin };
		return "width='"+iSize+"'";
	}	
}

function GetSizeStr (iMinus) {
	var iH = WinHeight();
	var iW = WinWidth();
	iSize = GetLess (iW, iH);	
	if (iSize != iW) {
		iSize = iSize-iMinus;
		return "height='"+iSize+"'";
	} else {
		iSize = iSize-iMinus;
		return "width='"+iSize+"'";
	}	
}

function GetLess (iW, iH) {
	if (iW > iH) {
		return iH;
	} else {
		return iW;
	}	
}

function WinWidth () {
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
    return document.body.offsetWidth;
  } else {
    return 0;
  }
}

function WinHeight () {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
	return document.body.offsetHeight;
  } else {
    return 0;
  }
}

function WinWidthMinMax (Min,Max) {
	var iW = WinWidth();
  if (iW > Max) {
    return Max;
  } else if (iW < Min) {
    return Min;
  } else {
    return iW;
  }
}

function WinHeightMinMax (Min,Max) {
	var iH = WinHeight();
  if (iH > Max) {
    return Max;
  } else if (iH < Min) {
    return Min;
  } else {
    return iH;
  }
}

function WinRefresh () {
  if (iWidth != WinWidth() || iHeight != WinHeight())
    location.href = location.href;
}

/* === Frames ==================================================================================================================================== */

function Set2Source(fr1s, fr1n, fr2s, fr2n) {
	fr1=eval("parent."+fr1n); fr1.location.href = fr1s;
	fr2=eval("parent."+fr2n); fr2.location.href = fr2s;
}

function Set3Source(fr1s, fr1n, fr2s, fr2n, fr3s, fr3n) {
	fr1=eval("parent."+fr1n); fr1.location.href = fr1s;
	fr2=eval("parent."+fr2n); fr2.location.href = fr2s;
	fr3=eval("parent."+fr3n); fr3.location.href = fr3s;
}

function Set4Source(fr1s, fr1n, fr2s, fr2n, fr3s, fr3n, fr4s, fr4n) {
	fr1=eval("parent."+fr1n); fr1.location.href = fr1s;
	fr2=eval("parent."+fr2n); fr2.location.href = fr2s;
	fr3=eval("parent."+fr3n); fr3.location.href = fr3s;
	fr4=eval("parent."+fr3n); fr4.location.href = fr4s;
}

/* === Vorlagen ================================================================================================================================== */

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function test() {
	alert("Test okay");
}

