function showProfil(){
    document.getElementById('profil').style.display = 'block';
    document.getElementById('profilZeigen').innerHTML = "";
    document.getElementById('profilVerbergen').innerHTML = "<input type=\"button\" name=\"prof\" value=\"Profil verbergen\" onClick=\"hideProfil()\"/>";
    document.getElementById('profilVerbergen').display = "block";
}
function hideProfil(){
    document.getElementById('profil').style.display = 'none';
    document.getElementById('profilVerbergen').innerHTML = "";
    document.getElementById('profilZeigen').innerHTML = "<input type=\"button\" name=\"prof\" value=\"Profil öffnen\" onClick=\"showProfil()\"/>";
}


function testeJpg(what){
POS = what.value.lastIndexOf(".");
str = what.value.substr(POS,4);
str = str.toLowerCase();
if(str !=".jpg" && str !=".jpe" && str !=".jpeg"){
alert("Es sind nur Bilder im Format JPG erlaubt.");
eval("document.formEdit.fileName_"+what.id).style.color = "";
eval("document.formEdit.fileName_"+what.id).value =  "Es sind nur Bilder im Format JPG erlaubt.";
what.style.color = "RED";
eval("document.formEdit.fileName_"+what.id).style.color = "RED";
}
else{
POS = what.value.lastIndexOf("\\");
str = what.value.substr(POS+1,200);
eval("document.formEdit.fileName_"+what.id).value =  "Bildname: "+str;
what.style.color = "";
eval("document.formEdit.fileName_"+what.id).style.color = "";
}
}

function hilfe(para){
var para;
window.open('Info.php?h='+para+'','Hilfe','width=550,height=350,resizable=yes,scrollbars=yes');   
}

function showArtikelEdit(number) {
	//document.getElementById('artikeledit_' + nzumber).style.display='block';
	$("#artikeledit_" + number).toggle();
}

function clearFileInputField(tagId) {
		divId='bildupload'+tagId;
    document.getElementById(divId).innerHTML = document.getElementById(divId).innerHTML;
    document.getElementById('fileName_' +tagId ).value='';
}

function showOptions(optionType,number) {

	$("#main_" + number).hide();
	$("#write_" + number).hide();
	$("#edit_" + number).hide();
	$("#" + optionType + "_" + number).fadeIn('slow');

}

