<!--



function Fenster(URLLink, Width, Height) {
  if (Width == null) Width = 540;
  if (Height == null) Height = 570;
  status = '';

  eigenschaften = "'width=" + eval(Width) + ",height=" + eval(Height) + ",scrollbars=yes,resizable=yes,menubar=no,toolbar=no,status=no'";
  win = window.open(URLLink, "PopUp", eval(eigenschaften));
  win.focus();
}




function close_window() {
    window.close();
}

function MM_showHideLayers() { //v3.0
  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_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  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); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//
//	DESCRIPTION:
//		javascripts function for BDU 
//
// PROGRAMMER: 
//		Taras Vasylkevych
// 		24.09.2001 Created initial version
//
function MoveSelectOption(par_form, par_selectElementFrom, par_selectElementTo,par_ErrorAlert)
//
//  this function delete selected in par_selectElementFrom option and add the option 
//	with the same data to par_selectElementTo for the form par_form
//  par_form - name of the form
//  par_selectElementFrom	- name of select element from which option deleted
//  par_selectElementTo	- name of select element from which option added
//
{
	if (document.forms[par_form].elements[par_selectElementFrom].selectedIndex != -1)
	{
		// create temp vars
		var tmp_SelectFrom = document.forms[par_form].elements[par_selectElementFrom];
		var tmp_SelectTo = document.forms[par_form].elements[par_selectElementTo];
		var tmp_selectedIndex = tmp_SelectFrom.selectedIndex;

		// create temp vars with data from selected option
		var tmp_OptionText = tmp_SelectFrom.options[tmp_selectedIndex].text;
		var tmp_OptionValue = tmp_SelectFrom.options[tmp_selectedIndex].value;

		// new option in par_selectElementTo select element is created
		tmp_SelectTo.options[tmp_SelectTo.length] = new Option(tmp_OptionText,tmp_OptionValue);

		// selected by user option in par_selectElementFrom select element is deleted
		tmp_SelectFrom.options[tmp_selectedIndex] = null;
		return true;
	}
	alert(par_ErrorAlert);
	return false;
}
//
//
//
function PageEditSbm(tObject)
//
// this function get as an argument array the sequence of Names 
//	(select element name, hidden field name)
//	then for every select element it form the list of value of all option for it 
//	and assign this list to hidden field
//
{
	// loop though sequence of couples (select element name, hidden field name)
	for (var i=1; i<arguments.length; i+=2) {      
		// create synonym to current select object
		var tmp_curSelect = eval ("tObject." + arguments[i]);
		// create synonym to current hidden object
		var tmp_hiddenField = eval ("tObject." + arguments[i+1]);
    //define the list to be empty to start with
    var tmp_EditorsList = "";
	//	loop through all options for current select element and add values of option to tmp_EditorsList
		for (var j=0; j< tmp_curSelect.length; j++) {      
			if (j == 0)
				tmp_EditorsList =  tmp_curSelect.options[j].value
			else
				tmp_EditorsList +=  "," + tmp_curSelect.options[j].value;
		}
		// assign created list to hidden object
		tmp_hiddenField.value = tmp_EditorsList;
	}
	return true;
}


function compareFields(tObject, s_input1, s_input2, s_ErrorAlert)
{
//
//  this function delete selected in par_selectElementFrom option and add the option 
//	with the same data to par_selectElementTo for the form par_form
//  par_form - name of the form
//  par_selectElementFrom	- name of select element from which option deleted
//  par_selectElementTo	- name of select element from which option added
//
	// create synonym to our 2 input files
	var ptr_input1 = eval ("tObject." + s_input1);
	var ptr_input2 = eval ("tObject." + s_input2);
  var b_ReturnValue = false;
  
  //compare the value of the 2 fields
  if( ptr_input1.value == ptr_input2.value)
  {
    b_ReturnValue = true;
  }
  else
  {
    //if we have a message to show, then how it
    if( s_ErrorAlert != "")
      alert( s_ErrorAlert );
  }
  
  return b_ReturnValue;
}
function DreiFrames(URL1,F1,URL2,F2,URL3,F3)
{
  parent.frames[F1].location.href=URL1;
  parent.frames[F2].location.href=URL2;
  parent.frames[F3].location.href=URL3;
}

function checkFormat(form,input,str) {

  myRe = /\W/;
  myArray = myRe.exec(str);  
  if (myArray)
  {
    return (false);
  }
  return (true);
}


//-->
