<!--
// NAVIGATION FUNCTIONS

// **********************************
// Form go_quick_artists
// **********************************
function go_quick_artists(form) { 
 var myindex=form._ARTISTS_ID.selectedIndex
	
	if (form._ARTISTS_ID.options[myindex].value != "0") {
		location=form._ARTISTS_ID.options[myindex].value;
	}
}

// **********************************
// Form go_quick_forum
// **********************************
function go_quick_forum(form) {
	var myindex=form._FORUM_ID.selectedIndex
	
	if (form._FORUM_ID.options[myindex].value != "0") {
		location=form._FORUM_ID.options[myindex].value;
	}
}

// **********************************
// Form go_quick_artcat
// **********************************
function go_quick_artcat(form) {
	var myindex=form._ARTCAT_ID.selectedIndex
	
	if (form._ARTCAT_ID.options[myindex].value != "0") {
		location=form._ARTCAT_ID.options[myindex].value;
	}
}


function go_form(x) { 
  if(x == "nothing") { 
 	document.forms[0].reset();
  	document.forms[0].elements[0].blur();
  	return;
  }
   else { 
  	parent.MenschKunst.location.href = x;
  	document.forms[0].reset();
  	document.forms[0].elements[0].blur();
   }
}




// **********************************
// Form fuer FORUM
// **********************************
function go_form_guest() { 
  	document.sHForm_newDate.method = "post";
	document.sHForm_newDate.action = document.sHForm_newDate.path_info.value;
	document.sHForm_newDate.submit();
  	document.sHForm_newDate.reset();
  	document.sHForm_newDate.elements[0].blur();
}


// FORUM FUNCTIONS
function check_data() {
	/*alert("mess:" + window.document.messageId.value);*/
	/*alert(window.location.search); */
	var goodinput = true;

	// Wenn Objekt vorhanden dann auf Länge prüfen
	if ( document._form_postform._login && goodinput) {
		if ( document._form_postform._login.value.length <= 3 ) {
			goodinput = false;
			alert("Bitte Login Name eingeben!");
		}
	}

	// Wenn Objekt vorhanden dann auf Länge prüfen. Damit der Anwender
	// nicht von den Nachrichten erschlagen wird, bei Mehrfachauslassung der
	// Forms, auf "goodinput" prüfen!
	if ( document._form_postform._pass && goodinput ) {
		if ( document._form_postform._pass.value.length <= 3 ) {
			goodinput = false;
			alert("Bitte Passwort eingeben!");
		}
	}

	// Wenn Objekt vorhanden dann auf Länge prüfen
	if ( document._form_postform.inputTitle && goodinput) {
		if ( document._form_postform.inputTitle.value.length <= 2 ) {
			goodinput = false;
			alert("Bitte Nachrichten Thema eingeben! (>2 Buchstaben)");
		}
	}
	
	// Wenn Objekt vorhanden dann auf Länge prüfen
	if ( document._form_postform.inputBody && goodinput) {
		if ( document._form_postform.inputBody.value.length <= 2 ) {
			goodinput = false;
			alert("Bitte Nachrichten Text eingeben! (>2 Buchstaben)");
		}
	}
	
	if ( goodinput ) {
		document._form_postform.method = "post";
		document._form_postform.action = document._form_postform.path_info.value;
		document._form_postform.submit();
	}
	return goodinput;
}


// Sicherheitsabfrage  loeschen
function check_kill(x){
	
	check = confirm("Eintrag wirklich loeschen?");
  	if ( check ) {
		document.forms[x].method = "post";
		document.forms[x].action = document.forms[x].path_info.value;
		document.forms[x].submit();
	}
	return check;
}

// Upload bestaetigung
function check_upload(x){

	var c_output = 	"Wenn Sie diese Meldung mit JA bestaetigen, wird die Abbildungen auf dem Webserver " + 
	"der MenschKunst-Website kopiert. Damit erteilen Sie ausdruecklich im Sinne des Urhebergesetzes " +		
	"den Betreibern die Erlaubnis, die Abbildungen im Rahmen dieser Webseite kostenfrei nutzen zu duerfen.";

	check = confirm( c_output );

  	if ( check ) {
		document.forms[x].method = "post";
		document.forms[x].action = document.forms[x].path_info.value;
		document.forms[x].submit();
	}
	return check;
}

// Upload bestaetigung
function check_link(x){

	var c_output = 	"Wenn Sie diese Meldung mit Ja beantworten, bestaetigen Sie nach besten Wissen " +
					"und Gewissen, dass die zu verlinkten Seiten keine illegalen, pornographischen " +
					"oder sonstige rechtswidrigen Inhalte, darstellt. Weiterhin darf der Betreiber " +
					"der zu verlinkenden Webseite sich nicht auf dieser gegen eine Verlinkung" +
					"ausgesprochen haben.";   

	check = confirm( c_output );

  	if ( check ) {
		document.forms[x].method = "post";
		document.forms[x].action = document.forms[x].path_info.value;
		document.forms[x].submit();
	}
	return check;
}

function login_false() {
	alert(" Login Name oder Passwort falsch ");
}

// Neues Fenster zentriert öffnen

var win = null;

function NewWindow(mypage,myname,w,h,scroll) {
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
	
	if(win.window.focus) {
		win.window.focus();
	}
}

// Forumsscript
function addsmily(smiley) 
{
	document._form_postform.inputBody.value = document._form_postform.inputBody.value + smiley;
}

//-->
