/*Mailto-Link*/
function UnCryptMailto(s, shift) {
	var n = 0;
	var r = "";
	for (var i = 0; i < s.length; i++) {
		n = s.charCodeAt(i);
		if (n >= 8364) {
			n = 128;
		}
		r += String.fromCharCode(n - (shift));
	}
	return r;
}
function linkTo_UnCryptMailto(s, shift) {
	location.href = UnCryptMailto(s, shift);
}
/*Publikationen*/
if (document.images) {
	var Item = new Array();
	/*Basisverzeichnis: /de/anwaelte/*/
	Item[0] = new Image(); Item[0].src = "../../images/publ_li_order.gif";
	Item[1] = new Image(); Item[1].src = "../../images/publ_li_order_hi.gif";
	Item[2] = new Image(); Item[2].src = "../../images/publ_li.gif";
	Item[3] = new Image(); Item[3].src = "../../images/publ_li_hi.gif";
}
function Hilite(ImgName,Modus) {
	if (document.images) {
		document.images[ImgName].src = Item[Modus].src;
	}
}
function Order(PublAutor,PublTitel) {
	this.document.Publikation.Autor.value = PublAutor;
	this.document.Publikation.Titel.value = PublTitel;
	this.document.Publikation.submit();
}
/*Bestellformular*/
function CheckInput(Sprache) {
	if (this.document.Bestellung.Autor.value == "" || this.document.Bestellung.Titel.value == "") {
		if (Sprache == "en") {
			alert ("The information about author or title couldn't be processed. Please try again to make your selection.");
		} else {
			alert ("Die Angaben zum Autor oder zum Titel konnten nicht verarbeitet werden. Bitte versuchen Sie noch einmal, Ihre Auswahl vorzunehmen.");
		}
		this.document.Bestellung.Autor.focus();
		return false;
	}
	if (this.document.Bestellung.Name.value == "") {
		if (Sprache == "en") {
			alert ("Please enter your name.");
		} else {
			alert ("Geben Sie bitte Ihren Namen ein.");
		}
		this.document.Bestellung.Name.focus();
		return false;
	}
	if (this.document.Bestellung.EMail.value == "" && (this.document.Bestellung.Strasse_PF.value == "" || this.document.Bestellung.PLZ_Ort.value == "") && this.document.Bestellung.Telefon.value == "") {
		if (Sprache == "en") {
			alert ("Please enter your e-mail address, your address or your telephone number.");
		} else {
			alert ("Geben Sie bitte Ihre E-Mail-Adresse, Anschrift oder Telefonnummer ein.");
		}
		this.document.Bestellung.EMail.focus();
		return false;
	}
	var Input = this.document.Bestellung.EMail.value;
	var Laenge = Input.length;
	if (Laenge > 0) {
		var Leer = Input.indexOf(" ");
		var ErstesAt = Input.indexOf("@");
		var LetztesAt = Input.lastIndexOf("@");
		if (Laenge < 6 || Leer != -1 || ErstesAt < LetztesAt || ErstesAt < 1 || LetztesAt > Laenge - 5) {
			if (Sprache == "en") {
				alert ("Please enter an e-mail address.");
			} else {
				alert ("Bitte eine E-Mail-Adresse eingeben.");
			}
			this.document.Bestellung.EMail.focus();
			return false;
		}
	}
}
