
<!---

	function newwnd(page,_width,_height)
	{
		zufall=Math.random();
		zufall*=16;
		zufall=Math.ceil(zufall);
		
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2-25;
		window.open(page, 'detail' + zufall, 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	}

	function newwnd_noscroll(page,_width,_height)
	{
		zufall=Math.random();
		zufall*=16;
		zufall=Math.ceil(zufall);
		
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2-25;
		window.open(page, 'detail' + zufall, 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}

	function newwnd_fullscreen(page,_width,_height)
	{
		zufall=Math.random();
		zufall*=16;
		zufall=Math.ceil(zufall);
		
		window.open(page, 'detail' + zufall, 'top=5,left=5,width='+(screen.width-10)+',height='+(screen.height-30)+',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	}

	function confirm(link)
	{
		_width = 350;
		_height = 230;
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2;
		window.open(link, 'confirm', 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}

	function fileman(link)
	{
		_width = 550;
		_height = 180;
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2;
		window.open(link, 'fileman', 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}

	function showwnd(change)
	{
		window.open(change, 'wnd', 'top=10,left=10,width=1000,height=700,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	}

	function sizeEditDiv() {

		// gr&ouml;sse des con_ver_edit Div's anpassen
		if (window.innerHeight) hoehe = window.innerHeight;
		else if (document.body && document.body.offsetHeight) hoehe = document.body.offsetHeight;
		if (window.innerWidth) breite = window.innerWidth;
		else if (document.body && document.body.offsetWidth) breite = document.body.offsetWidth;
		
		document.getElementById(sizeEditDiv_div_name).style.height = hoehe-sizeEditDiv_margin_top; 
		document.getElementById(sizeEditDiv_div_name).style.width = breite-sizeEditDiv_margin_left; 
	}

	function chimg(ID_Content, Field, neu)
	{
		change = '/verwaltung/bilder/frame.php?site=' + ID_Content + '&field=' + Field + '&new=' + neu + '&img_openNode=' + img_openNode;
		window.open(change, 'bildpool', 'top=10,left=10,width=1000,height=700,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	}

	function chooseimg(Field, Artnr)
	{
		change = '/image/frame.php?field=' + Field + '&ArtikelNr=' + Artnr;
		window.open(change, 'bildpool', 'top=5,left=5,width='+(screen.width-10)+',height='+(screen.height-30)+',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	}

	function chooseimg_cmsgal(Field, site)
	{
		change = '/image/frame.php?field=' + Field + '&site=' + site;
		window.open(change, 'bildpool', 'top=5,left=5,width='+(screen.width-10)+',height='+(screen.height-30)+',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	}

	function chswf(ID_Content, Field, neu)
	{
		change = '/verwaltung/flash/frame.php?site=' + ID_Content + '&field=' + Field + '&new=' + neu;
		window.open(change, 'flashpool', 'top=10,left=10,width=1000,height=700,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes');
	}
	
	function delimg(Field)
	{
		bild = document.getElementById(Field);
		bild.value='';
		imgbild = document.getElementById('img_'+Field);
		imgbild.src='';
	}

	function chkicker(ID_Content, Field, neu)
	{
		change = '/verwaltung/kicker/index.php?site=' + ID_Content + '&field=' + Field + '&new=' + neu;
		window.open(change, 'kickerpool', 'top=10,left=10,width=800,height=600,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	}

	function delkicker(Field)
	{
		document.getElementById(Field).value = '';  
	}

	function createLink(Field, selText)
	{
		change = '/verwaltung/content/index.php?field=' + Field + '&selText=' + selText;
		window.open(change, 'linkpool', 'top=10,left=10,width=800,height=600,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes');
	}

	function showimg_db(img_nr, size)
	{
		bildname = '/data/imgwnd.php?ID=' + img_nr + '&View='+ size;

		_width=0;
		_height=0;
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2;
		window.open(bildname, 'bild_gal', 'top=' + _top + ',left=' + _left + ',width=700,height=750,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}

	function showimg_file(img_name)
	{
		bildname = '/data/imgwnd.php?bild=' + img_name;

		_width=50;
		_height=50;
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2;
		window.open(bildname, 'bild_gal', 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}
	
	// Inputfield Filter DropDown
	var inputid_sav = -1;
	function openChooseNULL(inputid, button) {
		choosediv = document.getElementById('choose_NULL');
	
		if (inputid_sav == inputid) { 
			choosediv.style.visibility = "hidden";
			inputid_sav = -1;
			return ;
		}
	
		if (document.getElementById(inputid)) {
			inputfield = document.getElementById(inputid);
			
			choosediv.style.visibility = "visible";
			choosediv.style.width = inputfield.offsetWidth + button.offsetWidth;
			

			_offsetLeft = 0;
			el = inputfield;
			while ((el.offsetParent) && (el.tagName != 'DIV')) { _offsetLeft += el.offsetLeft; el = el.offsetParent; }

			choosediv.style.left = _offsetLeft;

			_offsetTop = 0;
			el = inputfield;
			while ((el.offsetParent) && (el.tagName != 'DIV')) { _offsetTop += el.offsetTop; el = el.offsetParent; }

			choosediv.style.top = _offsetTop + inputfield.offsetHeight + 1;
	
			inputid_sav = inputid;
		}
	}

	// openDivFrame PopUp
	var openDivFrame_sav = -1;
	function closeDivFrame(inputid, divObj) {
		choosediv = window.parent.document.getElementById(divObj);
	
		choosediv.style.visibility = "hidden";
		openDivFrame_sav = -1;
		return ;
	}
	function openDivFrame(inputid, divObj) {
		choosediv = document.getElementById(divObj);
/*	
		if (openDivFrame_sav == inputid) { 
			choosediv.style.visibility = "hidden";
			openDivFrame_sav = -1;
			return ;
		}
*/	
		if (document.getElementById(inputid)) {
			inputfield = document.getElementById(inputid);
			
			choosediv.style.visibility = "visible";
//			choosediv.style.width = inputfield.offsetWidth;
			

			_offsetLeft = 0;
			el = inputfield;
			while ((el.offsetParent) && (el.tagName != 'DIV')) { _offsetLeft += el.offsetLeft; el = el.offsetParent; }

			choosediv.style.left = _offsetLeft ;//- (inputfield.offsetWidth-choosediv.style.width);

			_offsetTop = 0;
			el = inputfield;
			while ((el.offsetParent) && (el.tagName != 'DIV')) { _offsetTop += el.offsetTop; el = el.offsetParent; }

			choosediv.style.top = _offsetTop + inputfield.offsetHeight;
	
			openDivFrame_sav = inputid;
		}
	}

	function searchDivFrame(txt, iFrameObj) {
		
		iFrame = document.getElementById(iFrameObj);
		locationStr = iFrame.src;
		if ((ipos = iFrame.src.indexOf('searchStr='))> -1) {
			locationStr = iFrame.src.substring(0, ipos);
		}
		
		iFrame.src =  locationStr + '&searchStr=' + txt;
		
	}

	/* Ersetzt document.getElementById */
	function $() {
	  var elements = new Array();
	  for (var i = 0; i < arguments.length; i++) {
	    var element = arguments[i];
	    if (typeof element == 'string')
	      element = document.getElementById(element);
	    if (arguments.length == 1)
	      return element;
	    elements.push(element);
	  }
	  return elements;
	}

//-->
