  function Fenster(strWindow,nbrHeight,nbrWidth) {
	popupwindow = window.open(strWindow, "Text", "dependent=no,screenX=30,screenY=320,toolbar=no,width="+(50+nbrWidth)+",height="+(50+nbrHeight)+",directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no")
    popupwindow.focus();

    }

  function FensterNoScroll(strWindow,nbrHeight,nbrWidth) {
	popupwindow = window.open(strWindow, "Text", "dependent=yes,screenX=30,screenY=320,toolbar=no,width="+(50+nbrWidth)+",height="+(50+nbrHeight)+",directories=no,status=no,scrollbars=no,resizable=yes,menubar=no")
    popupwindow.focus();
   }


  function NewFenster(strWindow,nbrHeight,nbrWidth) {
	Newpopupwindow = window.open(strWindow, "Text2", "dependent=yes,screenX=30,screenY=320,toolbar=no,width="+nbrWidth+",height="+nbrHeight+",directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no")
    Newpopupwindow.focus();

    }   

  function OpenWindow(strWindow,nbrHeight,nbrWidth) {
	popupwindow = window.open(strWindow, "Text", "dependent=no,screenX=30,screenY=320,toolbar=no,width="+nbrWidth+",height="+nbrHeight+",directories=yes,status=yes,scrollbars=yes,resizable=yes,menubar=yes")
    popupwindow.focus();

    }

function OpenNormalWindow(strWindow,nbrHeight,nbrWidth) {
	popupwindow = window.open(strWindow, "Text", "dependent=no,screenX=30,screenY=320,width="+nbrWidth+",height="+nbrHeight+",directories=yes,status=yes,scrollbars=yes,resizable=yes,menubar=yes")
    popupwindow.focus();

    }

function OpenNormalNoResizeWindow(strWindow,nbrHeight,nbrWidth) {
	popupwindow = window.open(strWindow, "Text","width="+nbrWidth+",height="+nbrHeight+",,scrollbars=no,toolbar=yes,menubar=yes,location=yes,status=yes,directories=yes,resizable=no")
    popupwindow.focus();

    }
 
    
var validateInput = new Array;

function validate(form){
var status = true;
for (var i=0; i < form.length; i++) {
	if (validateInput[form.elements[i].name]) {
		if (!validateInput[form.elements[i].name].pattern.test(Trim(form.elements[i].value))) {
			document.getElementById("msg_" + form.elements[i].name).innerHTML = validateInput[form.elements[i].name].error;
			document.getElementById("msg_" + form.elements[i].name).style.display = "block";
			form.elements[i].className = form.elements[i].className + " error";
			status = false;
		} else {
			var cls = form.elements[i].className;
			if(cls.indexOf('error') > 0) {
				cls = cls.substring(0, cls.indexOf(' error'));
			}
			form.elements[i].className = cls;
			document.getElementById("msg_" + form.elements[i].name).style.display = "none";
		}
	}
}
return status;
}

function Trim(strValue){
return LTrim(RTrim(strValue));
}

function LTrim(strValue){
var LTRIMrgExp = /^\s*/;
return strValue.replace(LTRIMrgExp, '');
}

function RTrim(strValue){
var RTRIMrgExp = /\s*$/;
return strValue.replace(RTRIMrgExp, '');
}


var min=8;
var max=36;
function increaseFontSize() {
   var p = document.getElementsByTagName('*');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
   
   
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('*');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}


function resizeText(multiplier) {
  if (document.body.style.fontSize == "") {
    document.body.style.fontSize = "1.0em";
  }
  document.body.style.fontSize = parseFloat(document.body.style.fontSize) + (multiplier * 0.2) + "em";
}
