// submitfield
function goToURL() { //v3.0
  var i, args=goToURL.arguments; document.returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

// toggle - > expand / collapse
function toggle(id) {
	
	if (document.getElementById("ToggleRow_" + id).style.display == 'none') {
		document.getElementById("ToggleImg_" + id).src = "images/less.jpg";
		document.getElementById("ToggleRow_" + id).style.display = "inline";
		document.getElementById("ToggleImg_" + id).alt = "read more";
	}
	else {
		document.getElementById("ToggleImg_" + id).src = "images/more.jpg";
		document.getElementById("ToggleRow_" + id).style.display = "none";
		document.getElementById("ToggleImg_" + id).alt = "hide";
	}
}

// div change
var ns6=document.getElementById&&!document.all 
var ie=document.all 

function show_text(thetext, whichdiv) { 

if (ie) eval("document.all."+whichdiv).innerHTML=thetext
else if (ns6) document.getElementById(whichdiv).innerHTML=thetext

} 

function reset(whichdiv){ 

if (ie) eval("document.all."+whichdiv).innerHTML='' 
else if (ns6) document.getElementById(whichdiv).innerHTML=''

} 

// select all für comments
function SelectAll() {
	for(var x=0;x<document.form.elements.length;x++) {
		var y=document.form.elements[x];
		if(y.name!='ALL') y.checked=document.form.ALL.checked;
	}
}

function zeigeBild(sel) {
  document.minibild.src = "" + sel.options[sel.selectedIndex].value;
}

function popup(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function popupcenter(url, w, h)
{
   var padding;
   (navigator.appName == "Microsoft Internet Explorer") ? (padding = 10) : (padding = 0);

   var screenw = screen.availWidth;
   var screenh = screen.availHeight;
   var winw = (w + 15 + padding);
   var winh = (h + 15 + padding);
   var posx = (screenw / 2) - (winw / 2);
   var posy = (screenh / 2) - (winh / 2);

   var mywin = window.open(url,"mywin","top="+posy+",left="+posx+",width="+winw+",height="+winh+",menubar=no,locationbar=no,statusbar=no,resizable=no,toolbar=no,dependent=yes,scrollbars=no");
   mywin.focus();
} 
function jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

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 jumpMenuGo(selName,targ,restore){ 
  var selObj = findObj(selName); if (selObj) jumpMenu(targ,selObj,restore);
}

function addParameter(table, rowIndex, bg)
{
    var row = table.insertRow(rowIndex);
    var cell = row.insertCell(0);
	cell.setAttribute("bgcolor", "white", false);
    var text = document.createTextNode('');
    cell.appendChild(text);
    cell = row.insertCell(1);
    var input = document.createElement('INPUT');
    cell.setAttribute("bgcolor", "white", false);
  	input.type = 'file';
    input.name = 'image[]';
    input.size = '37';
    cell.appendChild(input);
}

function AddCodeFromWindow(thecode) {
	document.post.message.value += thecode + " ";
	//opener.post.message.focus();
}

function CH(tr, mode) 
{
	if (mode == 0) 
	{
		tr.className = 'Button_Off';
	} 
	else 
	{
		tr.className = 'Button_On';
	}
}

function MM_goToURL() 
{ 
  var i, args=MM_goToURL.arguments; 
  document.MM_returnValue = false;
  
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

var datei = ""
var ie = (document.all);

if(ie) {
var datei = "_style/ie_fix.css";
}

document.write('<link rel="stylesheet" type="text/css" href="' + datei +'">');

