jQuery.noConflict();  

function szarchange(ctrl) {
if (ctrl)
	if (ctrl.value != -1) {
		location.href='/' + szlinks[ctrl.value];
	}
}

function szcatchange(ctrl, pid) {
	if (ctrl.value != -1)	location.href='/' + ctrl.value;
}

// this function is needed to work around
// a bug in IE related to element attributes
function hasClass(obj) {
   var result = false;
   if (obj.getAttributeNode("class") != null) {
       result = obj.getAttributeNode("class").value;
   }
   return result;
}

function stripe(id) {



  // if arguments are provided to specify the colours
  // of the even & odd rows, then use the them;
  // otherwise use the following defaults:
  var evenColor = arguments[1] ? arguments[1] : "#fff";
  var oddColor = arguments[2] ? arguments[2] : "#f3f7f8";

  // obtain a reference to the desired table
  // if no such table exists, abort
  //var table = document.getElementById(id);
  var tables = document.getElementsByTagName("table");
  if (! tables) { return; }

  for (var ix = 0; ix < tables.length; ix++) {
  	table = tables[ix];
  	// the flag we'll use to keep track of
	  // whether the current row is odd or even
	  var even = true;
  	if (table.className==id) {
	    // by definition, tables can have more than one tbody
	    // element, so we'll have to get the list of child
	    // &lt;tbody&gt;s
	    var tbodies = table.getElementsByTagName("tbody");

	    // and iterate through them...
	    for (var h = 0; h < tbodies.length; h++) {

	     // find all the &lt;tr&gt; elements...
	      var trs = tbodies[h].getElementsByTagName("tr");

	      // ... and iterate through them
	      for (var i = 0; i < trs.length; i++) {

	        // avoid rows that have a class attribute
	        // or backgroundColor style
	        if (! hasClass(trs[i]) &&
	            ! trs[i].style.backgroundColor) {

	          // get all the cells in this row...
	          var tds = trs[i].getElementsByTagName("td");

	          // and iterate through them...
	          for (var j = 0; j < tds.length; j++) {

	            var mytd = tds[j];

	            // avoid cells that have a class attribute
	            // or backgroundColor style
	            if (! hasClass(mytd) &&
	                ! mytd.style.backgroundColor) {

	              mytd.style.backgroundColor =
	                even ? evenColor : oddColor;

	            }
	          }
	        }
	        // flip from odd to even, or vice-versa
	        even =  ! even;
	      }
	    }
  	}
	}
}


function toggle_left_overlay(pid, show_overlay)
{
    var ul_id = "";

    switch(pid)
    {
        case "7":
            ul_id = "overlay_company";
        break;
        case "58":
            ul_id = "overlay_products";
        break;
        case "555":
            ul_id = "overlay_investor";
        break;
        case "4":
            ul_id = "overlay_press";
        break;
        case "1255":
            ul_id = "overlay_jobs";
        break;
        case "3":
            ul_id = "overlay_contact";
        break;
    }
		if (ul_id != "") {
	    if(show_overlay)
	    {
	        $('current').style.display = "none";
	        $(ul_id).style.display = "block";
	    }
	    else
	    {
	        $('current').style.display = "block";
	        $(ul_id).style.display = "none";
	    }
	  }
}


// Product Catalogue Main Menu

function hiLite(imgID, imageObj) {
// imgID - Name des auszutauschenden Bildes.
// imgObj- Pfad des Bildes mit dem ausgetauscht wird.
document.images[imgID].src = imageObj;
}

// Show Loginform
function showLogin() {
	document.getElementById('loginfrm_hidden').style.display = 'none';
	document.getElementById('loginfrm_form').style.display = 'block';
}


// Search Loading-Animation

function showSearchLoader() {
	var searchloader = document.getElementById('searching');
	searchloader.style.display = 'block';
	searching_div = document.getElementById('searching');
	searching_div.innerHTML = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="41" height="41" id="preloader" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="fileadmin/template/img/preloader.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="fileadmin/template/img/preloader.swf" quality="high" bgcolor="#ffffff" width="41" height="41" name="preloader" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
}
