<!--
//init the mainframe document
function initMain(mainDoc) {
 top.mainFrame.location.href = mainDoc;
}

function initLeft(leftDoc) {
	if (top.frames.length > 0) {  
		parent.leftFrame.location.href = leftDoc;
	}
}

//load the frame window with a document
function initLeftTop(mainDoc, leftDoc, topDoc) {
	if (top.frames.length == 0) {
	  var currentDoc = window.document.location.href;
	  window.location.href='MainFrameset.htm';
	  parent.topFrame.location.href = topDoc;
	  parent.leftFrame.location.href = leftDoc;
	  parent.mainFrame.location.href = mainDoc;
	}
	else {
		initLeft(leftDoc)
	}
}

//findet den Querystring z.B "?servicesFrameSet&mainDoc.htm&leftDoc.htm" und lädt die Dokumente im main Frame
function loadMainFrame() {
	if(self.location.search.length > 0) {
		var laenge = self.location.search.length;
		var newURLs = self.location.search.substring(1,laenge);
		var newURLList = newURLs.split("&");
		if (document.images) {
			self.mainFrame.location.replace(newURLList[0] + "?" + newURLList[1] + "&" + newURLList[2]);
		}
		else {
			self.mainFrame.location.href = (newURLList[0] + "?" + newURLList[1] + "&" + newURLList[2]); 
		}
	}
}

//findet den Querystring z.B "?mainDoc.htm&leftDoc.htm" und lädt die Dokumente im linken und rechten Frame
function loadPage() {
	if(self.location.search.length > 0) {
		var laenge = self.location.search.length;
		var newURLs = self.location.search.substring(1,laenge);
		var newURLList = newURLs.split("&");
		if (document.images) {
			self.rightFrame.location.replace(newURLList[0]);
			if (newURLList.length > 1) {
				self.leftFrame.location.replace(newURLList[1]);
			}
		}
		else {
			self.rightFrame.location.href = (newURLList[0]); 
			if (newURLList.length > 1) {
				self.leftFrame.location.href = (newURLList[1]); 
			}
		}
	}
}

function replaceMainFrame(frameset, rightDoc, leftDoc) {
	var ZielDatei = "reload.htm?" + frameset + "&" + rightDoc + "&" + leftDoc;
	//Das Zerstückeln der kritischen Befehle ('to'+'p.lo'+'cation) hat den Sinn, 
	//einer Abwertung (bei Suchmaschinen) durch unerwünschte Javascript-Befehle (top.location) zu entgehen.
	var togo = 'to'+'p.lo'+'cation.';
	if (parent.frames.length == 0 || !parent.leftFrame)
	{ 
		if(document.images)
			eval(togo + 'replac'+'e(ZielDatei)'); 
		else 
			eval(togo + 'hre'+'f = ZielDatei');
	}
}

//-->

