// JavaScript Document
var old_item='';
function show_new_message(ID, msg_ID, box_size1, re_msg_title)
{

  xitem="_newmessage"+msg_ID;
  // alert(xitem);
  // document.getElementById(xitem).style.height='200px;';
  document.getElementById(xitem).innerHTML='<form name="new_message" action="?action=save_msg" method="post" onsubmit="return validate_msg()" style="width:'+box_size1+'px; height:145px; min-height:145px; font-size:12px; border:solid 1px #ff0000; color:#9a9a9a; background-color:white; text-align:center; float:right; z-index:10;">Titel: <input type="text" name="new_msg_title" onchange="noschrott(this)" maxlength="75" style="margin:5px; width:'+(box_size1-15)+'px; height:14px; min-height:14px; font-size:12px; border:solid 1px #50779e;" value="'+re_msg_title+'" /><br />Text: <textarea name="new_msg_text" style="margin:5px; width:'+(box_size1-15)+'px; height:50px; min-height:50px; font-size:12px; border:solid 1px #50779e; " ></textarea><br /><input type="submit" value="neuer Eintrag" style="height:18px; min-height:18px; font-size:12px; border:outset 2px #dcdcdc;" /><input name="msg_ID" type="hidden" value="'+msg_ID+'" /></form>';
  if (old_item>'') document.getElementById(old_item).innerHTML=''; 
  old_item=xitem;
  // alert(old_item);
   
}

function show_new_thread(ID, msg_ID, box_size1)
{
  if (document.getElementById('_newthread').innerHTML > '') document.getElementById('_newthread').innerHTML='';
  else document.getElementById('_newthread').innerHTML='<form name="new_thread" action="?action=save_msg" onsubmit="return validate_msg1()" method="post" style="width:620px; height:120px; min-height:120px; font-size:12px; border:solid 1px #ff0000; color:#9a9a9a; background-color:white; text-align:center; float:right; z-index:10;"><span style="float:left; width:75px; text-align:right; margin-top:5px;">Titel:</span><input type="text" name="new_msg_title" onchange="noschrott(this)" maxlength="75" style="margin:5px; width:505px; height:14px; min-height:14px; font-size:12px; border:solid 1px #50779e;" /><br /><span style="float:left; width:75px; text-align:right; margin-top:5px;">Nachricht:</span><textarea name="new_msg_text" style="margin:5px; width:505px; height:50px; min-height:50px; font-size:12px; border:solid 1px #50779e; " ></textarea><br /><input type="submit" value="neues Thema" style="height:18px; min-height:18px; font-size:12px; border:outset 2px #dcdcdc;" /><input name="msg_ID" type="hidden" value="0" /></form><div style="clear:both;"></div>';
  
}

function show_new_message1(ID, msg_ID, box_size1, re_msg_title)
{

  xitem="_newmessage"+msg_ID;

  document.getElementById(xitem).innerHTML='<form name="new_message_form" onsubmit="return validate_msg()" style="width:'+box_size1+'px; height:145px; min-height:145px; font-size:12px; border:solid 1px #ff0000; color:#9a9a9a; background-color:white; text-align:center; float:right; z-index:10;">Titel: <input type="text" name="new_msg_title" onchange="noschrott(this)" maxlength="75" style="margin:5px; width:'+(box_size1-15)+'px; height:14px; min-height:14px; font-size:12px; border:solid 1px #50779e;" value="'+re_msg_title+'" /><br />Text: <textarea name="new_msg_text" style="margin:5px; width:'+(box_size1-15)+'px; height:50px; min-height:50px; font-size:12px; border:solid 1px #50779e; " ></textarea><br /><div id="SendButton"><input type="button" class="FieldButton" name="sendbutton" style="cursor:pointer;" onclick="saveMSG('+msg_ID+', document.new_message_form.new_msg_title.value, document.new_message_form.new_msg_text.value)" value="Eintrag speichern" /></div></form>';
  if (old_item>'') document.getElementById(old_item).innerHTML=''; 
  old_item=xitem;
   
}
