//------------------------------------------------
//Javascript-Funktionen für Rechentherapie.net
//© Robert Widuch, Ver 1.00.3
//------------------------------------------------

var basisadresse = "http://www.rechentherapie.net/";
var linkadresse = "http://www.rechentherapie.net/links.html";
var browsername = navigator.appName.toLowerCase();

var args = self.location.search;
args = args.substr(1, args.length - 1);

var teil2="mai";
var teil1="lto:in";
var teil5="fo@";

var teil4="reche";
var teil3="ntherap";
var teil6="ie.net";

var best2="mai";
var best1="lto:best";
var best5="ellung@";

var briefanrede="Sehr geehrtes Zentrum fuer Rechentherapie,";
var brieftext="%0D%0A(Ich erhalte in Kuerze von Ihnen ein Mail mit den Daten Ihres Kontos, auf das ich den Betrag einzahle - nur aus diesem Grunde gebe ich Ihnen meine eMail-Adresse!)%0D%0A%0D%0AName:  %0D%0AStrasse: %0D%0APLZ/Ort: %0D%0AeMail: %0A";
var spam="%0D%0A%0D%0AEs kann vorkommen, dass ein uebereifriger Spam-Filter unsere Nachrichten aussortiert. Falls Sie keine Antwort von uns erhalten, sollten Sie dies in Betracht ziehen und bei sich nachschauen!";

function standard() {
	if(screen.width<1300){
		var breite = screen.width - 400;
	}else{
		var breite = screen.width - 700;
	}
	if(screen.height<850){
		var hoehe = screen.height - 150;
	}else{
		var hoehe = screen.height - 250;
	}
	var hoehe = screen.height - 150;
	//self.resizeTo(breite, hoehe);
 	location.href=("http://www.rechentherapie.net/pdf/" + args + "a5.pdf");
}

function druck() {
	if(screen.width<1300){
		var breite = screen.width - 400;
	}else{
		var breite = screen.width - 700;
	}
	if(screen.height<850){
		var hoehe = screen.height - 150;
	}else{
		var hoehe = screen.height - 250;
	}
	//self.resizeTo(breite, hoehe);
 	location.href=("http://www.rechentherapie.net/pdf/a5" + args + ".pdf");
}

function showpdf(datei) {
var Eingabe = prompt("''OK'' zeigt die Broschüre im Standardformat für den Bildschirm,\n''Abbrechen'' zeigt das doppelseitige Drucklayout zum Falten... ", "Standardformat");
switch (Eingabe) {
  case "Standardformat":
    var fenster=window.open("http://www.rechentherapie.net/pdf/"+datei+"a5.pdf");
    break;
  default:
   var fenster=window.open("http://www.rechentherapie.net/pdf/a5"+datei+".pdf");
    break;
	}
}

function askpdf(datei) {
	if(screen.width<1300){
		var breite = screen.width - 370;
	}else{
		var breite = screen.width - 670;
	}
	if(screen.height<850){
		var hoehe = screen.height - 170;
	}else{
		var hoehe = screen.height - 370;
	}
	var fenster = window.open("../frage.html?"+datei, "_blank", "width=" + breite + ",height=" + hoehe + ",left=50,top=50,scrollbars=no,menubar=no,dependent=yes,resizable=yes,status=no,toolbar=no,location=no");
  if (!fenster.opener) fenster.opener = self;
	fenster.focus();
}

function pdfpopup(datei) {
	if(screen.width<1300){
		var breite = screen.width - 370;
	}else{
		var breite = screen.width - 670;
	}
	if(screen.height<850){
		var hoehe = screen.height - 170;
	}else{
		var hoehe = screen.height - 370;
	}
	var fenster = window.open("http://www.rechentherapie.net/pdf/"+datei, "_blank", "width=" + breite + ",height=" + hoehe + ",left=50,top=50,scrollbars=no,menubar=no,dependent=yes,resizable=yes,status=no,toolbar=no,location=no");
  if (!fenster.opener) fenster.opener = self;
	fenster.focus();
}

function wechsel(bild, source) {
  window.document.images[bild].src = source;
}

function go(ziel) {
  window.location.href=ziel;
}

function full(ziel) {
  parent.location.href=ziel;
}

function popup(ziel) {
  var fenster=window.open(ziel);
}

function mailto(teil5, teil4, teil3) {
	var teil1="lto:";
	var teil2="mai";
	window.location.href = teil2 + teil1 + teil3 + "@" + teil4 + "." + teil5;
	}

function infos() {
	var txt = "?subject=Mehr Informationen gewuenscht!&body=";
	txt = txt + briefanrede + "%0D%0Abitte schicken Sie mir Ihre kostenfreien Infomaterialien freundlicherweise an folgende Adresse:%0D%0A";
	window.location.href = teil2 + teil1 + teil5 + teil4 + teil3 + teil6 + txt + spam;
	}

function ratgeber() {
	var txt ="?subject=Ratgeber-Broschuere gewuenscht!&body=";
	txt = txt + briefanrede + "%0D%0Abitte schicken Sie mir Ihre Ratgeber-Broschuere fuer 6.- EUR portofrei an folgende Adresse:";
	window.location.href = best2 + best1 + best5 + teil4 + teil3 + teil6 + txt + brieftext + spam;
	}

function subtraktion() {
	var txt = "?subject=Ich wuensche das Buch 'Bloß kein Minus...' zugeschickt zu bekommen!&body=";
	txt = txt + briefanrede + "%0D%0Abitte schicken Sie mir das Buch zur Subtraktion fuer 12.- EUR portofrei an folgende Adresse:";
	window.location.href = best2 + best1 + best5 + teil4 + teil3 + teil6 + txt + brieftext + spam;
	}

function vortrag() {
	var txt = "?subject=Vortrag gewuenscht!&body=";
	txt = txt + briefanrede + "%0D%0Awir sind an Ihrem Angebot fuer eine Veranstaltung interessiert.";
	txt = txt + "%0D%0ABitte kontaktieren Sie uns schnellstmoeglich ueber folgende Adresse%0D%0A%0D%0A";
	txt = txt + "Anschrift der Schule: %0D%0A";
  txt = txt + "Schultyp: %0D%0A";
  txt = txt + "Ansprechpartner (Telefonnummer und Erreichbarkeit): %0D%0A";
  txt = txt + "Terminvorschlag mit Uhrzeit: %0D%0A";
  txt = txt + "Anzahl der Teilnehmer(-innen): %0D%0A%0D%0A";
  txt = txt + "Mit freundlichem Gruss%0D%0A%0D%0A";
  window.location.href = teil2 + teil1 + teil5 + teil4 + teil3 + teil6 + txt + spam;
	}

function kontakt() {
	var txt = "?subject="+document.forms[0].subject.value;
	txt = txt + "&body=-Information: " + document.forms[0].infos.checked;
	txt = txt + "%0D%0A-Diagnostik: "+document.forms[0].diagnostik.checked;
	txt = txt + "%0D%0A-Beratung: "+document.forms[0].beratung.checked;
	txt = txt + "%0D%0A%0D%0A-Name: "+document.forms[0].name.value;
	txt = txt + "%0D%0A-Strasse: "+document.forms[0].steet.value;
	txt = txt + "%0D%0A-PLZ/Ort: "+document.forms[0].city.value;
	txt = txt + "%0D%0A-Telefon: "+document.forms[0].phone.value;
	txt = txt + "%0D%0A-Mail: "+document.forms[0].email.value;
	txt = txt + "%0D%0A%0D%0A-Anmerkungen: "+document.forms[0].comment.value;
	window.location.href = teil2 + teil1 + teil5 + teil4 + teil3 + teil6 + txt;
	}
