<!--

function submitLogin()
{
	if (document.form.userid.value == "")
	{
		alert("Die Eingabe von \"Benutzername\" ist obligatorisch.");
		document.form.userid.focus();
		return false;
	}
	if (document.form.passwd.value == "")
	{
		alert("Die Eingabe von \"Passwort\" ist obligatorisch.");
		document.form.passwd.focus();
		return false;
	}
	
	return true;
}

function submitMigrate()
{
	if (document.form.userid.value == "")
	{
		alert("Die Eingabe von \"Emailadresse\" ist obligatorisch.");
		document.form.userid.focus();
		return false;
	}
	
	return true;
}

function submitChangePwd()
{
	if (document.form.passwd.value == "")
	{
		alert("Die Eingabe von \"Passwort\" ist obligatorisch.");
		document.form.passwd.focus();
		return false;
	}
	
	return true;
}

function submitNewCust()
{
	if (document.form.title[0].checked == false && document.form.title[1].checked == false)
	{
		alert("Die Auswahl von \"Anrede\" ist obligatorisch.");
		document.form.title[0].focus();
		return false;
	}
	if (document.form.lname.value == "")
	{
		alert("Die Eingabe von \"Nachname\" ist obligatorisch.");
		document.form.lname.focus();
		return false;
	}
	if (document.form.fname.value == "")
	{
		alert("Die Eingabe von \"Vorname\" ist obligatorisch.");
		document.form.fname.focus();
		return false;
	}
	if (document.form.street.value == "")
	{
		alert("Die Eingabe von \"Strasse, Nr\" ist obligatorisch.");
		document.form.street.focus();
		return false;
	}
	if (document.form.plz.value == "")
	{
		alert("Die Eingabe von \"PLZ\" ist obligatorisch.");
		document.form.plz.focus();
		return false;
	}
	if (document.form.location.value == "")
	{
		alert("Die Eingabe von \"Ort\" ist obligatorisch.");
		document.form.location.focus();
		return false;
	}
	if (document.form.telp.value == "" && document.form.telg.value == "")
	{
		alert("Die Eingabe von \"Tel P\" oder \"Tel G\" ist obligatorisch.");
		document.form.telp.focus();
		return false;
	}
	if (document.form.email.value == "")
	{
		alert("Die Eingabe von \"Email\" ist obligatorisch.");
		document.form.email.focus();
		return false;
	}
	if (document.form.currency[0].checked == false && document.form.currency[1].checked == false)
	{
		alert("Die Eingabe von \"Währung\" ist obligatorisch.");
		document.form.currency[0].focus();
		return false;
	}
	if (document.form.userid.value == "")
	{
		alert("Die Eingabe von \"Benutzername\" ist obligatorisch.");
		document.form.userid.focus();
		return false;
	}
	if (document.form.passwd1.value == "")
	{
		alert("Die Eingabe von \"Passwort\" ist obligatorisch.");
		document.form.passwd1.focus();
		return false;
	}
	if (document.form.passwd2.value == "")
	{
		alert("Die Eingabe von \"Passwort wiederholen\" ist obligatorisch.");
		document.form.passwd2.focus();
		return false;
	}
	return true;
}

function submitNewCustAdr()
{
	if (document.form.title[0].checked == false && document.form.title[1].checked == false)
	{
		alert("Die Auswahl von \"Anrede\" ist obligatorisch.");
		document.form.title[0].focus();
		return false;
	}
	if (document.form.lname.value == "")
	{
		alert("Die Eingabe von \"Nachname\" ist obligatorisch.");
		document.form.lname.focus();
		return false;
	}
	if (document.form.fname.value == "")
	{
		alert("Die Eingabe von \"Vorname\" ist obligatorisch.");
		document.form.fname.focus();
		return false;
	}
	if (document.form.street.value == "")
	{
		alert("Die Eingabe von \"Strasse, Nr\" ist obligatorisch.");
		document.form.street.focus();
		return false;
	}
	if (document.form.plz.value == "")
	{
		alert("Die Eingabe von \"PLZ\" ist obligatorisch.");
		document.form.plz.focus();
		return false;
	}
	if (document.form.location.value == "")
	{
		alert("Die Eingabe von \"Ort\" ist obligatorisch.");
		document.form.location.focus();
		return false;
	}
	if (document.form.telp.value == "" && document.form.telg.value == "")
	{
		alert("Die Eingabe von \"Tel P\" oder \"Tel G\" ist obligatorisch.");
		document.form.telp.focus();
		return false;
	}
	if (document.form.email.value == "")
	{
		alert("Die Eingabe von \"Email\" ist obligatorisch.");
		document.form.email.focus();
		return false;
	}
	
	return true;
}

function submitShipAddr()
{
	if (document.form.title[0].checked == false && document.form.title[1].checked == false)
	{
		alert("Die Auswahl von \"Anrede\" ist obligatorisch.");
		document.form.title[0].focus();
		return false;
	}
	if (document.form.lname.value == "")
	{
		alert("Die Eingabe von \"Nachname\" ist obligatorisch.");
		document.form.lname.focus();
		return false;
	}
	if (document.form.fname.value == "")
	{
		alert("Die Eingabe von \"Vorname\" ist obligatorisch.");
		document.form.fname.focus();
		return false;
	}
	if (document.form.street.value == "")
	{
		alert("Die Eingabe von \"Strasse, Nr\" ist obligatorisch.");
		document.form.street.focus();
		return false;
	}
	if (document.form.plz.value == "")
	{
		alert("Die Eingabe von \"PLZ\" ist obligatorisch.");
		document.form.plz.focus();
		return false;
	}
	if (document.form.location.value == "")
	{
		alert("Die Eingabe von \"Ort\" ist obligatorisch.");
		document.form.location.focus();
		return false;
	}
	if (document.form.telp.value == "" && document.form.telg.value == "")
	{
		alert("Die Eingabe von \"Tel P\" oder \"Tel G\" ist obligatorisch.");
		document.form.telp.focus();
		return false;
	}
	return true;
}
function submitContact()
{
	if (document.form.Name.value == "")
	{
		alert("Die Eingabe von \"Name\" ist obligatorisch.");
		document.form.Name.focus();
		return false;
	}
	if (document.form.Email.value == "")
	{
		alert("Die Eingabe von \"Email\" ist obligatorisch.");
		document.form.Email.focus();
		return false;
	}
	if (document.form.Bemerkungen.value == "")
	{
		alert("Die Eingabe von \"Bemerkungen\" ist obligatorisch.");
		document.form.Bemerkungen.focus();
		return false;
	}
	if (document.form.captchacode.value == "")
	{
		alert("Die Eingabe von \"Prüfcode\" ist obligatorisch.");
		document.form.captchacode.focus();
		return false;
	}
	return true;
}

function PrintTable()
{
	printWin = window.open("", "PrintWindow", 'toolbar,scrollbars,width=800,height=600');
	printWin.document.write("<html><head><script type=\"text/javascript\">window.focus();</script><link rel=\"STYLESHEET\" type=\"text/css\" href=\"styles.css\"></head><body>");
	printWin.document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td><img src='/images/logo-print.gif' border='0'><br><br>&nbsp;</td></tr></table>");
	cDiv = document.getElementById('idPrint').innerHTML;
	rExp1 = /<script/gi;
	rExp2 = /\/script>/gi;
	printWin.document.write(cDiv.replace(rExp1, "<!--<hide").replace(rExp2, "/hide>-->"));
	printWin.document.write("</body></html>");
	printWin.document.close();
	return false;
}

var StatusTextIntervalCount;
var StatusTextIntervalID;
function ShowStatusText(cMessage, nInterval, cAdd, nMaxIntervalCount)
{
	var oStatus;
	var oStatusText;
	oStatus = document.getElementById('Status');
	oStatusText = document.getElementById('StatusText');
	oStatusText.innerHTML = cMessage;
	oStatus.style.visibility = 'visible';
	if(nInterval>0)
		StatusTextIntervalID = window.setInterval('ProgressStatusText(\'' + cMessage + '\', \'' + cAdd + '\', ' + nMaxIntervalCount + ')', nInterval);
}

function ProgressStatusText(cMessage, cAdd, nMaxIntervalCount)
{ 
	var oStatusText;
	oStatusText = document.getElementById('StatusText');
	if(StatusTextIntervalCount<nMaxIntervalCount)
	{
		oStatusText.innerHTML = oStatusText.innerHTML + cAdd;
		StatusTextIntervalCount = StatusTextIntervalCount + 1;
	}
	else
	{
		oStatusText.innerHTML = cMessage + cAdd;
		StatusTextIntervalCount = 1;
	}
}

function HideStatusText()
{
	var oStatus;
	var oStatusText;
	window.clearInterval(StatusTextIntervalID);
	oStatus = document.getElementById('Status');
	oStatusText = document.getElementById('StatusText');
	oStatusText.innerHTML = '';
	oStatus.style.visibility = 'hidden';
}

function showImage(cImage, cText)
	{
		
		var img = new Image();
		img.src = cImage;
		
		xsize = img.width+35;// Zusatz für Rand rechts und links
		ysize = img.height+75; //Zusatz für Rand oben und unten - damit Button angezeit werden kann 
		
		if(xsize<100 || ysize<100)
		{
			xsize = 460;
			ysize = 675;
		}
    
		ScreenWidth = screen.width;
		ScreenHeight = screen.height;

		xpos = (ScreenWidth/2)-(xsize/2);
		ypos = (ScreenHeight/2)-(ysize/2);

		var mywindow = window.open("","image","height="+ysize+",width="+xsize+",scrollbars=0,resizable=no,top="+ypos+",left="+xpos+"");
		mywindow.document.open("text/html");
		mywindow.document.write("<head><title>Bild" + cText + "</title></head><body><form name=\"popup\" id=\"popup\"><p align=\"center\"> <img src="+cImage+"></p>");
		mywindow.document.write("<p align=\"center\"><input type=\"submit\" value=\"schliessen\" name=\"btnSchliessen\" onClick='self.close()'></p></form></body>")
		mywindow.document.close();
		mywindow.document.popup.btnSchliessen.focus();
	}
function showText(cText)
	{
		xsize = 600;
		ysize = 400;
		ScreenWidth = screen.width;
		ScreenHeight = screen.height;
		xpos = (ScreenWidth/2)-(xsize/2);
		ypos = (ScreenHeight/2)-(ysize/2);
		var mywindow = window.open("","text","height="+ysize+",width="+xsize+",scrollbars=1,resizable=no,top="+ypos+",left="+xpos+"");
		mywindow.document.open("text/html");
		mywindow.document.write("<head><title>Info</title></head><body><form name=\"popup\" id=\"popup\"><p align=\"center\">"+cText+"</p>");
		mywindow.document.write("<p align=\"center\"><input type=\"submit\" value=\"schliessen\" name=\"btnSchliessen\" onClick='self.close()'></p></form></body>")
		mywindow.document.close();
		mywindow.document.popup.btnSchliessen.focus();
	}
-->

