var frameHeight;
var shopBaseUrl, shopBaseUrlAction;
//shopBaseUrl = 'http://rossmannczshop/shop/';
//shopBaseUrl = 'https://rossmannczshop.test.orwonet.de/shop/';
shopBaseUrl = 'https://shop.rossmanncz.de/shop/';

function shopBaseUrlActionF(action){
	shopBaseUrlAction = shopBaseUrl + action;
	//alert(shopBaseUrlAction);
	window.location.href =shopBaseUrlAction;
	//window.location.focus();
}

function getURL() {
	var url = window.location.href;
	//alert(url);
}

function setUrlIFrame() {
  var res;

  var url = window.location.href;
  var ind = url.indexOf("index.php?id=");
  url = url.substr(ind+13,20);
  //alert(url);

  if (url == "cart") { 
	res = "cartshop"; 
	 document.getElementById("iframe_shop").src = "index.php?id=" + res;
	}
  else if (url == "pricelist") { 
	res = "pricelistshop"; 
	 document.getElementById("iframe_shop").src = "index.php?id=" + res;
	}
  else if (url == "login") { 
	res = "loginshop"; 
	 document.getElementById("iframe_shop").src = "index.php?id=" + res;
	}  
  else if (url == "onlineorder") { 
	res = "directupload"; 
	 document.getElementById("iframe_shop").src = "index.php?id=" + res;
	}  
	//Preislistenseiten haben noch keinen Alias
 else if (url == "digitalpricelist") { 
	res = "189"; 	
	 document.getElementById("iframe_shop").src = "index.php?id=" + res;
	}
else if (url == "toppricelist") { 
	res = "189"; 	
	 document.getElementById("iframe_shop").src = "index.php?id=" + res;
	}
else if (url == "187") { 
	res = "189"; 	
	 document.getElementById("iframe_shop").src = "index.php?id=" + res;
	}
 else if (url == "uploadcal") { 
	res = "directuploadcal"; 	
	 document.getElementById("iframe_shop").src = "index.php?id=" + res;
	}
	
  //document.getElementById("iframe_shop").src = "index.php?id=" + res; 
//alert(res);
}

 //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;
  //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;
  }
 }
}

/* �berwachung von Netscape initialisieren */
if (!window.frameHeight && window.innerHeight) {
  window.onresize = loadWithNewHeight;
  frameHeight = getNewHeight();
}
/* Internet Explorer*/
if (!window.frameHeight && document.body && document.body.offsetHeight) {
  window.onresize = loadWithNewHeight;
  frameHeight = getNewHeight();
 
}




