function addLoadEvent(func) {
	
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

function loadMe(){
	
	var getBody = document.getElementsByTagName('body')[0];	
	var theOne = getBody.getAttribute('id');

	sIFR.replaceElement(named({sSelector:"div#content h1", sFlashSrc:"fileadmin/swf/tradegothic_25b.swf", sColor:"#337FBF", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));

	sIFR.replaceElement(named({sSelector:"div#content div.box_container div.boxes h2", sFlashSrc:"fileadmin/swf/tradegothic_20b.swf", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));

	sIFR.replaceElement(named({sSelector:"div#content span.kind_of", sFlashSrc:"fileadmin/swf/tradegothic_25.swf", sColor:"#337FBF", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));	
	
	sIFR.replaceElement(named({sSelector:"div#col_left h1", sFlashSrc:"fileadmin/swf/tradegothic_25.swf", sColor:"#ffffff",  sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));	
	
	sIFR.replaceElement(named({sSelector:"div#col_left h2", sFlashSrc:"fileadmin/swf/tradegothic_25.swf", sColor:"#ffffff", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));	
	
	sIFR.replaceElement(named({sSelector:"div#col_right h2", sFlashSrc:"fileadmin/swf/tradegothic_25.swf", sColor:"#ffffff",  sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));	

	sIFR.replaceElement(named({sSelector:"div#content h2.tradegothic", sFlashSrc:"fileadmin/swf/tradegothic_20b.swf", sColor:"#5A6A7D", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));	
		
	if (theOne == 'legion5'){
		sIFR.replaceElement(named({sSelector:"div#content h2", sFlashSrc:"fileadmin/swf/tradegothic_20b.swf", sColor:"#337FBF", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:-3, sFlashVars:"textalign=left&offsetTop=0"}));	
	
	}
	
	if ((theOne == 'legion9')||(theOne == 'legion33')){
		sIFR.replaceElement(named({sSelector:"div#content h2", sFlashSrc:"fileadmin/swf/tradegothic_25b.swf", sColor:"#347FC0", sWmode:"transparent",  nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));
	}

hier ();
/*	
	if (theOne == 'cam55'){
		var step1Code="<script type='text/javascript'>"+
			"$(document).ready(function(){"+
			"$('div#content fieldset.display_me').hide();"+
			"$('div#content h2.display_me').click(function(){"+
			"$(this).next('div#content fieldset.display_me').slideToggle('fast');"+
			"$(this).toggleClass('active');"+
			"return false;"+
			"});"+
			"});"+
			"</script>";
		
		document.getElementById("footer").innerHTML=step1Code;		
	}
		
*/
	
}
	
function displayMe(){
	document.getElementById('bookmarks').style.display= 'block';
	
	var schliessen = document.getElementById('schliessen');
	schliessen.getElementsByTagName("a")[0].onclick=function (){
		document.getElementById('bookmarks').style.display= 'none';
	}
}	

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
      }
		loadMe();
    }

function clearthiz(feld,  wert){

	    if (feld.value == wert){
	        feld.value="";
	        
	        thefield=feld.id;
	    }
	}
	
	function restorethiz(feld,  wert){

	    if (feld.value == "" || feld.value == " "){
	    
	        thefield=feld.id;
	        
	        feld.value=wert;
	    }
	}
	
function hier (){
	var suchen = document.getElementById("form")
	var getInput = document.getElementsByTagName('input')[0];	
	var theOne = getInput.getAttribute('id');	
	
	if 	(theOne == "searchfield"){
	document.getElementById("searchfield").setAttribute("value","Suche");}
	else {
	document.getElementById("searchfield-en").setAttribute("value","Search");	
	}
}	

         function popup(url)
         {
            //alert('Bildschirmauflösung: ' + screen.width + " x " + screen.height + "  " + screen.availWidth + " x " + screen.availHeight);
            var settings  = 'height=' + screen.availHeight;
            settings += ',width=' + screen.availWidth;
            settings += ',top=' + 0;
            settings += ',left=' + 0;
            settings += ',menubar=' + "yes";
            settings += ',toolbar=' + "yes";
            settings += ',location=' + "yes";
            settings += ',directories=' + "yes";
            settings += ',status=' + "no";
            settings += ',scrollbars=' + "yes";
            settings += ',resizable=' + "yes";
      
            win = window.open(url, "popup_callback", settings);
            win.focus()
         }

addLoadEvent(loadMe);
