
function changeBG(){
	var div;
	alert("test");
	div = document.getElementById('main_unten');
	div.style.setAttribute("background-image", "url('../images/index/bg_main_trans.png')", false);
	//div.innerHTML="HUHU";
	alert(div);
}

function expandMenuItem(strMenuId){
	collapseAllMenuItems();
	//alert(strMenuId);
	div = document.getElementById(strMenuId);
	//alert(div);
	div.style.visibility = 'visible';
	
	div.style.height = '44px';
	
}

function expandMenuItemIE6(strMenuId){
	collapseAllMenuItemsIE6();
	//alert(strMenuId);
	div = document.getElementById(strMenuId);
	//alert(strMenuId);
	
	
	if(strMenuId=='nagygmbh'){
	div.innerHTML='&nbsp;&nbsp;<a  class=\"navi_link\" href=\"?page=nagygmbh&sub=vorstellung\"> >Vorstellung</a><br>'
		+'&nbsp;&nbsp;<a  class=\"navi_link\" href=\"?page=nagygmbh&sub=team\"> >Das Team</a><br>';
	}
	else if (strMenuId=='refs'){
		div.innerHTML='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a  class=\"navi_link\" href=\"?page=refs&sub=kunden\"> >Kunden</a><br>'
					   +'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a  class=\"navi_link\" href=\"?page=refs&sub=projektbilder\"> >Projektbilder</a><br>';
	}
	else if (strMenuId=='ungarn'){
		div.innerHTML='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a  class=\"navi_link\" href=\"?page=ungarn&sub=vorstellung\"> >Vorstellung</a><br>'
					  +'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a  class=\"navi_link\" href=\"?page=ungarn&sub=projektbilder\"> >Projektbilder</a><br>';
			
	}
	div.style.visibility = 'visible';
	
	div.style.height = '44px';

}

function collapseMenuItem(strMenuId){
	collapseAllMenuItems();
	//alert(strMenuId);
	div = document.getElementById(strMenuId);
	//alert(div);
	div.style.visibility = 'hidden';
	
	div.style.height = '0px';
	
}

function collapseMenuItemIE6(strMenuId){
	collapseAllMenuItemsIE6();
	//alert(strMenuId);
	div = document.getElementById(strMenuId);
	//alert(div);
	div.style.visibility = 'hidden';
	div.innerHTML='';
	
	div.style.height = '0px';
	
}

function collapseAllMenuItems(){
	//alert(strMenuId);
	div = document.getElementById('nagygmbh');
	div.style.visibility = 'hidden';
	div.style.height = '0px';
	div = document.getElementById('refs');
	div.style.visibility = 'hidden';
	div.style.height = '0px';
	div = document.getElementById('ungarn');
	div.style.visibility = 'hidden';
	div.style.height = '0px';
}

function collapseAllMenuItemsIE6(){
	//alert(strMenuId);
	div = document.getElementById('nagygmbh');
	
	div.innerHTML='';
	div.style.visibility = 'hidden';
	div.style.height = '0px';
	
	div = document.getElementById('refs');
	
	div.innerHTML='';
	div.style.visibility = 'hidden';
	div.style.height = '0px';
	
	div = document.getElementById('ungarn');
	
	div.innerHTML='';
	div.style.visibility = 'hidden';
	div.style.height = '0px';
	
}

function UnCryptMailto(s) {	
    var n=0;
    var r="";
    for(var i=0; i < s.length; i++) {
      n=s.charCodeAt(i);
      if (n>=8364) {n = 128;}
      r += String.fromCharCode(n-(5));
    }
    return r;
    }
    
    function linkTo_UnCryptMailto(s)	{	
      location.href=UnCryptMailto(s);
    }
    
    function CryptMailto(s) {	
    var n=0;
    var r="";
    for(var i=0; i < s.length; i++) {
      n=s.charCodeAt(i);
      if (n>=8364) {n = 128;}
      r += String.fromCharCode(n+(5));
    }
    window.status=r;
    return r;
    }
    
    function checkFormKontakt()
    {
    	
    	//document.writeln(document.mail.del.value);
    	//document.writeln(document.mail.del.value);
    	if(document.mail.anhang.value!="")
    	{
    		//document.writeln(document.mail.action.value);
    		return true;
    	}

    	if (document.mail.nameK.value=="") 
    	{
    		alert("Bitte Namen eingeben!");
    		document.mail.nameK.focus();
    		return false;
    	}
    	if (document.mail.betreffK.value=="") 
    	{
    		alert("Bitte Betreff eingeben!");
    		document.mail.betreffK.focus();
    		return false;
    	}
    	if (document.mail.adresseK.value=="") 
    	{
    		alert("Bitte E-Mail-Adresse eingeben!");
    		document.mail.adresseK.focus();
    		return false;
    	}
    	if (document.mail.textK.value=="") 
    	{
    		alert("Bitte Nachricht eingeben!");
    		document.mail.textK.focus();
    		return false;
    	}
    	if (document.mail.textK.value.length>300) 
    	{
    		alert("Nachricht zu lang!");
    		document.mail.textK.select();
    		return false;
    	}
    	if (document.mail.anliegen.value!="") 
    	{
    		return false;
    	}


    	else return true;

    }
    
  function sort(strSort, strDest){
	  document.select.sort.value=strSort;
	  document.select.dest.value=strDest;
	  document.select.submit();
  }


