var NewURL="";

/* Ueberpruefe ob in IFrame*/
function loadInFrameset()
{
	var iframe = document.getElementById("mainFrame");
	if (window.top!=window.self){
	}
	else {
		//alert("kein iframe");
		NewURL="index.html"+"?locus="+window.location.href;
		if ((typeof(window.location.replace)=="function")||
			(typeof(window.location.replace)=="object"))
		  parent.location.replace(NewURL);
		else
		  parent.location.href=NewURL;
	}
}

/*setze inhalt of iframe*/
function setIFrame(){
  locus=parent.location.href.search(/locus=.+/);
/* wenn locus nicht gefunden, dann abbrechen */
  if (locus<0)
    return;
  locus+=6;
  NewURL=parent.location.href.substr(locus,parent.location.href.length);
  
  var iframe = document.getElementById("mainFrame");
  if(iframe){
  	iframe.src=NewURL;
  }
  else {
  	alert("mainFrame nicht gefunden");
  }
}



