/*************************************************************************************************
function:       fncPrintIt
description:    Crossbrowser drucken (IE4,NS4,IE5,IE5.5)
require:        
date:           2001-05-28 (TH)
***************************************************************************************************/
function fncPrintIt()
{	if(window.print) 
	{	window.print();
	}  
	else if(document.all)
	{	window.onerror=function(){return true};
		if(!document.WebBrowser1)
		{ var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
	 		document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
		}
	  WebBrowser1.ExecWB(6, 1);// 1=dialogbox 2 keine dialogbox  
		window.onerror=null;
	}
	else
	{ alert("Ihr Browser unterstützt diese Funktion nicht.");
	}
}

/******************************************************************************
 function 		: fncChange3Frames
 description	: aendert 3 Frames gleichzeitig
 date					: 2001-06-18 (SelfHtml)
*******************************************************************************/
function fncChange3Frames(URL1,F1,URL2,F2,URL3,F3)
{	if(URL1 || F1)
	{	parent.frames[F1].location.href=URL1;
	}
	if(URL2 || F2)
	{	parent.frames[F2].location.href=URL2;
	}
	if(URL3 || F3)
	{	parent.frames[F3].location.href=URL3;
	}
}

/*************************************************************************************************
function:       fncOpenDlgWnd
description:    öffnet ein Dialogfenster
								fncOpenDlgWnd(event,string url,string name,string height,string width,
								int top,int left,[string position])
								event->Systemvariable (nicht aendern!)
								Position->'relative' für relative (x,y)-Koordinaten abhängig vom eventObjekt
date:           2001-05-11 (c) webconsulting-hoppe
Browser:				IE4,IE5,IE5.5,NS4
***************************************************************************************************/
function fncOpenDlgWnd(event,url,name,height,width,y,x,pos,scrollbars)
{	if(pos=="relative")
	{	x=(event.screenX)+x;
		y=(event.screenY)+y;
	}
	return window.open(url,name,
	"top="+y+
	",screenY="+y+
	",left="+x+
	",screenX="+x+
	",width="+width+
	",height="+height+
	",toolbar=0,location=0,directories=0,status=0,menuBar=0"+
	",scrollBars="+scrollbars+
	",resizable=0");
}

/*************************************************************************************************
function:       fncWndClose
description:    schliesst ein Fenster
								fncWndClose(string Objektname des Fensters)
date:           2001-05-11 (TH)
Browser:				IE4,IE5,IE5.5,NS4
***************************************************************************************************/
var wnd;
function fncWndClose(wndobj_name)
{	window.onerror=function(){return true};
	w=eval(wndobj_name);
	w.close();
	window.onerror=null;
}

/************************************************************************************************
function:       fncCmbSelItem
description:    gibt alle Angaben eines ausgewählten Eintrags aus einer Combobox als Array zurück
								Array fncCmbSelItem(form as STRING,feld as STRING)
								form->Formularname
								feld->Feldname
								Array["text"]=Text des selektierten Eintrags in der Combobox
								Array["value"]= Wert des selektierten Eintrags in der Combobox
								Array["index"]= Index des selektierten Eintrags in der Combobox
require:        none
date:           2000-08-27 (TH)
*************************************************************************************************/ 
function fncCmbSelItem(form,feld)
{ wert=new Array();
  for(i=0;i<document[form][feld].length;++i)
  { if(document[form][feld].options[i].selected == true)
	  { wert["text"]=document[form][feld].options[i].text;
 	    wert["value"]=document[form][feld].options[i].value;
      wert["index"]=i;
    }
	}
  return wert;		
}
