/* fotoecke.js - 20.10.2004 - 20.10.2004 - ARothacker */


// Disable / Enable

function enableThumbImport() {
	if(document.importF.thumbsI[1].checked == true) {
	//	document.importF.thPrefixI.disabled = false;
		document.importF.thWidthI.disabled = false;
		document.importF.thHeightI.disabled = false;
		
	//	document.importF.thPrefixI.style.backgroundColor = "rgb(230,230,230)";
	//	document.importF.thWidthI.style.backgroundColor = "rgb(230,230,230)";
	//	document.importF.thHeightI.style.backgroundColor = "rgb(230,230,230)";
	} else {
	//	document.importF.thPrefixI.disabled = true;
		document.importF.thWidthI.disabled = true;
		document.importF.thHeightI.disabled = true;
		
	//	document.importF.thPrefixI.style.backgroundColor = "rgb(60,70,80)";
	//	document.importF.thWidthI.style.backgroundColor = "rgb(60,70,80)";
	//	document.importF.thHeightI.style.backgroundColor = "rgb(60,70,80)";
	}
}


//  Open Windows

function openWin(inc) {
	Win = window.open(inc,"","width=500,height=550,left=2,top=100,dependent=yes");
}


//  Show / Hide

function showHide(id) {
	var e = document.getElementById(id);
	e.style.display = (e.style.display == 'none') ? 'inline' : 'none';
}


// Formularwerte vor submit checken

function checkLoginF() {
	var cont = true;
	
	if(document.loginF.userI.value == "") {
		alert("Es wurde kein Benutzername angegeben!");
		cont = false;
		document.loginF.userI.focus();
	}
	if(cont && document.loginF.passI.value == "") {
		alert("Es wurde kein Passwort angegeben!");
		cont = false;
		document.loginF.passI.focus();
	}
	
	return cont;
}

function checkShoutF() {
	var cont = true;
	
	if(document.shoutF.dateI.value == "") {
		alert("Es wurde kein Datum angegeben!");
		cont = false;
		document.shoutF.dateI.focus();
	}
	if(cont && document.shoutF.nameI.value == "") {
		alert("Es wurde kein Autoren-Name angegeben!");
		cont = false;
		document.shoutF.nameI.focus();
	}
	if(cont && document.shoutF.headingI.value == "") {
		alert("Es wurde keine Überschrift angegeben!");
		cont = false;
		document.shoutF.headingI.focus();
	}
	if(cont && document.shoutF.shoutI.value == "") {
		alert("Es wurde kein Shout-Text angegeben!");
		cont = false;
		document.shoutF.shoutI.focus();
	}
	
	return cont;
}


function checkSptEMailForm() {
	var cont = true;
	
	if(document.sptEMailF.projektI.value == "") {
		alert("Es wurde kein Projekt ausgewählt!");
		cont = false;
		document.sptEMailF.projektI.focus();
	}
	if(cont && document.sptEMailF.textI.value == "") {
		alert("Es wurde kein Text eingegeben!");
		cont = false;
		document.sptEMailF.textI.focus();
	}
	
	return cont;
}

function checkNewsF() {
	var cont = true;
	
	if(document.nwF.nwDateI.value == "") {
		alert("Es wurde kein Datum angegeben!");
		cont = false;
		document.nwF.nwDateI.focus();
	}
	if(cont && document.nwF.nwTextI.value == "") {
		alert("Es wurde kein Text eingegeben!");
		cont = false;
		document.nwF.nwTextI.focus();
	}
	
	return cont;
}
