<!--
function show(x) {
	var d=document;
	if(d.all) d.all[x].style.display="block";
	if(d.getElementById) d.getElementById(x).style.display="inline";
	}
function hide(x) {
	var d=document;
	if(d.all) d.all[x].style.display="none";
	if(d.getElementById) d.getElementById(x).style.display="none";
	}
function preview_div(){
	var d=document;
	var n=d.forms["formular"].elements['name'].value;
	var t=d.forms["formular"].elements['text'].value;
	var o="<h1>"+n+"</h1>"+t;
	o=o.replace(/\[more\]/gi,"<div style=\"width:100%;border-top:1px solid #ccc;height:1px;font-size:8pt;text-align:right;color:#ccc;\">more...</div>");
	o=o.replace(/\[album\]/gi,"<div style=\"width:300px;border:1px solid #cccccc;height:250px;\">Albumübersicht</div>");
	o=o.replace(/\[url/gi,"<a");
	o=o.replace(/\[\/url\]/gi,"</a>");
	o=o.replace(/\[/gi,"<");
	o=o.replace(/\]/gi,">");
	if(d.all){d.all["p_div"].innerHTML=o;}
	if(d.getElementById){d.getElementById("p_div").innerHTML=o;}
}
function insert(aTag, eTag) {
  var input = document.forms['formular'].elements['text'];
  input.focus();
  /* für Internet Explorer */
  if(typeof document.selection != 'undefined') {
    /* Einfügen des Formatierungscodes */
    var range = document.selection.createRange();
    var insText = range.text;
    range.text = aTag + insText + eTag;
    /* Anpassen der Cursorposition */
    range = document.selection.createRange();
    if (insText.length == 0) {
      range.move('character', -eTag.length);
    } else {
      range.moveStart('character', aTag.length + insText.length + eTag.length);      
    }
    range.select();
  }
  /* für neuere auf Gecko basierende Browser */
  else if(typeof input.selectionStart != 'undefined')
  {
    /* Einfügen des Formatierungscodes */
    var start = input.selectionStart;
    var end = input.selectionEnd;
    var insText = input.value.substring(start, end);
    input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end);
    /* Anpassen der Cursorposition */
    var pos;
    if (insText.length == 0) {
      pos = start + aTag.length;
    } else {
      pos = start + aTag.length + insText.length + eTag.length;
    }
    input.selectionStart = pos;
    input.selectionEnd = pos;
  }
  /* für die übrigen Browser */
  else
  {
    /* Abfrage der Einfügeposition */
    var pos;
    var re = new RegExp('^[0-9]{0,3}$');
    while(!re.test(pos)) {
      pos = prompt("Einfügen an Position (0.." + input.value.length + "):", "0");
    }
    if(pos > input.value.length) {
      pos = input.value.length;
    }
    /* Einfügen des Formatierungscodes */
    var insText = prompt("Bitte geben Sie den zu formatierenden Text ein:");
    input.value = input.value.substr(0, pos) + aTag + insText + eTag + input.value.substr(pos);
  }
}/*
function insTxt(varE, varTxt) {
	document.forms['formular'].elements[varE].value=varTxt;
}

function  getP(obj) {
  var pos = { x:0, y:0 };
  do {
    pos.x += obj.offsetLeft;
    pos.y += obj.offsetTop;
  } while (obj = obj.offsetParent);

  return pos;
}

function placeMnu() {
	var m={x:0, y:0, i:""};
	var c={x:0, y:0, i:""};
	var p={x:0, y:0};
		
	m.i=document.getElementById('js_mastermenu');
	c.i=document.getElementById('js_childmenu');
	
	p=getP(m.i);
	m.x=p.x;
	m.y=p.y;
	p=getP(c.i);
	c.x=p.x;
	c.y=p.y;
	p=getP(document.getElementById('content'));
	c.i.style.width=(m.x-p.x-43)/20*15.7+"px";
}*/
//-->