
	function openEditorForNew(page, cnt, type, language) {
		openWindow("syndicat/editor/editor.php?pageID="+page+"&containerID="+cnt+"&doctype="+type+"&lang="+language, "editor", 710, 500)
	}
  
	function openEditorForExisting(id, nid, language) {
		openWindow("syndicat/editor/editor.php?&id="+id+"&language="+language+"&nid="+nid, "editor", 710, 500)
	}
	
	function reload() {
		history.go(0);
	}
	
	function getHelp(){
		window.open("http://www.aquantum.net/syndicat/default.asp?id=help","syndicat_help");
	}


	function check_client() {      
	
	    var client = "";
	    var bName = navigator.appName;
	    var bVer = parseInt(navigator.appVersion);
	
	    if(bName == "Netscape" && bVer > 4) client = "n6";
	    else if(bName == "Netscape" && bVer == 4) client = "n4";
	    else if(bName == "Netscape" && bVer == 3) client = "n3";
	    else if(bName == "Netscape" && bVer == 2) client = "n2";
	    
	    else if(bName == "Microsoft Internet Explorer" && bVer >= 4) client="e4";
	    else if(bName == "Microsoft Internet Explorer" && bVer >= 2) client="e3";
	    else client = "x";
	    
	    return client;
	}
	
	var array
	var imgLoaded = false;
	
	function openWindow(dir, name, width, height, scroll, toolbar) 	{
		dirName=dir
		param= "width="+width+",height="+height+",screenX=0,screenY=0, top=0, left=0, menubar=no, locationbar=no, resizeable=no, status=no";
	    
	    if(toolbar)
	      param+=",toolbar=yes"
		
		if(scroll)
			param+=",scrollbars=yes"
		
		winName= name.replace(/ /,"_")
		
		if(winName!='popup' && winName !='sitemap')
			winName+= Math.floor(Math.random()*100000);
		
		window.open(dirName, winName, param);
	}

	function getLeftOffset(){
		
	// bei zentriertem Inhalt linken Rand berechnen: 
		foo = Math.round((document.breite.width-788)/2);
	//	foo = 0;
		return foo;
		
	}

	function getStyleObject(objectId) {
	    // cross-browser function to get an object's style object given its id
	    if(document.getElementById && document.getElementById(objectId)) {
		// W3C DOM
		return document.getElementById(objectId).style;
	    } else if (document.all && document.all(objectId)) {
		// MSIE 4 DOM
		return document.all(objectId).style;
	    } else if (document.layers && document.layers[objectId]) {
		// NN 4 DOM.. note: this won't find nested layers
		return document.layers[objectId];
	    } else {
		return false;
	    }
	} // getStyleObject
	
	function changeObjectVisibility(objectId, newVisibility) {
	    // get a reference to the cross-browser style object and make sure the object exists
	    var styleObject = getStyleObject(objectId);
	    if(styleObject) {
		styleObject.visibility = newVisibility;
		return true;
	    } else {
		// we couldn't find the object, so we can't change its visibility
		return false;
	    }
	} // changeObjectVisibility
	
	function moveObject(objectId, newXCoordinate, newYCoordinate) {
	    // get a reference to the cross-browser style object and make sure the object exists
	    var styleObject = getStyleObject(objectId);
	    if(styleObject) {
		styleObject.left = newXCoordinate;
		styleObject.top = newYCoordinate;
		return true;
	    } else {
		// we couldn't find the object, so we can't very well move it
		return false;
	    }
	} // moveObject

	xOffset = 10
	yOffset = -15

	function showPopup (targetObjectId, eventObj, xPos, yPos) {
	    if(eventObj) {
		// hide any currently-visible popups
		hideCurrentPopup();
		// stop event from bubbling up any farther
		eventObj.cancelBubble = true;
		
		// move popup div to current cursor position 
		// (add scrollTop to account for scrolling for IE)
		
		if(xPos)
			var newXCoordinate = xPos + getLeftOffset(); // feste x-Position + offset
		else 
			var newXCoordinate = (eventObj.pageX)?eventObj.pageX + xOffset:eventObj.x + xOffset + ((document.body.scrollLeft)?document.body.scrollLeft:0);
	
		if(yPos)
			var newYCoordinate = yPos; // feste y-Position
		else 
			var newYCoordinate = (eventObj.pageY)?eventObj.pageY + yOffset:eventObj.y + yOffset + ((document.body.scrollTop)?document.body.scrollTop:0);
		
		moveObject(targetObjectId, newXCoordinate, newYCoordinate);
		// and make it visible
		if( changeObjectVisibility(targetObjectId, 'visible') ) {
		    // if we successfully showed the popup
		    // store its Id on a globally-accessible object
		    window.currentlyVisiblePopup = targetObjectId;
		    return true;
		} else {
		    // we couldn't show the popup, boo hoo!
		    return false;
		}
	    } else {
		// there was no event object, so we won't be able to position anything, so give up
		return false;
	    }
	} // showPopup

	function hideCurrentPopup() {
	    // note: we've stored the currently-visible popup on the global object window.currentlyVisiblePopup
	    if(window.currentlyVisiblePopup) {
		changeObjectVisibility(window.currentlyVisiblePopup, 'hidden');
		window.currentlyVisiblePopup = false;
	    }
	} // hideCurrentPopup



	function findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}

	function preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.p) d.p=new Array();
	    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
	}

	function swapImgRestore() { //v3.0
	  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function swapImage() { //v3.0
	  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	
	function reloadPage(init) {  //reloads the window if Nav4 resized
	  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
	  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
	}
	reloadPage(true);
	
	function changeProp(objName,x,theProp,theValue) { //v6.0
	  var obj = findObj(objName);
	  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
	    if (theValue == true || theValue == false)
	      eval("obj."+theProp+"="+theValue);
	    else eval("obj."+theProp+"='"+theValue+"'");
	  }
	}