// siehe body onLoad
// window.onload = function() {initPage()}

function initPage(){
document.getElementById("menuM").style.height = document.getElementById("menuText").offsetHeight-98+"px";
document.getElementById("contentM").style.height = document.getElementById("contentText").offsetHeight+"px";
document.getElementById("menuBox").style.display="inline";
document.getElementById("contentBox").style.display="inline";
if(document.getElementById("menuM").offsetHeight > 150){
/*
	document.getElementById("logoschatten").style.height= "28px";
	document.getElementById("logoschatten").style.display="inline";
	if(document.getElementById("menuM").offsetHeight < 250){
		document.getElementById("logoschatten").style.height= "10px";
		document.getElementById("logoschatten").style.display="inline";
	}
*/
 document.getElementById("schattenkreuz").style.display="inline";
}

initImage();
}
function initImage() {
  imageId = 'thephoto';
  image = document.getElementById(imageId);
  setOpacity(image, 0);
  image.style.visibility = 'visible';
  fadeIn(imageId,0);

  //
}
function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;

  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";

  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;

  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;

  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}
function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 10;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
    }
  }
}
document.write("<style type='text/css'> #thephoto {visibility:hidden;} </style>");
function over(){
var image = new Image();
image.src = "pics/home_hover.jpg";
window.document.getElementById("homeimage").src = image.src;
}
function out(){
var image = new Image();
image.src = "pics/home.jpg";
window.document.getElementById("homeimage").src = image.src;
}

// AJAX fuer layer-fenster
bild = "";
function fenster(url) {
 // bild = "<img style='margin-right:5px;float:left;' src='../content/Personal-Shopping/pics/"+url+".jpg' />";
 url = "/content/Personal-Shopping/"+url+".txt";
 http_request = false;
 if (window.XMLHttpRequest) { // Mozilla, Safari,...
  http_request = new XMLHttpRequest();
  if (http_request.overrideMimeType) http_request.overrideMimeType('text/xml');
 }
 else if (window.ActiveXObject) { // IE
  try {
   http_request = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
   try {
    http_request = new ActiveXObject("Microsoft.XMLHTTP");
   } catch (e) {}
  }
 }
 if (!http_request) {
  alert("Kann keine XMLHTTP-Instanz erzeugen!");
  return false;
 }
 http_request.onreadystatechange = ausgabe;
 http_request.open('GET', url, true);
 http_request.send(null);
}
function ausgabe() {
 if (http_request.readyState == 4) {
  if (http_request.status == 200) {
   document.getElementById("pfenster_content").innerHTML = bild+http_request.responseText;
   document.getElementById("pfenster").style.visibility = "visible";
	}
 }
}
