/* ======================================= */
/* === Rahmenfunktion für die Webseite === */
/* ======================================= */

    function ZweiFrames(URL1,F1,URL2,F2)
     {
      parent.frames[F1].location.href=URL1;
      parent.frames[F2].location.href=URL2;
     }
    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;
     }


/* ======================== */
/* === Menüsteuerung v2 === */
/* ======================== */

	function startmenu() {
  	{menu0.style.display = "none"; btnUnternehmen.src="http://pics.wecogroup.com/layout/menu/en/menu_unternehmen_off.gif"};
  	{menu1.style.display = "none"; btnService.src="http://pics.wecogroup.com/layout/menu/en/menu_service_off.gif"};
  	{menu2.style.display = "none"; btnProdukte.src="http://pics.wecogroup.com/layout/menu/en/menu_produkte_off.gif"};
  	{menu3.style.display = "none"; btnAnwendungen.src="http://pics.wecogroup.com/layout/menu/en/menu_anwendungen_off.gif"};
		}

	function menu0func (divID,imgID) {
		if (divID.style.display == "none")
			{
  		startmenu();
  		divID.style.display = "block";
			imgID.src="http://pics.wecogroup.com/layout/menu/en/menu_unternehmen_red_off.gif";
			}
		else
			{
  		startmenu();
	  	}
	  }


	function menu1func (divID,imgID) {
		if (divID.style.display == "none")
			{
  		startmenu();
  		divID.style.display = "block";
			imgID.src="http://pics.wecogroup.com/layout/menu/en/menu_service_red_off.gif"
			}
		else
			{
  		startmenu();
			}
	  }


	function menu2func (divID,imgID) {
		if (divID.style.display == "none")
			{
  		startmenu();
  		divID.style.display = "block";
			imgID.src="http://pics.wecogroup.com/layout/menu/en/menu_produkte_red_off.gif"
			}
		else
			{
  		startmenu();
			}
	  }


	function menu3func (divID,imgID) {
		if (divID.style.display == "none")
			{
  		startmenu();
  		divID.style.display = "block";
			imgID.src="http://pics.wecogroup.com/layout/menu/en/menu_anwendungen_red_off.gif"
			}
		else
			{
  		startmenu();
			}
	  }




/* ================== */
/* === Bild-PopUp === */
/* ================== */

function ViewImage(bildurl,b,h,bildtitel){
	var eigenschaft,sbreite,shoehe,fenster,b,h;
		// stellt die Bildschirmabmessungen fest
		var ns6 = (!document.all && document.getElementById);
		var ie4 = (document.all);
		var ns4 = (document.layers);
	if(ns6||ns4)
		{
		sbreite = innerWidth;
		shoehe = innerHeight;
		}
	else if(ie4)
		{
		sbreite = document.body.clientWidth;
		shoehe = document.body.clientHeight;
		}

	x = (sbreite-b)/2;
	y = (shoehe-h)/2;
	eigenschaften="left="+x+",top="+y+",screenX="+x+",screenY="+y+",width="+b+",height="+h+",menubar=no,toolbar=no";
	fenster=window.open("","",eigenschaften);
	fenster.focus();
	fenster.document.open();
	with (fenster)
		{
	  document.write('<html><head>');
	  document.write("<script type='text/javascript' language='JavaScript'>");
	  document.write("function click() { window.close(); } ");  // bei click  schliessen
	  document.write("document.onmousedown=click ");
	  document.write("</script>");
	  document.write('<title>'+ bildtitel +'</title></head>');
	  // Zeile geändert Aug 2003 (Dreamweaver machte Probleme)
	  document.write('<' + 'body onblur="window.close();" ');// bei Focusverlust schliessen
	  document.write('marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">');
	  document.write('<center>');
	  document.write('<img src="'+ bildurl +'"border="0">');
	  document.write('</center>');
	  document.write('</body></html>');
	  fenster.document.close();
		}
}


/* ====================== */
/* === ABCDE-Rollover === */
/* ====================== */

	imgOff = new Image();
	imgOff.src = 'http://pics.wecogroup.com/produkte/abcde_blank.jpg';

	/* Grafiken für ABCDE-Menü */
	img1On = new Image();
	img1On.src = 'http://pics.wecogroup.com/produkte/abcde_a.jpg';
	img2On = new Image();
	img2On.src = 'http://pics.wecogroup.com/produkte/abcde_b.jpg';
	img3On = new Image();
	img3On.src = 'http://pics.wecogroup.com/produkte/abcde_c.jpg';
	img4On = new Image();
	img4On.src = 'http://pics.wecogroup.com/produkte/abcde_d.jpg';
	img5On = new Image();
	img5On.src = 'http://pics.wecogroup.com/produkte/abcde_e.jpg';
	img6On = new Image();
	img6On.src = 'http://pics.wecogroup.com/produkte/abcde_zul.jpg';


/* =============================== */
/* === Popup: Neues Webfenster === */
/* =============================== */

function openWin (URL,TARGET,OPT) {
	window.onerror=null;window.open(URL,TARGET,OPT);
	}


/* ====================== */
/* === Dropdown-Liste === */
/* ====================== */

function QuickJump(Formular) {
	var Element = Formular.Ziel.selectedIndex;
	var Frameziel = Formular.Ziel.options[Element].frameziel;
 
	if (Formular.Ziel.options[Element].value != 0) {
		if(frameziel = "extern") {
			window.open(Formular.Ziel.options[Element].value);
        	}
        	else {
			location = Formular.Ziel.options[Element].value;
		}
	}
}


/* ============================ */
/* === Focus in Eingabefeld === */
/* ============================ */

function setzeCurser() {
	if (document.forms.length > 0) {
	var field = document.forms[0];
	for (i = 0; i < field.length; i++) {
	if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
	document.forms[0].elements[i].focus();
	break;
	 }
      }
   }
}
