var switchtype;
var onmenugo=0;	// currently in use


/*@cc_on @*/

function go_menu(switchtype) 
 {
 d=document;
 parent.Move_Leftmenu('right');
 onmenutgo=1;
 var this_href;
 switch(switchtype)
  {
  case 'main':
   this_href = "/s7u.php?link=leftmenu&action=main&left_menu=1&popup=1";
   break;

  case 'shortcut':
   set_inner_container("leftmenu","/s7u.php?link=leftmenu&action=shortcut&left_menu=1&popup=1",'','');
   break;
  
  case 'mytools':
   set_inner_container("leftmenu","/s7u.php?link=leftmenu&action=mytools&left_menu=1&popup=1",'','');
   break;
  
  case 'communitytools':
   set_inner_container("leftmenu","/s7u.php?link=leftmenu&action=communitytools&left_menu=1&popup=1",'','');
   break;

  case 'config':
   set_inner_container("leftmenu","/s7u.php?link=leftmenu&action=config&left_menu=1&popup=1",'','');
   break;
  
  case 'bilder':
   set_inner_container("leftmenu","/s7u.php?link=leftmenu&action=bilder&left_menu=1&popup=1",'','');
   break;
  }
 if(this_href)
  {
  parent.document.getElementById('leftmenu').src=this_href;
  }
 // xmlhttp.onreadystatechange=RSchange;
 //  xmlhttp.send(null);
 }


function go_container(href,vars,method,containername)
 {
 d=document;
 //alert("Href: "+href+"\nVars:"+vars+"\nmethod:"+method+"\ncontainername"+containername);
 if (typeof(containername)=='undefined')
  { 
  containername = 'main_container';
  }

 var ori=href;
 var regex = /[?]/g;
 var Ergebnis = href.search(regex);
 if (Ergebnis > -1)
  href=href+"&amp;container=1";
 else
  href=href+"?container=1";
//  window.alert(href+'   '+Ergebnis+'  '+ori);
//  document.getElementById('main_container').innerHTML='Lade '+href
//  xmlhttp.open("GET",href,true);
//  xmlhttp.onreadystatechange=ContainerChange
//  xmlhttp.send(null)
  try
   {   set_inner_container(containername,href,vars,method);      }
  catch(e)
   {   alert("Fehler bei go_container");     }
 }

function AppendFooter(container_name)
 {
 xmlhttp = getXMLHandler();
 xmlhttp.open("GET","footer.php",true);
 xmlhttp.onreadystate=function()
  {
  if (xmlhttp.readyState==4)
   {
   alert(xmlhttp.responseText);
   }
  }
 xmlhttp.send(null); 
 }

function go_test()
 {
 parent.document.getElementById('container').style.height=parent.document.body.clientHeight-200;
 alert(parent.document.getElementById('main_container').style.height+" "+parent.document.body.clientHeight);
 }
 

