//#########################################
// coding 2005 Ralf H. Schübel / www.ad1.de
// jegliche Aenderung am Quellcode dieses Dokumentes
// und seiner Bestandteile nur mit ausdrücklicher,
// schriftlicher Genehmigung.
//#########################################

if(top.frames.length > 0) top.location.href=self.location;

// ################################### //
USA=navigator.userAgent.toUpperCase();
ie4 = ((USA.indexOf("MSIE 4") > 0) || (USA.indexOf("MSIE 5") > 0) || (USA.indexOf("MSIE 6") > 0) || (USA.indexOf("MSIE 7") > 0) || (USA.indexOf("MSIE 8") > 0) && (USA.indexOf("Opera") < 0)) ? 1 : 0
n4 = ((USA.indexOf("MOZILLA/4") >= 0) && (navigator.appName=="Netscape")) ? 1 : 0
n6 = (USA.indexOf("GECKO") > 0) ? 1 : 0
op = (navigator.userAgent.indexOf("OPERA") > 0) ? 1 : 0

nodom = 0;
dom = 0;

ff = (USA.indexOf("FIREFOX") >= 0) ? 1 : 0 ;
n6 = (USA.indexOf("GECKO") >= 0) ? 1 : 0 ;
ie = (USA.indexOf("MSIE") >= 0) ? 1 : 0 ;

dom = (document.getElementById) ? 1 : 0 ;
if(dom){
	// ie4 = 0;
} else {
	nodom = 1;
}

// ################################### //

if(!langdir)langdir = "en"


if(!window.wwi && window.innerWidth) {
 window.onresize = reget;
	wwi = wiwi();
	whi = wihi()
}
// ################################### //
function stych(){
	if(n4){if(!document.layers.toto) this.location.href = "../ohnocss.html"}
}
// ################################### //
function prep(pObj,pSrc){
	if(document.images){
		eval(pObj+' = new Image()')
		eval(pObj+'.src = "'+pSrc+'"')
	}
}

prep('mom0','../p/mom0.gif')
prep('mom1','../p/mom1.gif')
prep('mom2','../p/mom2.gif')
prep('mom3','../p/mom3.gif')
prep('mom4','../p/mom4.gif')

prep('mondo0','../p/welt.gif')
prep('mondo1','../p/welt-fh.gif')
prep('mondo2','../p/welt-cu.gif')
prep('mondo3','../p/welt-ch.gif')
prep('mondo4','../p/welt-on.gif')
prep('mondo5','../p/welt-pa.gif')
prep('mondo6','../p/welt-ka.gif')
prep('mondo7','../p/welt-sh.gif')

prep('vid10','../p/Delapena-o.jpg')
prep('vid11','../p/Delapena-x.jpg')
prep('vid20','../p/LaserHonen-o.jpg')
prep('vid21','../p/LaserHonen-x.jpg')
prep('vid30','../p/HorizontalHonen-o.jpg')
prep('vid31','../p/HorizontalHonen-x.jpg')
prep('vid40','../p/Wechsler-o.jpg')
prep('vid41','../p/Wechsler-x.jpg')
prep('vid50','../p/Werkzeuge-o.jpg')
prep('vid51','../p/Werkzeuge-x.jpg')
prep('vid60','../p/Service-o.jpg')
prep('vid61','../p/Service-x.jpg')
prep('vid70','../p/Diato-o.jpg')
prep('vid71','../p/Diato-x.jpg')
prep('vid80','../p/Kleinteile-o.jpg')
prep('vid81','../p/Kleinteile-x.jpg')

prep('P11','../p/xx.gif')
prep('P10','../p/xo.gif')

// ################################### //

gdly = 444 
sph = "<img src=\"../p/bl.gif\" width=\"1\" height=\"5\" alt=\"\">"
scah = screen.availHeight
scaw = screen.availWidth
go = 0
Xo = 0
Yo = 0
x = ""
y = ""
wid = 624
wid2 = 800 // w mm4
hioffs = 20
dbowmin = 888
wwi = 0
whi = 0
dboh = 0
agit = "x"
subk = 0
subcl = 0
Li = 0
Re = 0
Ob = 0
Un = 0
isover = 0

function wop(dok, we, ho, winame){
	li = (scaw-we)/1.7
	ob = (scah-ho)/3
	eval("window.open\(\""+dok+"\",\""+winame+"\",\"scrollbars=no,status=no,width="+we+",height="+ho+",left="+li+",top="+ob+"\"\)");
}

medir = "wm"

function mwop(dok){
var we = 320
var ho = 240
if(document.forms["mepl"].MeFo[0].checked) medir = "wm"
if(document.forms["mepl"].MeFo[1].checked) medir = "qt"
if(document.forms["mepl"].MeFo[2].checked) medir = "rm"
//	li = (scaw-we)/1.2
//	ob = (scah-ho)/2
	li = 656
	ob = 324
	eval("window.open\(\"../media/"+medir+"/010"+dok+".html\",\"MP\",\"scrollbars=no,status=no,dependent=yes,width="+we+",height="+ho+",left="+li+",top="+ob+"\"\)");
}

// ################################### //

memo = 0
mstp = 4
mdly = (n4) ? 64 : 33
var mgo, gtg
stp = 0

function momen(tw,tgt){
gtg = tgt
mo = tw


window.clearTimeout(mgo)


		if(n6){
			if(stp==7){
				document.getElementById("blnk").style.visibility = "hidden"
				document.getElementById("adr").style.visibility = "visible"
	//		document.getElementById("BiLi").style.visibility = "visible"
			}
			if(memo==0){
				document.getElementById("blnk").style.visibility = "visible"
				document.getElementById("adr").style.visibility = "hidden"
	//		document.getElementById("BiLi").style.visibility = "hidden"
			}
			document.getElementById("mm"+memo).style.visibility = "hidden"
			memo = memo+tw
			stp++
			document.getElementById("mm"+memo).style.visibility = "visible"
			}
		if(ie4){
			if(stp==7){
				document.all["blnk"].style.visibility = "hidden"
				document.all["adr"].style.visibility = "visible" }
			if(memo==0){
				document.all["blnk"].style.visibility = "visible"
				document.all["adr"].style.visibility = "hidden"
			}
			document.all["mm"+memo].style.visibility = "hidden"
			memo = memo+tw
			stp++
			document.all["mm"+memo].style.visibility = "visible"
			}
		if(n4){
			if(stp==7){
				document.blnk.visibility = "hide"
				document.adr.visibility = "show"
			}
			if(memo==0){
				document.blnk.visibility = "show"
				document.adr.visibility = "hide"
			}			
			document.eval("mm"+memo).visibility = "hide"
			memo = memo+tw
			stp++
			document.eval("mm"+memo).visibility = "show"
			}

		if (memo > mstp) memo = mstp

		if(mo==1){
			if(memo < mstp){
				mgo = window.setTimeout("momen(mo,gtg)",mdly)
			}
		}

		if(mo==-1){
			if(memo > 0){
				mgo = window.setTimeout("momen(mo,gtg)",mdly)
			} else {
				//alert("en"+gtg+".php")
				stp = 0
				if(gtg!=0) self.location.href = "c"+gtg+".php"
			}
		}

	

}

// ################################### //


I = 0
keeper = 0

function px(psw){

//		alert(I+" - "+keeper+" - "+subk+" - ")//histp

window.clearTimeout(subcl)

subok = (I==2||I==3) ? 1 : 0 // 
		
	keeper = I	

	if(pnr!=I&&psw==1){
		if(ie4||n6) document.images["NP"+I].src = eval("np"+I+"m"+yw).src
		if(n4) document["N"+I].document.images["NP"+I].src = eval("np"+I+"m"+yw).src
	}
	

	if(subk==2||subk==3){
		if(n6) document.getElementById("subn"+subk).style.visibility = "hidden"
		if(ie4) document.all["subn"+subk].style.visibility = "hidden"
		if(n4) document["subn"+subk].visibility = "hide"
	}


	if((subok==1)&&(go==1)){
		subk = I
		if(n6) document.getElementById("subn"+I).style.visibility = "visible"
		if(ie4) document.all["subn"+I].style.visibility = "visible"
		if(n4) document["subn"+I].visibility = "show"
	}

}

// ################################### //

function po(){
	if(pnr!=keeper){
		if(ie4||n6) document.images["NP"+keeper].src = eval("np"+keeper+"o"+yw).src
		if(n4) document["N"+keeper].document.images["NP"+keeper].src = eval("np"+keeper+"o"+yw).src
	}

	if(keeper==2||keeper==3){	
		subcl = window.setTimeout("suboff()",888)
	}		

}

// ################################### //

function suboff(){
	if(subk==2||subk==3){
		if(n6) document.getElementById("subn"+subk).style.visibility = "hidden"
		if(ie4) document.all["subn"+subk].style.visibility = "hidden"
		if(n4) document.eval["subn"+subk].visibility = "hide"
	}
}

// ################################### //

function wiwi() {
	if (window.innerWidth) return window.innerWidth;
	else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
	else return 0;
}

function wihi() {
	if (window.innerHeight) return window.innerWidth;
	else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
	else return 0;
}

function reget(){
	if (wwi !=wiwi() || whi != wihi())
	window.history.go(0);
}

// ###################################### //

function mouseMove(e) {
	if (ie4) {
		x = event.clientX + document.body.scrollLeft
		y = event.clientY + document.body.scrollTop
		} else {
		x = e.pageX
		y = e.pageY
	}
	if (x < 0){x= 0}
	if (y < 0){y = 0}

// window.status = x + " " + y
	return true
}

// ###################################### //

function init() {
window.setTimeout("go=1",222)
document.onmousemove = mouseMove
if (n4) document.captureEvents( Event.MOUSEMOVE )
}

// ###################################### //

function bounce(){

	momen(-1)
	

}

// ###################################### //
sckeep = 0

function scsc(){

if(go==1){

	if(ie4){
			scY = document.body.scrollTop
			lev = 	parseInt(document.all.adr.style.top)+10
			loffs = scY-lev
			histp = Math.floor((loffs)/4)
			if(dboh>312){	document.all.adr.style.top = (scY>330) ?  lev+histp : 280 }
	}

	if(n6){
			scY = document.body.scrollTop
			lev = 	parseInt(document.getElementById("adr").style.top)+10
			loffs = scY-lev
			histp = Math.floor((loffs)/4)
			if(dboh>312){	document.getElementById("adr").style.top = (scY>330) ?  lev+histp : 280 }
		//	document.getElementById("ttp").style.visibility = (scY>165) ? "visible" : "hidden"
	}

	if(n4){

			scY = pageYOffset
			lev = 	parseInt(document.adr.top)+10
			loffs = scY-lev
			histp = Math.floor((loffs)/4)
			if(dboh>312){	document.adr.top = (scY>330) ?  lev+histp : 280 }
	//		document.redII.document.kodat.document.ttp.visibility = (scY>165) ? "show" : "hide"

	}

	sckeep = scY
}

}
// ###################################### //

var sag = "";

function ie4click(){
		if (ie4)	{
		void(sag);
		return false;
		}
}

function nclick(e){
		if(n4||n6)	{
			if (e.which==2||e.which==3){
				void(sag);
				return false;
			}
		}
}

if (n4) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=nclick;
} else {
	document.onmouseup=nclick;
	document.oncontextmenu=ie4click;
}
document.oncontextmenu=new Function("return false")

// ###################################### //

function prospector(){


	if(ie4){
		coht = parseInt(document.all.mm4.offsetHeight)
		cowt = parseInt(document.all.mm4.offsetWidth)
		Li = parseInt(document.all.mm4.style.left)
		Ob = parseInt(document.all.mm4.style.top)
		contw = parseInt(document.all.cont.offsetWidth)
		conth = parseInt(document.all.cont.offsetHeight)
	}


	if(n4){
		coht = parseInt(document.mm4.clip.bottom)
		cowt = parseInt(document.mm4.clip.right)
		Li = parseInt(document.mm4.left)
		Ob = parseInt(document.mm4.top)
		contw = parseInt(document.cont.clip.right)
		conth = parseInt(document.cont.clip.bottom)
	}

	if(n6){
		coht = parseInt(document.getElementById('mm4').offsetHeight)
		cowt = parseInt(document.getElementById('mm4').offsetWidth)
		Li = parseInt(document.getElementById('mm4').style.left)
		Ob = parseInt(document.getElementById('mm4').style.top)
		conth = parseInt(document.getElementById('cont').offsetHeight)
		contw = parseInt(document.getElementById('cont').offsetWidth)
	}

	Re = parseInt(Li+cowt)	
	Un = parseInt(Ob+coht)

	joergW = (n4) ? Math.floor(dbow/30) : Math.ceil((contw+220)/30)

	joergH = Math.ceil(conth/30)

	blankL = Xo-248

	blanx = "<img src=\"../p/blankk.gif\">"

	blank = ""
if(!n4){
	blank+= "<div id=\"blnk\" style=\"position:absolute;left:"+blankL+"px;";
	blank+= "top:102px;width:"+(contw+250)+"px;z-index:8;visibility:hidden;\">"
	for(ih=1; ih<=joergH; ih++){
		for(iw=1; iw<=joergW; iw++){
			blank+= blanx
		}
		blank+= "<br>"
	}
	blank+= "</div>"
}
	return blank

}

// ###################################### //

function jn(){

	isover = (x>=Li&&x<=Re&&y>=Ob&&y<=Un) ? 1 : 0

	if(memo==4&&isover==0) momen(-1,0)
}

// ###################################### /



if(langdir=="de") cycle = new Array("home", "c1-1", "c1-2", "c1-3", "c1-4", "c1-5", "c2-1", "c2-2", "c2-3", "c2-4", "c3-1", "c3-2", "c5-1", "c5-2", "c5-3", "c7-1", "c7-2", "c8-1", "c8-2", "c8-3", "c9-1", "c9-2", "c9-3", "c9-4")

// , "c10-1", "c10-2", "c10-3", "c10-4", "c10-5", "c10-6"

if(langdir=="en") cycle = new Array("home", "c1-1", "c1-2", "c1-3", "c1-4", "c2-1", "c2-2", "c2-3", "c2-4", "c3-1", "c3-2", "c5-1", "c5-2", "c5-3", "c7-1", "c7-2", "c8-1", "c8-2", "c8-3", "c9-1", "c9-2", "c9-3", "c9-4")

//, "c10-1", "c10-2", "c10-3", "c10-4", "c10-5", "c10-6"

function goon(to){

var hint = "...most Browsers will allow you to use\nthis function also by pressing the \ncursor-(arrow-) keys 'left' or 'right'..."

if(langdir=="de")hint = "...bei vielen Browsern können Sie diese\n Funktion übrigens auch mit den Cursor-\nPfeiltasten  'links' und 'rechts' bedienen..."

/* lassen wir mal weg, self.name wird jetzt für "mailSent" benötigt
if(!n4){
	if(window.name!=1&&window.name!=2){
	alert(hint)
	window.name = (window.name==2) ? 2 : 1
	}
}
*/

if(to==-1&&pnr!=0){
	(n4) ? document.arrow.document.images["arL"].src = arLi.src : document.images["arL"].src = arLi.src
}
if(to==1&&pnr!=0){
	(n4) ? document.arrow.document.images["arR"].src = arLi.src : document.images["arR"].src = arRe.src
}
	go = cyc+to
	if(go==0)go=(cycle.length-1); if(go==cycle.length)go=1
	this.location.href = "../"+langdir+"/"+cycle[go]+".php";
/**/
}

// ###################################### /

function mondo(bel){
	document.images["inhishands"].src = eval("mondo"+bel).src
}
// ###################################### /


function movx(mid,an){
	document.images["vid"+mid].src = eval("vid"+mid+an).src
}

// ###################################### /

function fchk2(){
	
	if(document.phorm2.company.value == "") {
		if(langdir=="de") al = "Bitte tragen Sie Ihren Firma ein"
		if(langdir=="en") al = "'Company' required"
		alert(al);
		document.phorm2.company.focus();
		return false;
	}

	if(document.phorm2.name.value == "") {
		if(langdir=="de") al = "Bitte tragen Sie Ihren Namen ein"
		if(langdir=="en") al = "'Name' required"
		alert(al);
		document.phorm2.name.focus();
		return false;
	}

	if(document.phorm2.addr.value == "") {
		if(langdir=="de") al = "Bitte tragen Sie Straße und Hausnummer ein"
		if(langdir=="en") al = "'Address' required"
		alert(al);
		document.phorm2.addr.focus();
		return false;
	}

	if(document.phorm2.land.value == "") {
		if(langdir=="de") al = "Bitte tragen Sie hier Ihr Land ein\nz.B. \"D\" für Deutschland"
		if(langdir=="en") al = "'Country' required"
		alert(al);
		document.phorm2.land.focus();
		return false;
	}

	if(document.phorm2.plz.value == "") {
		if(langdir=="de") al = "Bitte tragen Sie Ihre PLZ ein"
		if(langdir=="en") al = "'ZIP-code' required"
		alert(al);
		document.phorm2.plz.focus();
		return false;
	}
	

	if(document.phorm2.city.value == "") {
		if(langdir=="de") al = "Bitte tragen Sie Ihren Ortsnamen ein"
		if(langdir=="en") al = "'City' required"
		alert(al);
		document.phorm2.city.focus();
		return false;
	}
	
	if(document.phorm2.email.value == "") {
		if(langdir=="de") al = "Bitte tragen Sie Ihre E-Mail-Adresse ein"
		if(langdir=="en") al = "'e-mail' required"
		alert(al);
		document.phorm2.email.focus();
		return false;
	}
	if(document.phorm2.email.value.indexOf('@') == -1) {
		if(langdir=="de") al = "ungültige E-Mail"
		if(langdir=="en") al = "invalid e-mail-address"
		alert(al);
		document.phorm2.email.focus();
		return false;
	}
	if(document.phorm2.email.value.indexOf('.') == -1) {
		if(langdir=="de") al = "ungültige E-Mail"
		if(langdir=="en") al = "invalid e-mail-address"
		alert(al);
		document.phorm2.email.focus();
		return false;
	}
	if(document.phorm2.email.value.length < 8) {
		if(langdir=="de") al = "ungültige E-Mail"
		if(langdir=="en") al = "invalid e-mail-address"
		alert(al);
		document.phorm2.email.focus();
		return false;
	}

}

// ###################################### /

function fres(){
	if(document.phorm1)document.phorm1.reset()
	if(window.name=="2"){
		if(document.phorm2)document.phorm2.reset()
	}
}

// ###################################### /

cyc = 0

function ord(){
	var ibee = "c"+pnr+"-"+snr
	for(i=1;i<=cycle.length;i++){
		if(cycle[i]==ibee)cyc = i
	}
	// alert(cyc)
}

// ###################################### //

function pxx(id,st){
	document.images["P"+id].src = eval("P"+id+st).src
}

// ###################################### /

function wegmit(){
	if(ie4){
		document.all.upop.style.visibility = "hidden";
	}
	if(n6){
		document.getElementById("upop").style.visibility = "hidden";
	}
	if(n4){
		document.getElementById("upop").visibility = "hide";
	}
}

// ###################################### /

function clfrm(){
	if(document.neuForm && self.name == "mailSent"){
		this.location.href = self.location.href;
		document.neuForm.reset()
		self.name = "";
		window.status= self.name + " ... "
	}

}

// ################################### //
function zeiger(onoff, itm){
	if(onoff){
		if(dom){
			document.getElementById("nSt"+itm).style.visibility = "visible";
		} else if(ie4){
			document.all["nSt"+itm].style.visibility = "visible";
		} else {
			void(null);
		}
	} else {;
		if(dom){
			document.getElementById("nSt"+itm).style.visibility = "hidden";
		} else if(ie4){
			document.all["nSt"+itm].style.visibility = "hidden";
		} else {
			void(null);
		}			
	}
}




// ###################################### //