function display_upload()
{
	document.getElementById("loading-indicator").style.display='';
	document.getElementById("submit_button").style.display='none';
}

function imageWindow(windowURL, windowTarget, windowOptions)
{
	return window.open( windowURL, windowTarget, 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,' + windowOptions ) ;
}

function popupWindow(windowURL, windowTarget, windowOptions)
{
	return window.open( windowURL, windowTarget, 'toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,' + windowOptions ) ;
}

function add_div_box()
{
	//var count = document.new_site.length;
	//var old_box_data = document.getElementById("box_add").innerHTML;
	//document.getElementById("box_add").innerHTML = old_box_data + "<div style=\"margin-top:10px;\"><textarea style=\"width:500px;height:300px;border:1px solid black;\" name=\"" + count +"\"></textarea></div>\n";
	document.formular.text.value = document.formular.text.value + "[inhaltsbox stil=\"\"]\n\n[/inhaltsbox]";
}

function add_image(img)
{
	opener.document.formular.text.value = opener.document.formular.text.value + img;
}

function remove_image(img)
{
	opener.document.formular.text.value = opener.document.formular.text.value.replace(img, '');
}

function fett_text()
{
	var name = prompt("Fett gedruckter Text:","");
	
	if(name!=='' && name!==null)
	{
		document.formular.text.value = document.formular.text.value + "[b]" + name + "[/b]";
	}
}

function kursiv_text()
{
	var name = prompt("Kursiver Text:","");
	
	if(name!=='' && name!==null)
	{
		document.formular.text.value = document.formular.text.value + "[i]" + name + "[/i]";
	}
}

function liste()
{
	document.formular.text.value = document.formular.text.value + "[liste]\n[*]\n[*]\n[/liste]";
}
