function checkform_search()
{
	if (document.quicksearch.searchstring.value == '' || (document.quicksearch.searchstring.value == 'Suche' ))
	{
		return false;
	}
}

function checkform_userlogin()
{
	if ((document.userlogin.username.value == '') || (document.userlogin.password.value == ''))
	{
		return false;
	}
}

function checkform_vote()
{
	var vote = false;

	for (var i = 0; i < document.uservote.max.value; i++)
	{
		if (document.uservote.vote[i].checked == true)
		{
			vote = true;
			break;
		}
	}

	if (!vote)
	{
		return false;
	}
}

function win(pdata, psize) 
{
	var daten = psize.split("=");
	var width = daten[1].split(",");
	var fenster_b = width[0];
	var fenster_h = daten[2];
	var sh = screen.height;
	var sb = screen.width;
	var offX = (sb-fenster_b)/2;
	var offY = (sh-fenster_h)/2;
	var popupwin;	

	popupwin = window.open(pdata, '', psize+",left="+offX+",top="+offY,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resize=no');
	
	if (window.focus) 
	{
		popupwin.focus();
    	}
}

function reset_select(doit)
{
	if (doit == '1')
	{
		document.headnavigation.cat2.options[document.headnavigation.cat2.selectedIndex].value = 0;
	}
}

function setsmilie(theform,zeichen) 
{
	theform.value += " "+zeichen+" ";
	theform.focus();
}

function easyinput_bbfonts(theform, code_beginn, code_ende) 
{
	var types = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]');

	inserttext = prompt("Bitte geben Sie jetzt den gewünschten Text ein:",'');

	if ((inserttext != null) && (inserttext != "")) 
	{ 
   		AddTxt = types[code_beginn]+inserttext+types[code_ende];
		theform.value+=AddTxt;
	}

	theform.focus();
}


function easyinput_bblink(theform, type, prompttext, promptname) 
{
		promptname = "";
		insertname = prompt("Bitte geben Sie den gewünschten Namen ein (optional):",promptname);
		if (type == "http")
		{
			prompttext = "http://";
			inserttext = prompt("Bitte geben Sie die gewünschte Link-Adresse ein:",prompttext);

			if ((inserttext != null) && (inserttext != "") && (inserttext != "http://"))
			{
				if (insertname == "")
				{
					theform.value += "[url="+inserttext+"]"+inserttext+"[/url] ";
				}
				else
				{
					theform.value += "[url="+inserttext+"]"+insertname+"[/url] ";
				}
			}

		}
		else
		{
			prompttext = "";
			inserttext = prompt("Bitte geben Sie die gewünschte eMail-Adresse ein:",prompttext);

			if ((inserttext != null) && (inserttext != ""))
			{
				if (insertname == "")
				{
					theform.value += "[email="+inserttext+"]"+inserttext+"[/email] ";
				}
				else
				{
					theform.value += "[email="+inserttext+"]"+insertname+"[/email] ";
				}
			}
		}

		theform.focus();
}


function easyinput_bbimage(theform) 
{
	inserttext = prompt("Bitte geben Sie die Adresse zu dem gewünschten Bild ein:","http://");

	if ((inserttext != null) && (inserttext != "") && (inserttext != "http://")) 
	{ 
		theform.value += "[img]"+inserttext+"[/img]";
	}

	theform.focus();
}

function message_window(title,text)
{
//	var pos = ((screen.width-280)/2);

	if (document.all)	
	{
		var pos = ((document.body.offsetWidth-280)/2);		// IE
		document.getElementById('popup').style.left	= 2+document.body.scrollLeft+ pos;
		document.getElementById('popup').style.top	= 2+document.body.scrollTop+200;
        } 
	else 
	{
		var pos = ((window.innerWidth-280)/2);			// FIREFOX & NETSCAPE
		document.getElementById('popup').style.left	= 2+ pos + 'px';
		document.getElementById('popup').style.top	= 2+200 + 'px';
	}	
	
	document.getElementById('popup').innerHTML='<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=280 HEIGHT=100 NOWRAP><TR><TD STYLE=font-size:12px;><IMG BORDER=0 SRC=./admin/images/layout/pfeil1.gif> <B>'+title+'</B></TD><TD ALIGN=right VALIGN=top><A HREF="javascript:close_message_window();"><IMG BORDER=0 SRC=./admin/images/button/close_x.gif></A></TD></TR><TR><TD COLSPAN=2 VALIGN=top><SPAN CLASS=popupstyle>'+text+'</SPAN></TD></TR><TR><TD COLSPAN=2 HEIGHT=30 VALIGN=bottom ALIGN=center><A HREF="javascript:close_message_window();"><IMG BORDER=0 SRC=./admin/images/button/close.gif></A></TD></TR></TABLE>';
	document.getElementById('popup').style.visibility = 'visible';
}


function close_message_window()
{
	document.getElementById('popup').style.visibility = 'hidden';
}