/*
#####################################################
#                                                   #
#   JavaScript by Armin Priesner - Webdesignen.at   #
#   Durchlaufstr. 14/1A/33, A-1200 Wien             #
#   Phone: +43-(0)650-94 60 132                     #
#   Fax: +43-(0)1-971 78 29                         #
#   http://webdesignen.at - office@webdesignen.at   #
#                                                   #
#####################################################
*/

//	Startseite: deutsch <> englisch
function sprache(){
	browser=navigator.appName;

	if(browser=="Microsoft Internet Explorer"){
		sprache_des_browsers=navigator.systemLanguage;		// nur im IE
	}
	else{
		sprache_des_browsers=navigator.language;			// nicht im IE
	}

	laenge=sprache_des_browsers.length;
	sprache_kurz=sprache_des_browsers.slice(0,2);
	
	switch(sprache_kurz)
	{
	case 'de':
		{
		document.write("<img src=\"images/safari_hp_txt_de.jpg\" alt=\"\" width=\"205\" height=\"275\" border=\"0\">");
		break;
		}
	case 'it':
		{
		document.write("<img src=\"images/safari_hp_txt_it.jpg\" alt=\"\" width=\"205\" height=\"275\" border=\"0\">");
		break;
		}
	case 'ja':
		{
		document.write("<img src=\"images/safari_hp_txt_jp.jpg\" alt=\"\" width=\"205\" height=\"275\" border=\"0\">");
		break;
		}
	default:
		{
		document.write("<img src=\"images/safari_hp_txt_en.jpg\" alt=\"\" width=\"205\" height=\"275\" border=\"0\">");
		}
	}
}

//	Copyright
function Copyright(){
	var Year = new Date();
	thisYear = Year.getUTCFullYear();
	document.write ("<hr size='2' width='615' noshade><div style='font-size:10pt;text-align:center'>Copyright (c) "+thisYear+" <a style='font-size:10pt;color:#333366;text-decoration:none' href='http://www.visione.tv' target='_blank'><b>webcasting.at</b></a>. All rights reserved.</div>");
}

//	Diashow
var Dias=new Array("images/diashow_tuareg1.jpg","images/diashow_felsen.jpg","images/diashow_tuareg3.jpg","images/diashow_wueste_auto.jpg","images/diashow_tuareg2.jpg","images/diashow_oase2.jpg","images/diashow_leptis_magna.jpg","images/diashow_hoehlenmalerei.jpg","images/diashow_forum.jpg","images/diashow_sabratha_klein.jpg","images/diashow_frauen.jpg","images/diashow_wueste.jpg","images/diashow_karawane1.jpg","images/diashow_karawane2.jpg","images/diashow_oase1.jpg","images/diashow_sonnenuntergang.jpg");

var startzahl=0;

url=document.URL;
var de=/de_/i;
var it=/it_/i;
if(de.exec(url)){	//	deutsch
	var Beschreibungen=new Array("Tuareg mit Tougelmoust - den Turban, wird so getragen, dass nur mehr die Augen hervorblitzen.","Der Eingang zum Akakus Gebirge","Tuareg im festlichen Aufputz in den D&uuml;nen vom Erg Ubari","Motorisiert auf den Spuren gro&szlig;er Entdecker","Betender Targi in der W&uuml;ste ","Der See Um el-Maa in den D&uuml;nen des Erg Ubari","Der Triumphbogen von Septimus Severus in Leptis Magna","H&ouml;hlenmalerei im Tassili Gebirge","Das Severische Forum in Leptis Magna","Das Theater von Sabratha geh&ouml;rt zu den am besten erhaltenen der Antiken Welt","Die Targia tanzen oft und gerne - nicht nur für ihre M&auml;nner","Die D&uuml;nen erinnern an die Formen eines Frauenk&ouml;rpers","Es gibt nur noch wenige Karawanen die durch die W&uuml;ste ziehen","In der W&uuml;ste ist der beste Freund des Menschen das Kamel","Der Wind ist der Herr über den Sand","Im Morgengrauen wird der traditionelle thé á la menthe zubereitet");
}
else{
	if(it.exec(url)){	//	italienisch
		var Beschreibungen=new Array("Tuareg nei loro tradizionali costumi nelle Dune del Erg Ubari","L'Ingresso delle Montagne di Acacus","Tuareg durante una pausa del loro lungo cammino","Viaggiando nell' Orizzonte senza fine","Pregare nel Deserto e' un'esperienza unica","Il Lago di Um el-Maa at Erg Ubari"," L'Arco di Settimo Severo a Leptis Magna","Disegni Preistorici nelle Montagne del Tassili","Forum di Severo a Leptis Magna","Teatro di Sabratha","Il ballo della Targia nei loro colorati costumi tradizionali","La bellezza del Deserto nel tardo pomeriggio","Viaggiando nel Deserto attraverso la vecchia Via delle Carovane","Il Cammello e' il migliore amico dell'Uomo nel Deserto","Il vento e' il creatore del Paesaggio","La preparazione del The' alla Menta nelle prime ore del Mattino.");
	}
	else{	//	englisch
		var Beschreibungen=new Array("Tuareg in their traditional clothes in the dunes of Erg Ubari","The entrance to the Acacus mountains","Tuareg taking a rest on their sometimes very long paths through the desert","Travelling towards a never ending horizon","Praying in the desert is a unique experience","The lake of Um el-Maa at Erg Ubari","The Arch of Septimus Severus in Leptis Magna","Cave paintings in the Tassili mountains","Sevarian forum in Leptis Magna","Theatre of Sabratha","Targia dancing in their traditional bright coloured clothes","The utmost beauty of the desert during in the late afternoon","Travelling on the old caravan routes through the desert","The camel is the mens`s best friend in the desert","The wind is the creator of form","The preparation of thé á la menthe in the early morning hours");
	}
}

function next() {
	startzahl++;

	var jeBild=document.getElementById("liesmich");
	
	if(startzahl<(Dias.length)){
		document.diashow.src=Dias[startzahl];
		jeBild.innerHTML=Beschreibungen[startzahl];
	}
	else{
		startzahl=-1;
		next();
	}
}

function previous() {
	startzahl--;

	var jeBild=document.getElementById("liesmich");
	
	if(startzahl>=0){
		document.diashow.src=Dias[startzahl];
		jeBild.innerHTML=Beschreibungen[startzahl];
	}
	else{
		startzahl=Dias.length;
		previous();
	}
}

//	Helfried Weyer
function derFotograf(){
	url=document.URL;
	var re=/de_/i;
	var Weyer=document.getElementById("fotograf");

	if(re.exec(url)){
		Weyer.innerHTML="&copy; Fotos von Helfried Weyer";
	}
	else{
		Weyer.innerHTML="&copy; Pictures by Helfried Weyer";
	}
}

//	Kontaktformular 1 DE
function kontaktformular_de(){
	var name=document.kontakt.name.value;
	var mail=document.kontakt.mail.value;
	var anfrage=document.kontakt.anfrage.value;

	if(name=="") {
		alert("Geben Sie bitte Ihren Namen ein!");
		window.document.kontakt.name.focus();
		return false;
	}
	var Ergebnis=mail.indexOf("@"&&".");
	if((mail=="")||(Ergebnis==-1)) {
		alert("Geben Sie bitte Ihre E-Mail Adresse ein!");
		window.document.kontakt.mail.value="";
		window.document.kontakt.mail.focus();
		return false;
	}
	if(anfrage=="") {
		alert("Bitte geben Sie Ihre Anfrage ein!");
		return false;
	}
}

//	Kontaktformular 2 DE
function danke(){
	var breite=screen.width/2-150;
	var hoehe=screen.height/2-75;

	var fenster=window.open("","","width=300,height=150,left="+breite+"px,top="+hoehe+"px");
	var txt1="<p>&nbsp;</p><p style=\"font:12px arial,helvetica;font-weight:bold;color:#330000;text-align:center\">Wir werden Ihre Anfrage umgehend beantworten.</p>";
	var txt2="<p style=\"font:16px arial,helvetica;font-style:italic;text-align:center\"><a href=\"javascript:window.close()\">Vielen Dank!</a></p>";
	fenster.document.write(txt1+txt2);
	window.location.href="de_kontakt.php";
}

//	Kontaktformular 1 IT
function kontaktformular_it(){
	var name=document.kontakt.name.value;
	var mail=document.kontakt.mail.value;
	var anfrage=document.kontakt.anfrage.value;

	if(name=="") {
		alert("Per favore inserite il Vostro Nome!");
		window.document.kontakt.name.focus();
		return false;
	}
	var Ergebnis=mail.indexOf("@"&&".");
	if((mail=="")||(Ergebnis==-1)) {
		alert("Per favore inserite il Vostro indirizzo E-mail!");
		window.document.kontakt.mail.value="";
		window.document.kontakt.mail.focus();
		return false;
	}
	if(anfrage=="") {
		alert("Per favore inserite una Vostra richiesta!");
		return false;
	}
}

//	Kontaktformular 2 IT
function grazie(){
	var breite=screen.width/2-150;
	var hoehe=screen.height/2-75;

	var fenster=window.open("","","width=300,height=150,left="+breite+"px,top="+hoehe+"px");
	var txt1="<p>&nbsp;</p><p style=\"font:12px arial,helvetica;font-weight:bold;color:#330000;text-align:center\">Vi risponderemo prima possibile.</p>";
	var txt2="<p style=\"font:16px arial,helvetica;font-style:italic;text-align:center\"><a href=\"javascript:window.close()\">Mille Grazie!</a></p>";
	fenster.document.write(txt1+txt2);
	window.location.href="it_contatto.php";
}

//	Kontaktformular 1 EN
function kontaktformular_en(){
	var name=document.kontakt.name.value;
	var mail=document.kontakt.mail.value;
	var anfrage=document.kontakt.anfrage.value;

	if(name=="") {
		alert("Please fill in your name!");
		window.document.kontakt.name.focus();
		return false;
	}
	var Ergebnis=mail.indexOf("@"&&".");
	if((mail=="")||(Ergebnis==-1)) {
		alert("Please fill in your e-mail address!");
		window.document.kontakt.mail.value="";
		window.document.kontakt.mail.focus();
		return false;
	}
	if(anfrage=="") {
		alert("Please fill in your inquiry!");
		return false;
	}
}

//	Kontaktformular 2 EN
function thanks(){
	var breite=screen.width/2-150;
	var hoehe=screen.height/2-75;

	var fenster=window.open("","","width=300,height=150,left="+breite+"px,top="+hoehe+"px");
	var txt1="<p>&nbsp;</p><p style=\"font:12px arial,helvetica;font-weight:bold;color:#330000;text-align:center\">We will respond as quickly as possible.</p>";
	var txt2="<p style=\"font:16px arial,helvetica;font-style:italic;text-align:center\"><a href=\"javascript:window.close()\">Thank you!</a></p>";
	fenster.document.write(txt1+txt2);
	window.location.href="en_contact.php";
}

//	Karte
function karte(){
	var breite=screen.width/2-250;
	var hoehe=screen.height/2-230;

	url=document.URL;
	var re=/de_/i;
	
	if(re.exec(url)){
		var txt1="<div style=\"position:absolute;top:0px;left:0px\;text-align:center\"><img src=\"images/de_karte_gross.gif\" alt=\"Nordafrika\" border=\"0\" width=\"500\" height=\"433\"><br>";
		var txt2="<a href=\"javascript:window.close()\" style=\"font:12px arial,helvetica\">Fenster schlie&szlig;en</a></div>";
	}
	else{
		var txt1="<div style=\"position:absolute;top:0px;left:0px\;text-align:center\"><img src=\"images/en_karte_gross.gif\" alt=\"Northafrica\" border=\"0\" width=\"500\" height=\"433\"><br>";
		var txt2="<a href=\"javascript:window.close()\" style=\"font:12px arial,helvetica\">close window</a></div>";
	}

	var fenster=window.open("","","width=500,height=460,left="+breite+"px,top="+hoehe+"px");
	fenster.document.write(txt1+txt2);
}

//	Arrow tauschen
var arrowGrey=new Image();
arrowGrey.src="images/video_pfeil_grau.gif";
var arrowBlue=new Image();
arrowBlue.src="images/video_pfeil_blau.gif";

var BildName,ArrowPlatzhalter;

function swapArrow(BildName,ArrowPlatzhalter){
	window.document.images[BildName].src=ArrowPlatzhalter.src;
}

//	Video wählen
function setVideo(Wert){
	document.videoform.steuerung.value=Wert;
	alert(Wert);
}
