function disable()	{	if (document.formular.disabler.checked)		{		document.formular.lvorname.disabled=true;		document.formular.lname.disabled=true;		document.formular.lstrasse.disabled=true;		document.formular.lhausnummer.disabled=true;		document.formular.lplz.disabled=true;		document.formular.lstadt.disabled=true;		document.formular.lland.disabled=true;		}	else		{		document.formular.lvorname.disabled=false;		document.formular.lname.disabled=false;		document.formular.lstrasse.disabled=false;		document.formular.lhausnummer.disabled=false;		document.formular.lplz.disabled=false;		document.formular.lstadt.disabled=false;		document.formular.lland.disabled=false;		}	}function enable()	{	if (document.formular.enabler.checked)		{		document.formular.kreditkarte.disabled=false;		}	else		{		document.formular.lvorname.disabled=true;		}	}


function button(submitbutton)
	{
	var fehler = 0;
	var text_string;
	var aktuelle_laenge;
	for(i=1;i<=document.getElementById('pruef_var_anzahl').value;i++)
		{
		variable = eval("document.getElementById('pruef_var_" + i + "').value");
		text_string = eval("document.getElementById('" + variable + "').value");
		
		aktuelle_laenge = eval("document.getElementById('" + variable + "').value.length");
			
		if(aktuelle_laenge == 0)
			{
			fehler++
			};
		}
	
	if (fehler == 0)
		{
		document.getElementById('submit').value = document.getElementById('submit_button').value;
		document.getElementById('submit').disabled = false;
		}
	else
		{
		document.getElementById('submit').disabled = true;
		//document.getElementById('submit').value = 'Warte...';
		}
		//return true;
	}
	
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function stopError()
	{
	return true;
	}
window.onerror = stopError;

pic1= new Image(24,18);
pic1.src="<?php echo $htprefix; ?>pics/flag_cn2.jpg";
pic1= new Image(24,18);
pic1.src="<?php echo $htprefix; ?>pics/flag_gbr2.jpg";
pic1= new Image(24,18);
pic1.src="<?php echo $htprefix; ?>pics/flag_ger2.jpg";
pic1= new Image(24,18);
pic1.src="<?php echo $htprefix; ?>pics/flag_rus2.jpg";

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

newwindow=false;
function popup() {
	var breite = 800;
	var hoehe = 700;
	if(newwindow&&newwindow.closed==false)
    		newwindow.close()
    		var l = (screen.availWidth - breite) / 2;
    		var t = (screen.availHeight - hoehe) / 2;
    		newwindow = window.open('<?php echo $htprefix; ?>logbuch/popup_watch.html','Logbuch',"width=" + breite +
                                            ",height=" + hoehe +
                                            ",left=" + l +
                                            ",top=" + t + ";");
 		newwindow.focus();
}

function swap_content(span)
	{
	displayType = (document.getElementById(span).style.display=='none')?'block':'none';
	document.getElementById( span ).style.display = displayType;
	}
	
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openWindow(url, n, w, h, l, t) {
	if(l == undefined) l = 200;
	if(t == undefined) t = 100;

	var params = new Array();

	if(w > 0) params.push('width='  + w);
	if(h > 0) params.push('height=' + h);
	params.push('left=' + l);
	params.push('top='  + t);

	params.push('location=no');
	params.push('statusbar=no');

	return window.open(url, n, params.join(','));
}

function openCenteredWindow(url, n, w, h) {
	var l = (screen.availWidth / 2) - (w / 2);
	var t = (screen.availHeight / 2) - (h / 2);
	return openWindow(url, n, w, h, l, t);
}