<!--
function checkNum(str) 
{
for (var i=0; i<str.length; i++) {
var ch = str.substring(i, i + 1)
if ((ch!="." && ch!="+" && ch!="-" && ch!="e" && ch!="E" && (ch < "0" || ch > "9")) || (str == '')) {
	alert('<%=stxt("Please enter a valid number.")%>');
	return false
	}
}
return true
}
	
function open_internerlink_nw(url,w,h)
	{
	l = Math.round(screen.width/2)-Math.round(w/2);
	t = Math.round(screen.height/2)-Math.round(h/2);
	window.open(url,'','left='+l+',top='+t+',dependent=no,width='+w+',height='+h+',scrollbars=yes,status=no,toolbar=no,menubar=no');
	}

function changeimg(bildname,dateiname)
	{
//	alert(document.images[bildname]);
	document.images[bildname].src=dateiname;
	}

function showpic(id,picture,width,height)
	{
	if (parseInt(width) > 2)
		{
		width  = parseInt(width) + 50;
		height = parseInt(height) + 50;
		}
	else
		{
		width	= 980;
		height	= 680;
		}
	window.open('/file/'+id+'_'+picture,'cmspicture'+id,'width='+(width)+',height='+(height)+',scrollbars=yes');
	}
	
function fhigh(id1, style1)
    {
	   document.getElementsByName(id1)[0].className = style1;
	}

function imghigh(id1, style1)
    {
	   document.getElementsByName(id1).className = style1;
	}


// onresize for ns4
var origWidth, origHeight;
if (document.layers) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

var cur_lyr;	// holds id of currently visible layer
function swapLayers(id) {
  if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "visible";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "hidden";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}

//user defined scripts for frenzelit following below

// The code is copyright (c) 1996 by Sergey Gershtein
// If you want to use in on your website, contact me at sg@ur.ru first
// This code is NOT public domain

function CAPACITY() {
	this.mCubic_meter=1e+3
	this.mHectoliter=100
	this.mDecaliter=10
	this.mLiter=1
	this.mMilliliter=1e-3
	this.mCubic_centimeter=1e-3
	this.mCubic_millimeter=1e-6
        this.uslAcre_foot=1.23349E+6
	this.uslCubic_yard=0.765e+3
	this.uslBarrel=1.192405e+2
	this.uslCubic_foot=28.3169
	this.uslGallon=3.785
	this.uslCubic_inch=0.0163871
	this.uslQuart=0.946
	this.uslPint=0.473
	this.uslGill=118.294e-3
	this.uslFluid_ounce=29.573e-3
	this.uslFluid_dram=3.697e-3
	this.uslMinim=0.061610e-3
	this.usdCubic_yard=0.765e+3
	this.usdBarrel=1.192405e+2
	this.usdBushel=0.036e+3
	this.usdCubic_foot=0.028e+3
	this.usdPeck=0.0091e+3
	this.usdGallon=4.546
	this.usdCubic_inch=0.0163871
	this.usdQuart=1.136
	this.usdPint=568.26e-3
	this.usdGill=142.066e-3
	this.usdDry_ounce=28.412e-3
	this.usdDry_dram=3.5516e-3
	this.usdMinim=0.059194e-3
	this.biBushel=0.036e+3
	this.biPeck=0.0091e+3
	this.biGallon=4.546
	this.biQuart=1.136
	this.biPint=568.26e-3
	this.biGill=142.066e-3
	this.biMinim=0.059194e-3
	this.rlVedro=12.3
	this.rlShtoff=1.54
	this.rlQuart=1.23
	this.rlVine_bottle=0.77
	this.rlVodka_bottle=0.624
	this.rlCharka=0.123
	this.rlShkalik=0.0615
	this.rdChetverik=26.238
	this.rdVedro=12.3
	this.rdGarnetz=3.2798
	this.cCup=0.25
	this.cTable_spoon=0.015
	this.cTea_spoon=0.005
}

data_volumen = new CAPACITY();

function AREA() {
	this.mSquare_kilometer=1e+6
	this.mHectare=1e+4
	this.mAre=100
	this.mSquare_meter=1
	this.mSquare_centimeter=1e-4
	this.mSquare_millimeter=1e-6
	this.bSquare_mile=2.590e+6
	this.bAcre=4046.86
	this.bRood=1011.68
	this.bSquare_rod=25.293
	this.bSquare_yard=0.836
	this.bSquare_foot=0.093
	this.bSquare_inch=6.452e-4
}

data_flaeche = new AREA();

function PRESSURE() {
	this.mPascal=1
	this.mMilibar=100
	this.mKilopascal=1000
	this.mBar	=1e+5
	this.yMilimeter=133.321957
	this.yCentimeter=1333.21957
	this.yInch=3386.37526
	this.oAtmosphere=101325.027
	this.oAta=100000
	this.oPound_per_square_foot=47.8813
	this.opsi=6894.74483
}

data_druck = new PRESSURE();

function LENGTH() {
	this.mKilometer=1000
	this.mMeter=1
	this.mDecimeter=0.1
	this.mCentimeter=0.01
	this.mMillimeter=1e-3
	this.baLeague=4.8279e+3
	this.baMile=1.6093e+3
	this.baFurlong=201.168
	this.baChain=20.1168
	this.baRod=5.0292	
	this.baYard=0.9144
	this.baFoot=0.3048
	this.baInch=0.0254
	this.nCircle=4.00032e+7
	this.nSea_league=5.556e+3
	this.nDegree=1.1112e+5
	this.nSea_mile=1.852e+3
	this.nCable=185.313
	this.nFanthom=1.8288
	this.rVerst=1.0668e+3
	this.rKosaya_sazhen=2.48
	this.rSazhen=2.1333
	this.rSea_sazhen=1.8288
	this.rMakhovaya_sazhen=1.76
	this.rArshin=0.7112
	this.rEll=0.40
	this.rFoot=0.30479
	this.rInch=0.0253995
	this.rVershok=44.45e-3
	this.aParsec=3.086e+16
	this.aLight_year=9.458e+15
	this.aAstronomical_unit=1.496134e+11
	this.aLight_minute=1.799e+10
	this.aLight_second=299896943
	this.tPica=4.2175e-03
	this.tPoint=3.515e-04
}

data_abmessungen = new LENGTH();


function normalize(what,digits) {
	var str=""+what;
	var pp=Math.max(str.lastIndexOf("+"),str.lastIndexOf("-"));
	var idot=str.indexOf(".");
	if (idot>=1) {
		var ee=(pp>0)?str.substring(pp-1,str.length):"";
		digits+=idot;
		if (digits>=str.length)
			return str;
		if (pp>0 && digits>=pp)
			digits-=pp;
		var c=eval(str.charAt(digits));
		var ipos=digits-1;
		if (c>=5) {
			while (str.charAt(ipos)=="9") ipos--;
			if (str.charAt(ipos)==".") {
				var nc=eval(str.substring(0,idot))+1;
				if (nc==10 && ee.length>0) {
					nc=1;
					ee="e"+(eval(ee.substring(1,ee.length))+1);
				}
				return ""+nc+ee;
			}
			return str.substring(0,ipos)+(eval(str.charAt(ipos))+1)+ee;
		} else
			var ret=str.substring(0,digits)+ee;
			for (var i=0; i<ret.length; i++)
				if (ret.charAt(i)>"0" && ret.charAt(i)<="9")
					return ret;
			return str;
	 }
	 return str;
}

function compute(obj,val,data) {
	if (obj[val].value) {
		var uval=0;
		uval = obj[val].value*data[val];
		for (var i in data)
		 if (obj[i]) obj[i].value=normalize(uval/data[i],8);
	}
}

function compute_abmessungen(obj,val) {
	compute(obj,val,data_abmessungen)
}

function compute_volumen(obj,val) {
	compute(obj,val,data_volumen)
}

function compute_flaeche(obj,val) {
	compute(obj,val,data_flaeche)
}

function compute_druck(obj,val) {
	compute(obj,val,data_druck)
}

//F = (C * 9/5) + 32
//C = (F - 32) * 5/9
//http://www.me-systeme.de/calculate/temp.html

function compute_temp(value)
{
 document.forms[0].Celsius.value = parseInt(value);
 document.forms[0].Fahrenheit.value = (parseInt(value)*9/5)+32;
 document.forms[0].Kelvin.value = parseInt(value)+273.15;

}

function compute_fahrenheit(value)
{
 document.forms[0].Celsius.value = (parseInt(value)-32)*5/9;
 document.forms[0].Fahrenheit.value = parseInt(value);
 document.forms[0].Kelvin.value = 5/9 * (parseInt(value) + 459.67);

}


function compute_kelvin(value)
{
 document.forms[0].Celsius.value = parseInt(value)-273.15;
 document.forms[0].Fahrenheit.value = (parseInt(value)-(5/9*459.67))/(5/9);
 document.forms[0].Kelvin.value = parseInt(value);

}

//function checkNum() is defined in site.pccms due to needed language text

//marcomedia layer stuff

function MM_showHideLayers()
 {
  var i,p,v,obj,args = MM_showHideLayers.arguments;

  for (i=0; i < (args.length-2); i += 3)
   {
    if ((obj = MM_findObj(args[i])) != null)
     {
      v = args[i+2];
      if (obj.style)
       {
        obj = obj.style;
        v = (v == 'show') ? 'visible' : (v = 'hide') ? 'hidden' : v;
       }
      obj.visibility = v;
     }
   }
 }

function MM_findObj(n, d)
 { // v4.01
  var p,i,x;

  if (!d)
   {
    d = document;
   }
  if ((p = n.indexOf("?")) > 0 && parent.frames.length)
   {
    d = parent.frames[n.substring(p+1)].document;
    n = n.substring(0,p);
   }
  if (!(x = d[n]) && d.all)
   {
    x = d.all[n];
   }
  for (i=0; !x && i < d.forms.length; ++i)
   {
    x = d.forms[i][n];
   }
  for (i=0; !x && d.layers && i < d.layers.length; ++i)
   {
    x = MM_findObj(n,d.layers[i].document);
   }
  if (!x && d.getElementById)
   {
    x = d.getElementById(n);
   }
  return(x);
 }

//-->
