var frameHeight;
var frameWidth;
//var shopBaseUrl, shopBaseUrlAction;

function shopBaseUrlActionF(action){
	//IFRAME Verarbeitung  
	//dummy Seite zum Umschalten auf den IFrame wird aufgerufen
	//alert('shopBaseUrlActionF '+action);
	if (action.indexOf("calendarordering") > 0 ) {
  	var url = window.location.href;
    var ind = url.indexOf("index.php?id=");
    url = url.substr(0,ind+13);
    url = url + "uploadcal";
  	window.location.href = url;
  	//alert ("calendar "+url);
  	}
	else if (action.indexOf("activex") > 0){    
  	var url = window.location.href;
    var ind = url.indexOf("index.php?id=");
    url = url.substr(0,ind+13);
    url = url + "uploadactivex";
  	window.location.href = url;
    //alert("activex "+ url);  	
  }	
  else {    
  	var url = window.location.href;
    var ind = url.indexOf("index.php?id=");
    url = url.substr(0,ind+13);
    url = url + "onlineorder";
  	window.location.href = url;
    //alert("Bilder "+ url);  	
  }
}

function getURL() {
	var url = window.location.href;
	//alert(url);
}

 //f�r Kontaktformular
function testdata(){
			if (document.kontakt.email.value == ""){
				alert('Bitte geben sie Ihre E-Mail-Adresse ein!');				
				}			
			
			else if ((document.kontakt.Name.value == "") || (document.kontakt.Vorname.value == "")) {
				alert('Bitte geben sie Ihren Vor- und Nachnamen ein!');			
				}
			else if (document.kontakt.kontakttext.value == ""){
				alert('Bitte geben sie einen Inhalt ein!');			
				}								
			else if ((document.kontakt.email.value != "") && (document.kontakt.Name.value != "") && (document.kontakt.Vorname.value != "") && (document.kontakt.kontakttext.value != "")){
					document.kontakt.submit();					
				}			
			
		}		
		

function getNewHeight() {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
    return document.body.offsetHeight;
  } else {
    return 0;
  }
}

function testDialog() {
 
 if (document.getElementById("iframe_shop")){
  //alert("Hat geklappt");
  frameHeight = getNewHeight();
  //document.getElementById("shopcontent").height = frameHeight - 100;
  document.getElementById("iframe_shop").height = frameHeight - 170;
  document.getElementById("iframe_shop").width = 732;
  mwidth = document.getElementById("iframe_shop").width;
  //alert("Hat geklappt "+ document.getElementById("iframe_shop").height);
  }
}

function loadWithNewHeight() {
if (document.getElementById("iframe_shop")){
  if (frameHeight != getNewHeight() )
  {
    frameHeight = getNewHeight();
  //  document.getElementById("shopcontent").height = frameHeight - 100;
    document.getElementById("iframe_shop").height = frameHeight - 170;
    //document.getElementById("iframe_shop").width = 732;
    frameWidth = document.getElementById("iframe_shop").width;

  }
 }
}

/* Ueberwachung von Netscape initialisieren */
if (!window.frameHeight && window.innerHeight) {
  window.onresize = loadWithNewHeight;
  frameHeight = getNewHeight();
  //alert("Hat geklappt - FireFox" + frameWidth);
}
/* Internet Explorer*/
if (!window.frameHeight && document.body && document.body.offsetHeight) {
  window.onresize = loadWithNewHeight;
  frameHeight = getNewHeight();
  //alert("Hat geklappt - IE" + frameWidth);
}





