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');

}

function showEditor(val,anz,anz2) {
$("#idText").show();
	$("#flashEdit").attr("src","flash.php?anz=" + anz);
	$("#idText2").show();
	$("#idHeadline").show();
	$("#idHeadline2").show();
	$("#textVerlag").show();
	$("#textVerlag2").show();
	$("#textBildrechte").show();
	$("#textAGB").show();
	$("#nextStep").show();
	$("#PDFUpload").show();
	$("#nextStepSpacer").show();
	$("#sendButton").show();

	$.ajax({
			type: "POST",
			timeout: 7000,
			data: {
			  anz2:anz2
			  },
			url: "jphp/showPicUpload.php",
			success: function(result) {
				$("#idBild2").html(result);
			}
			});

	$("#idBild2").show();
	
	//$("#zeichenzahl").attr("value",anz);
}




function showArtikel(id) {
	$('#' + id).toggle();
}


