<!--

/*
function click (e) {
  if (!e)
    e = window.event;
  if ((e.type && e.type == "contextmenu") || (e.button && e.button == 2) || (e.which && e.which == 3)) {
    if (window.opera)
      window.alert("Sorry: Diese Funktion ist deaktiviert.");
    return false;
  }
}
if (document.layers)
  document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = click;
document.oncontextmenu = click;
*/

function changePic(Min,Max,IntPage) {
	var randPicId = Math.floor(Math.random() * (Max - Min + 1)) + Min;
	//window.alert('Zufallsbild: ' + randPicId);
	//document.getElementById('titelpicImg').src = 'images/active/structureimagesTitelpic.php?IntPage=' + IntPage + '&Order=' + randPicId;
	document.getElementById('titelpicImg').src = 'images/active/structureimagesTitelpic.php?IntPage=' + IntPage + '&Order=' + phparray[randPicId]['order'];
	//blendimage('titelpic','titelpicImg','images/active/structureimagesTitelpic.php?Order=' + randPicId,300);
}	

function getYPosition() {	
	if (navigator.appName.indexOf("Explorer") != -1) {
		return document.documentElement.scrollTop;
	} else {
		return window.pageYOffset;
	}
}

function showTab(Ident) {
	document.getElementById('tabAnfrage'+Ident).style.display = 'block';
	document.getElementById('trAnfrage'+Ident).style.display  = 'block';
}
function showSub(Ident,Top) {
	document.getElementById('SubNavi'+Ident).style.display = 'block';
	document.getElementById('SubNavi'+Ident).style.top = Top+'px';
}
function hideSub(Ident) {
	document.getElementById('SubNavi'+Ident).style.display = 'none';
}
function showDiv(DIV,IMG) {
	document.getElementById(DIV).style.display = 'block';
	document.getElementById(IMG).focus();
}
function showDiv2(DIV) {
	
	document.getElementById(DIV).style.display = 'block';
	document.getElementById('fotogallerie').scrollLeft=0;
	//document.getElementById(IMG).focus();
}

function hideDiv(DIV) {
	document.getElementById(DIV).style.display = 'none';
	
	//document.getElementById(IMG).src = 'images/active/iEmpty.gif';
}

function hideBody(DIV) {
	document.getElementById(DIV).style.display = 'block';
}
function hideBody2() {
	document.getElementById('divBodyHide').src = 'http://10.0.0.170/record/current.jpg?rand='+Math.floor(Math.random()*1000000);
}
function showFoto(DIV,IMG,ID,WIDTH,URL) {
	if (WIDTH > 980) { WIDTH = 980; }
	var intTop =  (document.body.parentNode.scrollTop)+200;
	var intLeft = ((screen.availWidth-WIDTH)/2)-10;
	//var intLeft = ((980-WIDTH)/2)+0;
	document.getElementById(DIV).style.display = 'block';
	document.getElementById(DIV).style.top     = intTop+'px';
	document.getElementById(DIV).style.left    = intLeft+'px';
	document.getElementById(IMG).src = URL+ID;
}
function hideFoto(DIV,IMG) {
	document.getElementById(DIV).style.display = 'none';
	document.getElementById(IMG).src = 'images/active/iEmpty.gif';
}
function showImage(DIV,IMG,ID,WIDTH) {
	var intTop =  document.body.parentNode.scrollTop;
	var intLeft = ((screen.availWidth-WIDTH)/2);
	document.getElementById(DIV).style.display = 'block';
	document.getElementById(DIV).style.top     = intTop+'px';
	document.getElementById(DIV).style.left    = intLeft+'px';
	document.getElementById(IMG).src = 'images/active/structurecontentbig.php?Ident='+ID;
}
function PW_btnOver(Button) { //v1.00
	document.getElementById(Button+'N').style.display = 'none';
	document.getElementById(Button+'O').style.display = 'block';
}
function PW_btnOut(Button) { //v1.00
	document.getElementById(Button+'O').style.display = 'none';
	document.getElementById(Button+'N').style.display = 'block';
}
function PW_divBlock(Ident,Show) {
	if (Show) {
		document.getElementById('divBlock'+Ident+'S').style.display = 'none';
		document.getElementById('divBlock'+Ident+'H').style.display = 'block';
	} else {
		document.getElementById('divBlock'+Ident+'S').style.display = 'block';
		document.getElementById('divBlock'+Ident+'H').style.display = 'none';
	}
}
function PW_popWindow(URL,Width,Height) { //v1.00
	var intWidth,intHeight,intLeft,intTop;
	intWidth  = Width;
	intHeight = Height;
	intLeft   = (screen.width / 2) - (intWidth / 2);
	intTop    = (screen.height / 2) - (intHeight / 2);
	window.open(URL,'newWindow','scrollbars=yes,width='+intWidth+',height='+intHeight+',left='+intLeft+',top='+intTop);
}
function PW_fldClear(Field,Standard) {
	if (document.getElementById(Field).value==Standard) {
		document.getElementById(Field).value = '';
	}
}
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;
}
function MM_validateForm() { //v5.00
  var i,p,q,nt,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) {
		test=args[i+2];
		val=MM_findObj(args[i]);
    if (val) {
				nt = (args[i+1]=='' ? val.name : args[i+1]);
		if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); p1=val.indexOf('.');
        if ((p<1 || p==(val.length-1)) || (p1<1 || p1==(val.length-1))) errors+='- '+nt+' has to contain a valid adress!\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nt+' has to be numeric!\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nt+' has to contain a number from '+min+' to '+max+' !\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nt+' has to be filled in!\n'; }
  } if (errors) alert('Following errors occured:\n\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->