// utility functions

var os = navigator.platform.toLowerCase();
var agent = navigator.userAgent.toLowerCase();

var is_mac = (os.indexOf("mac") != -1);
var is_ff = (navigator.appName == "Netscape");
var is_ie = (agent.indexOf("msie") !=-1);
var is_ie8 = (navigator.appVersion.match(/msie 8/i))  ? 1 : 0;
//if(is_ie8){alert("is_ie8:"+is_ie8)}

var major = is_ie? parseInt(agent.substring(agent.indexOf('msie')+5)):parseInt(navigator.appVersion);
var minor = is_ie? parseFloat(agent.substring(agent.indexOf('msie')+5)):parseFloat(navigator.appVersion);
//alert(navigator.appName+"\n"+agent+"\n"+major+"\n"+minor)

function tellerror(msg, url, linenumber){
alert(msg+'\n\n'+url+'\n\nLine '+linenumber)
return true
}
window.onerror=tellerror

var utilang=self.location.search.substring(1,3)    // in allcases

function $(){ // replaces document.getElementByID()
	var r=arguments[0];												   // alert(r)
	r= (typeof r == 'object') ? r : document.getElementById(r);
    if (r=="undefined" || r == null || !r) {

		//return
			var s=document.createElement("SPAN")
			document.body.appendChild(s);
			with(s.style){fontFamily='arial';fontSize='11px';color='#2A2A2A';padding="3px"}
			var w=document.createTextNode("object not found!");
			s.appendChild(w);
			s.id="XINQ"
			r=s
			setTimeout("document.body.removeChild($('XINQ'))",500)
		}
    return r
}

var $=window.$;

function showMe(){
	var r;
	if(arguments[0]){r=arguments[0]}

	if (r === null) {alert("NULL!");return}

	try{if (  !r  || r=="undefined" || r === null ) {return} }catch(e){alert("Objekt nicht gefunden!");return}
	r= (typeof r == 'object') ? r : document.getElementById(r);

	with(r.style){
		display="block";
		visibility="visible"
	}
}

function hideMe(){
	var r;
	if(arguments[0]){r=arguments[0] }
	//else{alert("999");return}
	if (r=="undefined" || r == null || !r) {return}
	r= (typeof r == 'object') ? r : document.getElementById(r);
	with(r.style){
		display="none";
		visibility="hidden"
	}
}

function processText(tx){
	tx=tx.replace(/^\'(.*)\'$/g,"$1");   // remove leading and trailing single quotes
	tx=tx.replace(/^\`(.*)\`$/g,"$1");   // remove leading and trailing single quotes

	tx=tx.replace(/~/g,"<br>");
	tx=tx.replace(/--/g,"&ndash;");
	tx=tx.replace(/-1/g,"<span class=SUP>-1</span>");
	tx=tx.replace(/TWIN2/g,"TWIN<span class=SUP>2</span>");
	tx=tx.replace(/\sm2/g," m<span class=SUP>2</span>");
	tx=tx.replace(/\~/g,"<br>");
	tx=tx.replace(/\#/g,"&shy;");
	tx=tx.replace(/<p class=thead><\/p>/,"");
	// From September 26, 2009 doublequotes must be represented as `` in the db
	tx=(utilang=="de") ? tx.replace(/\`\`(\w)/g,"&bdquo;$1")   : 	tx.replace(/\`\`(\w)/g,"&ldquo;$1")	 ;

	tx=tx.replace(/\`\`/g,"&rdquo;")
	tx=tx.replace(/\`/g,"&rsquo;")
	tx=tx.replace(/\~$/,"");
	tx=tx.replace(/tandem/ig,"TANDEM");
	tx=tx.replace(/coûts unitaires/ig,"coûts par pièce");
	 tx=tx.replace(/TWIN-Power2/g, "TWIN-Power<span class=SUP>2</span>");

return tx
}

function processTable(tx){
	tx=(utilang=="de") ? tx.replace(/\`\`(\w)/g,"&bdquo;$1")   : 	tx.replace(/\`\`(\w)/g,"&ldquo;$1");
	tx=tx.replace(/\`\`/g,"&rdquo;")
	tx=tx.replace(/\~$/,"");
	tx=tx.replace(/\|/g,"</td><td>");
	tx=tx.replace(/~~/g,"</td></tr><tr><td class=tablespacer></td></tr>\n<tr><td nowrap>\n");
	tx=tx.replace(/~/g,"</td></tr>\n<tr><td>");
	tx=tx.replace(/--/g,"&ndash;");
	tx=tx.replace(/-1/g,"<span class=SUP>-1</span>");
	tx=tx.replace(/TWIN2/g,"TWIN<span class=SUP>2</span>");
	tx=tx.replace(/H\/l\/P/g,"H/L/P");
	//alert(tx);

return tx
}

function stopEvent(){
		e=e||window.event;
		if (e.stopPropagation) {e.stopPropagation();alert("Propstop")}	 //moz
		else {e.cancelBubble = true;alert("CancelBub")}	  //ie
}

function backer(){
self.location.back(-1)
}

function toEl(e){
	var relTarg;
	if (!e) var e = window.event;
	if (e.relatedTarget) relTarg = e.relatedTarget;
	else if (e.toElement) relTarg = e.toElement;
	return relTarg
}

// Routines used in all levels

// Stock the div:
var langsToShow= [
"Deutsch",
"Italiano",
"English",
"Fran&ccedil;ais"
//"Espa&ntilde;ol",

] ;

function showLangChooser(){

var lang=self.location.search.substring(1,3)    // in allcases

var langhalt="<div ID=BOX2 style='width:450px;margin-left:168px;margin-top:270px;line-height:20px;font-size:14px;font-weight:normal;font-family:tahoma,verdana,arial;letter-spacing:0.5px'>";

var pageSpecifier= (self.location.search.length>3) ? self.location.search.substring(3,30) : "";
var baseurl=self.location.href.replace(/\?.*/,"?");

//alert("baseurl:"+baseurl+"\npageSpecifier:"+pageSpecifier);

for(s=0;s<4;s++){
	var lcTargetLang=langsToShow[s].substring(0,2).toLowerCase()
	if(lcTargetLang != lang) {
	 //var newUrl=baseurl+lcTargetLang+pageSpecifier;
	  var newUrl ="http://stama.de/STAMA_"+lcTargetLang+"/index.html"

	  if(lcTargetLang.match(/de|en|it|fr/)){ // add |en to enable new version
		  newUrl=baseurl+""+lcTargetLang+""+pageSpecifier;
		  langhalt+= "<img  src='pix/red_klammer.png' border=0 /> <a style='color:gray;text-decoration:none' href='"+newUrl+"' target=_self>"+ langsToShow[s] +"</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;";
		 // alert("Going here:"+newUrl)
	  }
	   else{
	   //alert(newUrl)
		langhalt+= "<img  src='pix/red_klammer.png' border=0 /> <a style='color:gray;text-decoration:none'  href='"+newUrl+"' target=_parent>"+ langsToShow[s] +"</a>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;";
		}
	}
}
//alert(newUrl)

$('LANGUAGES').innerHTML=langhalt+"</div>";

$('WARTEMAL').style.top="0px"
$('WARTEMAL').style.zIndex="50"
setOpacity($('WARTEMAL'),0.9)
showMe('WARTEMAL');
$('LANGUAGES').style.left="185px";
//alert($('LANGUAGES').style.left)
showMe('LANGUAGES');

$('LANGUAGES').onmouseout=function(event){hideLangChooser(event)}


}

function hideLangChooser(e){
	//var e=e;

	//if(!e){e=window.event}
	//alert(typeof(e))

	//alert("Hiding langs!")

	var relTarg =toEl(e);

	try{if( ( typeof(relTarg) !="undefined"  && relTarg.id !=null && relTarg.id != "LANGUAGES" &&  relTarg.tagName !="A" &&  relTarg.tagName !="IMG" &&  !relTarg.id.match(/BOX/)) ) {
		//alert(relTarg.tagName+"\n"+relTarg.id+"\n"+relTarg.innerHTML)
		hideMe($('LANGUAGES'));
		try{hideMe('IMPRESS')}catch(e){}
		try{hideMe('EMPFEHL')}catch(e){}
		hideMe('WARTEMAL');
		}
		}
	catch(e){
		//alert("ANYWAYS!")
		hideMe('LANGUAGES');
		try{hideMe('IMPRESS')}catch(e){}
		try{hideMe('EMPFEHL')}catch(e){}
		hideMe('WARTEMAL');
	}

	// in case the mouse lands in the bottom frame

}

var timeouts =[];

function clearTOs(){
if (timeouts) for (var i in timeouts) if (timeouts[i]) clearTimeout(timeouts[i]);
timeouts = [];
}

// use thus: timeouts[timeouts.length] =setTimeout('preShow()',500)


function setOpacity(obj,o){
// round opacity to 3 decimal points to avoid excessive;ly long values
o=Math.round(o*10000)/10000;

if(o<0){o=0}

if(document.all) {
        var bigO=parseInt(o*100);
         $(obj).style.filter="alpha(opacity="+bigO+")";
   }
   else{
       $(obj).style.opacity=o;
    }
    $(obj).style.display='block';
	//alert("Just set opacity to "+o)
}

function toggleImpressum(e){
showMe('WARTEMAL');
 if(self.location.href.match(/impressum/))	 {self.close(); return} // special case for impressum in window

if(document.getElementById('IMPRESS')==null){
	//alert("IM Not there!");
	var imp = document.createElement("div");
	imp.setAttribute("id","IMPRESS");
	window.document.body.appendChild(imp);
	  $('IMPRESS').onmouseout=function(event){toggleImpressum(event)}
	}

if( $('IMPRESS').style.display=="block"){
	//alert($('IMPRESS').style.display)
	var woDann=toEl(e);

	try{if(!woDann || typeof(woDann)=="undefined" || woDann.tagName.match(/text/)){return}	 }catch(e){return}
	try{if(!woDann.id=="WARTEMAL"){return}}catch(e){return}

	  if(woDann.id=="WARTEMAL"){
		hideMe('IMPRESS');
		try{hideMe('LANGUAGES')}catch(e){}
		try{hideMe('EMPFEHL')}catch(e){}
		//setOpacity($('WARTEMAL'),0)
		hideMe('WARTEMAL');
	  }

	}

else{

	// This in case the user clicks before WARTEMAL is hidden after load of page
	timeouts[timeouts.length] =setTimeout("if($('IMPRESS').style.display=='block'){setOpacity($('WARTEMAL'),0.9);showMe('WARTEMAL')}",100)
	timeouts[timeouts.length] =setTimeout("if( $('IMPRESS').style.display=='block'){setOpacity($('WARTEMAL'),0.9);showMe('WARTEMAL')}",500)
	timeouts[timeouts.length] =setTimeout("if( $('IMPRESS').style.display=='block'){setOpacity($('WARTEMAL'),0.9);showMe('WARTEMAL')}",1000)

  try{$('EINAUSBLENDEN').style.zIndex=1} catch(e){}	   // l3 pages
  setOpacity($('WARTEMAL'),0.9)
  if(document.getElementById('PROGRESS')==null){}else{hideMe($('PROGRESS'))}
   $('WARTEMAL').style.top="0px"
   showMe('WARTEMAL');	//<DIV ID='CLOSEBOX' onclick=\"toggleImpressum()\">X</DIV>
   if(utilang=="de"){
	$('IMPRESS').innerHTML="<h1 style='top:20px;left:25px;'>Impressum</h1> <table class=but style='width:354px;height:20=30px;border:0px solid orange'><tr><td width=150px valign=top>Name und Sitz:</td><td>STAMA Maschinenfabrik GmbH<br>Siemensstraße 23 <br>D-73278 Schlierbach </td></tr><tr><td valign=top>Geschäftsführer: </td><td>Dr.-Ing. Dipl.-Kfm. Achim Feinauer<br>Dipl.-Math. Helmut Michels</td></tr><tr><td>Telefon: </td><td>0 70 21/5 72-1 </td></tr><tr><td>Telefax: </td><td>0 70 21/57 22 29 </td></tr><tr><td>E-Mail: </td><td> info@stama.de </td></tr><tr><td valign=top>Handelsregister:</td><td>Amtsgericht Ulm HRB 530 291 </td></tr></table><br><DIV ID=IMPSCROLLER>	1999–2009 © STAMA Maschinenfabrik GmbH, www.stama.de, alle Rechte vorbehalten.<p>Inhaber und Betreiber der Website:<br>STAMA Maschinenfabrik GmbH<br>Konzept und Produktion:<br>Peter Wustrow GmbH Werbeagentur Stuttgart<br>Programmierung/Realisation:<br>Kupola Grafik- und Internetdesign</p><p>Es ist unser Ziel, die Zuverlässigkeit der auf unserer Website veröffentlichten Informationensicherzustellen. Dennoch ist es möglich, dass Teile der Website unvollständigoder nicht aktuell sind. Daher ist es wichtig, dass Sie diese Informationen mit unsüberprüfen, bevor Sie weitere Schritte in Bezug auf diese Informationen unternehmen.</p><p><p><b>Datenschutzerklärung</b><br>Wir freuen uns über Ihren Besuch auf unserer Webseite sowie über ihr Interesse anunserem Unternehmen und unseren Produkten. Damit Sie sich beim Besuch unserer Webseite sicher und wohl fühlen, nehmen wir den Schutz Ihrer persönlichen Datenund deren vertrauliche Behandlung sehr ernst. Mit diesen Hinweisen zum Datenschutzmöchten wir Sie daher darüber informieren, wann wir welche Daten speichern und wiewir sie verwenden – selbstverständlich unter Beachtung der geltenden deutschen Datenschutzvorschriften.</p><p><b>Anonyme Datenerhebung</b><br>Wenn Sie auf unsere Internetseiten zugreifen, erfassen unsere Web-Server automatischInformationen allgemeiner Natur. Dazu gehören die Art des Webbrowsers, dasverwendete Betriebssystem, der Domainname des Internet Service Providers, die IPAdressedes verwendeten Computers, die Webseite, von der aus Sie uns besuchen, dieSeiten, die Sie bei uns besuchen sowie das Datum und die Dauer des Besuches. Hierbeihandelt es sich ausschließlich um Informationen, welche keine Rückschlüsse aufIhre Person zulassen. Wir werten diese Daten nur für statistische Zwecke und nur inanonymer Form aus.</p><p><b>Erhebung und Verarbeitung personenbezogener Daten</b>	<br>Personenbezogene Daten werden nur erhoben, wenn Sie diese von sich aus, zum Beispielzur Durchführung eines Auftrages, einer Umfrage oder einer Registrierung fürpersonalisierte Dienste mitteilen. Dort werden Sie über den beabsichtigten Verarbeitungszweckinformiert und falls erforderlich um Ihre Zustimmung zur Speicherung gebeten.Ihre Daten werden vor der Übertragung und Verarbeitung verschlüsselt, umdiese vor dem Zugriff unberechtigter Personen zu schützen.</p><p><b>Nutzung und Weitergabe der erhobenen Daten</b> <br>Die im Rahmen unserer Webseiten erhobenen personenbezogenen Daten werden ohneIhre Einwilligung nur zur Auftragsabwicklung oder Bearbeitung Ihrer Anfragen genutztund dafür gegebenenfalls an unsere Partnerfirmen weitergegeben. Ihre Daten werdennicht verkauft, vermietet oder in anderer Weise Dritten zur Verfügung gestellt. Übermittlungenpersonenbezogener Daten an staatliche Einrichtungen und Behörden erfolgennur im Rahmen zwingender nationaler Rechtsvorschriften. Unsere Mitarbeiter,Agenturen und Händler sind von uns zur strengster Vertraulichkeit verpflichtet.  </p><p><b>Copyright</b> <br>Alle Texte, Bilder, Audio-Dateien und weitere hier veröffentlichte Informationen unterliegendem Copyright der STAMA Maschinenfabrik GmbH. Eine Reproduktion oder Wiedergabedes Ganzen oder von Teilen ist ohne die schriftliche Genehmigung von STAMAnicht gestattet.</p><p><b>Verlinkungen</b> <br>Trotz sorgfältiger inhaltlicher Kontrolle übernehmen wir keine Haftung für die Inhalteexterner Links. Für den Inhalt der verlinkten Seiten sind ausschließlich deren Betreiber verantwortlich.</p></DIV>";
   }

  else if(utilang=="en"){
   $('IMPRESS').innerHTML="<h1 style='top:20px;left:25px;'>Imprint</h1> <table class=but style='width:354px;height:20=30px;border:0px solid orange'><tr><td width=150px valign=top>Name and Address:</td><td>STAMA Maschinenfabrik GmbH<br>Siemensstraße 23 <br>D-73278 Schlierbach </td></tr><tr><td valign=top>Managing Director: </td><td>Dr.-Ing. Dipl.-Kfm. Achim Feinauer<br>Dipl.-Math. Helmut Michels</td></tr><tr><td>Telephone: </td><td>0 70 21/5 72-1 </td></tr><tr><td>Fax: </td><td>0 70 21/57 22 29 </td></tr><tr><td>E-Mail: </td><td> info@stama.de </td></tr><tr><td valign=top>Commercial Registry:</td><td>Amtsgericht Ulm HRB 530 291 </td></tr></table><br><DIV ID=IMPSCROLLER>© 1999-2009, STAMA Maschinenfabrik GmbH, www.stama.de. All rights reserved. It is our goal to ensure the accuracy of information published on our website. Nevertheless, it is possible that some parts may be incomplete or out of date. It is therefore essential that you verify all such information with us before taking any action that relies on it.<br><br>Liability Notice: We have carefully checked through those websites to which we provide links. We do not, however, assume any responsibility for their content. The operators of these websites are alone responsible for their content.</p></DIV>";
    $('IMPSCROLLER').style.overflow='hidden'
   }

 else if(utilang=="fr"){
   $('IMPRESS').innerHTML="<h1 style='top:20px;left:25px;'>Mentions légales</h1> <table class=but style='width:354px;height:20=30px;border:0px solid orange'><tr><td width=150px valign=top>Nom et siège:</td><td>STAMA Maschinenfabrik GmbH<br>Siemensstraße 23 <br>D-73278 Schlierbach </td></tr><tr><td valign=top>Gérants: </td><td>Dr.-Ing. Dipl.-Kfm. Achim Feinauer<br>Dipl.-Math. Helmut Michels</td></tr><tr><td>Téléphone: </td><td>0 70 21/5 72-1 </td></tr><tr><td>Télécopie: </td><td>0 70 21/57 22 29 </td></tr><tr><td>E-Mail: </td><td> info@stama.de </td></tr><tr><td valign=top>Registre du commerce:</td><td>Tribunal d'instance de Ulm HRB 530 291 </td></tr></table><br><DIV ID=IMPSCROLLER>© 1999-2008, STAMA Maschinenfabrik GmbH, www.stama.de. Tous droits réservés. L'exactitude des informations publiées sur notre site a été vérifiée scrupuleusement. Toutefois, il est possible que certaines parties du site soient incomplètes ou inactuelles. Par conséquent, il est primordial que vous vérifiiez ces informations avec nous avant d'entreprendre les démarches qui s'y rapportent.</p><p>Responsabilité : En dépit du contrôle rigoureux auquel nous les avons soumis, nous rejetons toute responsabilité quant aux contenus des sites externes pointés. Seul l'exploitant du site pointé est responsable du contenu.</p></DIV>";
    $('IMPSCROLLER').style.overflow='hidden'
   }

   else if(utilang=="it"){
   $('IMPRESS').innerHTML="<h1 style='top:20px;left:25px;'>Informazione legale</h1> <table class=but style='width:354px;height:20=30px;border:0px solid orange'><tr><td width=150px valign=top>Nome ed indirizzo:</td><td>STAMA Maschinenfabrik GmbH<br>Siemensstraße 23 <br>D-73278 Schlierbach </td></tr><tr><td valign=top>Direttore di Controllo: </td><td>Dr.-Ing. Dipl.-Kfm. Achim Feinauer<br>Dipl.-Math. Helmut Michels</td></tr><tr><td>Telefono: </td><td>0 70 21/5 72-1 </td></tr><tr><td>Fax: </td><td>0 70 21/57 22 29 </td></tr><tr><td>E-Mail: </td><td> info@stama.de </td></tr><tr><td valign=top>Registro commerciale:</td><td>Amtsgericht Ulm HRB 530 291 </td></tr></table><br><DIV ID=IMPSCROLLER>© 1999-2009, STAMA Maschinenfabrik GmbH, www.stama.de. Tutti i diritti riservati. È nostro interesse garantire l'esattezza delle informazioni pubblicate sul nostro sito web. Tuttavia è possibile che alcune parti del sito siano incomplete o non aggiornate. È quindi essenziale che verifichiate tali informazioni con noi prima di intraprendere qualsiasi azione facendo riferimento ad esse.<br><br>Nonostante gli accurati controlli sul contenuto, non ci assumiamo alcuna responsabilità per i contenuti dei link esterni. La responsabilità del contenuto delle pagine collegate mediante link appartiene esclusivamente ai rispettivi gestori.</p></DIV>";
    $('IMPSCROLLER').style.overflow='hidden'
   }
   showMe('IMPRESS');
	$('IMPRESS').onmouseout=function(event){toggleImpressum(event)}

	//alert($('IMPRESS').innerHTML)
	}
}


function shortPageName(){
var shortPN=document.location.href.replace(/http.*\//,"");

if(shortPN.match(/home/i))	{
	shortPN="Homeseite (" + document.location.search.substring(1,3) +")";
	}
else if(shortPN.match(/level2/i))	{
	shortPN="2.-Ebene-Seite (" + document.location.search.substring(1,100) +")";
	}
else if(shortPN.match(/level3/i))	{
	shortPN="3.-Ebene-Seite (" + document.location.search.substring(1,100) +")";
	}


return shortPN;
}



function toggleEmpfehlung(e){


if(document.getElementById('EMPFEHL')==null){
	//alert("IM Not there!");
	var emp = document.createElement("div");
	emp.setAttribute("id","EMPFEHL");
	window.document.body.appendChild(emp);
	// $('EMPFEHL').onmouseout=function(event){toggleEmpfehlung(event)}
	}

if( $('EMPFEHL').style.display=="block"){
	var woDann=toEl(e);

	try{if(!woDann || typeof(woDann)=="undefined" || woDann.tagName.match(/text/)){return}	 }catch(e){return}
	try{if(!woDann.id=="WARTEMAL"){return}}catch(e){return}

	  if(woDann.id=="WARTEMAL"){
		hideMe('EMPFEHL');
		try{hideMe('IMPRESS')}catch(e){}
		try{hideMe('LANGUAGES')}catch(e){}
		setOpacity($('WARTEMAL'),0.9)
		hideMe('WARTEMAL');
	  }

	}

else{
	try{$('EINAUSBLENDEN').style.zIndex=1} catch(e){}
     setOpacity($('WARTEMAL'),0.9)
    if(document.getElementById('PROGRESS')==null){}else{hideMe($('PROGRESS'))}
    $('WARTEMAL').style.top="0px"
    showMe('WARTEMAL');
	// This in case the user clicks before WARTEMAL is hidden after load of page
	timeouts[timeouts.length] =setTimeout("if($('EMPFEHL').style.display=='block'){setOpacity($('WARTEMAL'),0.9);showMe('WARTEMAL')}",100)
	timeouts[timeouts.length] =setTimeout("if( $('EMPFEHL').style.display=='block'){setOpacity($('WARTEMAL'),0.9);showMe('WARTEMAL')}",500)
	timeouts[timeouts.length] =setTimeout("if( $('EMPFEHL').style.display=='block'){setOpacity($('WARTEMAL'),0.9);showMe('WARTEMAL')}",1000)

	taWidth="141px"
	if(is_mac){taWidth="152px"}
	if(document.all){taWidth="150px"}	   //<!--  -->

if(utilang=="de") {
	$('EMPFEHL').innerHTML="<form name=empform id=EMPFORM method=post action='http://stama.kupola.de/cgi-bin/stama_rec.cgi'><DIV ID='CLOSEBOX' onclick=\"hideEmpfehlung()\">X</DIV><input type=hidden name=woher id=WOHER value=''><h1 ID=EMPH1 style='top:30px;left:25px;font-size:18px;'>Vielen Dank, dass Sie die STAMA-Website weiterempfehlen.</h1><br><table ID=EMPTAB><tr><td>Ihr Name</td><td align=right><input type='text' id='VON' name='von'></td></tr><tr><td>Ihre E-Mail-Adresse</td><td align=right><input ID=EMAIL type='text' name='Email'></td></tr><tr><td>Weiterleiten an (E-Mail)</td><td align=right><input type='text'  ID=AN  name='an'></td></tr><tr><tr id=NIX><td valign=top>Ihre Nachricht dazu</td><td align=right><TEXTAREA id=WLN name='Nachricht' cols=9 rows=5 style='height:70px;width:"+taWidth+";margin-left:0px; font-family:arial,helvetica;font-size:11px;line-height:13px'></TEXTAREA></td></tr><tr><td></td><td align=right><input type='button'  ID=SENDY value='Senden' class=but onclick='checkEmp()'></td></tr></table></form><br>Die E-Mail-Adressen, die Sie hier angeben, werden nur für die Versendung dieses Seitenlinks verwendet und weder gespeichert noch für Werbezwecke verwendet."
}
else if(utilang=="en") {
	$('EMPFEHL').innerHTML="<form name=empform id=EMPFORM method=post action='http://stama.kupola.de/cgi-bin/stama_rec_sprachen.cgi'><DIV ID='CLOSEBOX' onclick=\"hideEmpfehlung()\">X</DIV><input type=hidden name=woher id=WOHER value=''><h1 ID=EMPH1 style='top:30px;left:25px;font-size:18px;'>Thank-you for recommending<br>the STAMA-Website</h1><br><table ID=EMPTAB><tr><td>Your name</td><td align=right><input type='text' id='VON' name='von'></td></tr><tr><td>Your email</td><td align=right><input ID=EMAIL type='text' name='Email'></td></tr><tr><td>Send to (email)</td><td align=right><input type='text'  ID=AN  name='an'></td></tr><tr><tr id=NIX><td valign=top>Your message</td><td align=right><TEXTAREA id=WLN name='Nachricht' cols=9 rows=5 style='height:70px;width:"+taWidth+";margin-left:0px; font-family:arial,helvetica;font-size:11px;line-height:13px'></TEXTAREA></td></tr><tr><td></td><td align=right><input type='button' ID=SENDY value='Submit' class=but onclick='checkEmp()'></td></tr></table><input type=hidden name='EMPSPRACHE' value='en'></form><br>The email adresses entered here will be used only for the transmission of your message to the recipient. They will not be stored or used in any other way."
}
else if(utilang=="fr") {
	$('EMPFEHL').innerHTML="<form name=empform id=EMPFORM method=post action='http://stama.kupola.de/cgi-bin/stama_rec_sprachen.cgi'><DIV ID='CLOSEBOX' onclick=\"hideEmpfehlung()\">X</DIV><input type=hidden name=woher id=WOHER value=''><h1 ID=EMPH1 style='top:30px;left:25px;font-size:18px;'>Merci pour votre recommandation<br>du site web STAMA</h1><br><table ID=EMPTAB><tr><td>Votre nom </td><td align=right><input type='text' id='VON' name='von'></td></tr><tr><td>Votre E-mail</td><td align=right><input ID=EMAIL type='text' name='Email'></td></tr><tr><td>Destinataire</td><td align=right><input type='text'  ID=AN  name='an'></td></tr><tr><tr id=NIX><td valign=top>Votre message</td><td align=right><TEXTAREA id=WLN name='Nachricht' cols=9 rows=5 style='height:70px;width:"+taWidth+";margin-left:0px; font-family:arial,helvetica;font-size:11px;line-height:13px'></TEXTAREA></td></tr><tr><td></td><td align=right><input type='button'  ID=SENDY value='Soumettez' class=but onclick='checkEmp()'></td></tr></table><input type=hidden name='EMPSPRACHE' value='fr'></form><br>Les adresses d'email écrits ici seront employés seulement pour la transmission de votre message au destinataire. Ils ne seront pas enregistrés et ne seront employés d'aucune autre manière.  "
}
else if(utilang=="it") {
	$('EMPFEHL').innerHTML="<form name=empform id=EMPFORM method=post action='http://stama.kupola.de/cgi-bin/stama_rec_sprachen.cgi?it'><DIV ID='CLOSEBOX' onclick=\"hideEmpfehlung()\">X</DIV><input type=hidden name=woher id=WOHER value=''><h1 ID=EMPH1 style='top:30px;left:25px;font-size:18px;'>Grazie per la raccomandazione <br>del Web site STAMA</h1><br><table ID=EMPTAB><tr><td>Il vostro nome </td><td align=right><input type='text' id='VON' name='von'></td></tr><tr><td>il vostro email</td><td align=right><input ID=EMAIL type='text' name='Email'></td></tr><tr><td>Trasmetta a ( email )</td><td align=right><input type='text'  ID=AN  name='an'></td></tr><tr><tr id=NIX><td valign=top>Il vostro messaggio </td><td align=right><TEXTAREA id=WLN name='Nachricht' cols=9 rows=5 style='height:70px;width:"+taWidth+";margin-left:0px; font-family:arial,helvetica;font-size:11px;line-height:13px'></TEXTAREA></td></tr><tr><td></td><td align=right><input type='button'  ID=SENDY value='Submit' class=but onclick='checkEmp()'></td></tr></table><input type=hidden name='EMPSPRACHE' value='it'></form><br>I email dati qui saranno usati soltanto per la trasmissione del vostro messaggio al destinatario. Non saranno immagazzinati o non utilizzati in qualunque altro senso. "
}

if($("MSG")){
		$("MSG").style.display="none";
	}

	$('WOHER').value=shortPageName();

	showMe('EMPFEHL');

	//alert($('EMPFEHL').innerHTML)
	//alert($('WLN').style.width)
	}
}


function checkEmp(){
var empEls=document.forms['EMPFORM'].elements
for(el=0;el<empEls.length;el++){
	var duh=empEls[el]
	var nm=duh.name;
	if(nm.match(/von/i) && duh.value.length<3){alert("Bitte das Feld \"Ihr Name\" ausfüllen") ;return}
	else if(nm.match(/an/i) && duh.value.length<3){alert("Bitte das Feld \"Weiterleiten an\" ausfüllen") ;return}
	else if(nm.match(/Email/i) && duh.value.length<3){alert("Bitte das Feld \"Ihre E-Mail-Adresse\" ausfüllen") ;return}
  	else if(nm.match(/Nachricht/i) && duh.value.length<3){alert("Bitte das Feld \"Ihre Nachricht dazu\" ausfüllen") ;return}
}
	document.forms['EMPFORM'].submit()
}

function hideEmpfehlung()	{
hideMe('CLOSEBOX');
hideMe('EMPFEHL');
hideMe('WARTEMAL')	;
}

function goToIndex(){
if(self.location.host=="192.168.0.2"){self.location='http://'+self.location.host+'/stama09/ix.htm'	 }
else{parent.location='http://stama.de'}
}

function goBack(){
	window.history.back(-1)
}

function goOn(){
	window.history.forward(1)
}

var de_navNames=[
	['Homeseite','Home'],
	['Kontaktseite','Kontakt'],
	['Impressum','Impressum'],
	['Sprache wählen','Sprache wählen'],
	['Seite weiterempfehlen','Seite weiterempfehlen']
] ;

var en_navNames=[
	['Home page','Home'],
	['Contact page','Contact'],
	['Imprint','Imprint'],
	['Choose language','Choose language'],
	['Recommend website','Recommend website']
] ;

var fr_navNames=[
	['Page d`accueil','Page d`accueil'],
	['Contact','Contact'],
	['Mentions légales','Mentions légales'],
	['Choisir langue','Choisir langue'],
	['Recommander ce site web','Recommander ce site web']
] ;


var it_navNames=[
	['Home page','Home'],
	['Contatto','Contatto'],
	['Informazione legale','Informazione legale'],
	['Scelga la lingua','Scelga la lingua'],
	['Suggerisca il Web site','Suggerisca il Web site']
] ;


function changeNaviLang(){

//alert(self.location.href)

if(self.location.href.match(/impressum|empfehlung|asp/)){return}	   // special cases

else{
var navNames;
//alert("utilang:"+utilang)
if(utilang){ navNames=eval(utilang+"_navNames") }
else{navNames=eval("de_navNames")}
//alert(navNames)

 try{var ul=document.getElementById('UNTERLEISTE').innerHTML}	   // don't use utils dollar syntax here
 catch(e){
		mongo=setTimeout("clearTimeout(mongo);changeNaviLang()",500)
		return
	}

	var spanz=	document.getElementsByTagName('SPAN');
	var s=0;

	 for(i=0;i<spanz.length;i++){

	 if(spanz[i].id.match(/NHOME|NKONTAKT|NIMPRESSUM|NLANGUAGECHOICE|NEMPFEHL/)) {

			var ksrc="pix/"
			spanz[i].childNodes[0].setAttribute("alt",navNames[s][0]);
			if(spanz[i].childNodes[0].title){spanz[i].childNodes[0].setAttribute("title",navNames[s][0])}
			spanz[i].childNodes[0].setAttribute("src","pix/unterleiste_klammer.png");

			var newNavItem=spanz[i].innerHTML
			newNavItem=newNavItem.replace(/(>).*/,"$1 "+navNames[s][1]);
			newNavItem=newNavItem.toString();

			document.getElementById(spanz[i].id).	innerHTML=newNavItem;

			s++;
		}

	}


if(utilang && utilang=="en"){
	$('BACKNAVIBUT').setAttribute("title","<< Back") ;
	$('BOBUP').setAttribute("title","Forwards >>")
}
else if(utilang && utilang=="it"){
	$('BACKNAVIBUT').setAttribute("title","<< indietro") ;
	$('BOBUP').setAttribute("title","avanti >>")
}
else if(utilang && utilang=="fr"){
	$('BACKNAVIBUT').setAttribute("title","<< retour") ;
	$('BOBUP').setAttribute("title","en avant >>")
}

}

showMe($('UNTERLEISTE'))

}

changeNaviLang()

function addPrintIm(){
 var pim=document.createElement("IMG");
 pim.setAttribute("id","PRINTIM");
 pim.setAttribute("src","pix/drucken.gif");
 pim.setAttribute("title","Seite drucken");
document.body.appendChild(pim)
 $('PRINTIM').onclick=function(){window.print()}
}

//setTimeout("addPrintIm()",2000)
var bezeichnung;
if(self.location.href.match(/home/))			 {bezeichnung="Homeseite"}
else if(self.location.href.match(/level2/))	 {bezeichnung="Level 2"}
else if(self.location.href.match(/level3/))	 {bezeichnung="Level 3 "}
else if(self.location.href.match(/form/))	 {bezeichnung="Formular"}
else if(self.location.href.match(/video/))	 {bezeichnung="Video"}
else if(self.location.href.match(/wsg/))		 {bezeichnung="Werkstückgalerie"}

if(parent.frames[0] && parent.frames[0].whereAmI && parent.frames[0].document.getElementById('blankQS')){
	parent.frames[0].document.getElementById('blankQS').innerHTML="<span style='cursor:pointer;color:red;font-size:12px;' onclick='parent.frames[2].location=parent.frames[2].location.href'>&reg;</span> "+bezeichnung+" &ndash; "+document.location.search.substring(1,30).replace(/\|.*/,"")
	}


//---------------------------------------------------//

//alert("Utils loaded! ßäüö\n"+self.location.href);
var utilsLoaded=1;

//alert(self.location.search)


