//////////////////////////////////////////////////////////////// Submenus /////////////////////////////////////////////////////////////////

var curSubMenu = null;

function showSubmenu(id)
{
  submenu = document.getElementById('m'+id);
  for(i=1;i<=10;i++)
  {
    if(i==id)
	{
      try{
	    //hideSubmenu();
	    submenu.style.display="block";
		curSubMenu = submenu;
	  }
	  catch(e)
	  {
	  
	  }
    } 
    else {
	  try{
      document.getElementById('m'+i).style.display="none";
	  }
	  catch(e)
	  {
	  
	  }
    }
  }
}



function hideSubmenu(id)
{
  //submenu = document.getElementById('m'+id);
  //submenu.style.display="none";
  if (curSubMenu != null)
  {
    curSubMenu.style.display="none";
	//alert(submenu.id);
  }
  //submenu.style.display="none";
  /*
  for(i=1;i<=10;i++)
  {
	  try
	  {
        document.getElementById('m'+i).style.display="none";
	  }
	  catch(e)
	  {
	  
	  }//try
  }//for
  */
}

/*
	<script language="JavaScript">
	   function moveKrypto()
	   {
	       KryptoWindow.visible = false;
		   try
		   {
		     w = screen.width/100;
		     h = screen.height/100;
			 
		   }
		   catch(e) {
		     w = 20;
			 h = 20;
		   } 	 
		   //KryptoWindow.moveTo(5*w,5*h);
		   
		   KryptoWindow.moveTo(document.parentWindow.screenLeft+2*w, document.parentWindow.screenTop+2*h);
		   KryptoWindow.visible = true;
		   KryptoWindow.focus();
		   return true;
	   } 
	   
	   function showKrypto(miniHTML)
	   {
	      
		 
	       try
		   {
		     w = screen.width/100;
		     h = screen.height/100;
			 
		   }
		   catch(e) {
		     w = 20;
			 h = 20;
		   } 	 
	     
		
		 //wLeft = window.document.parentWindow.screenLeft+2*w;
		 //wTop = window.document.parentWindow.screenTop+2*h; 
	     wLeft = 0;
		 wTop = 0; 
		  //alert(miniHTML); 
		 try
		 {
	       if (KryptoWindow.closed)
		   {
		     KryptoWindow = window.open("MiniKrypto.html", "KryptoWindow", "height=550,width=450,menubar=no,toolbar=no,resizable=no,status=no,scrollbars=no,left=" + String(wLeft) + ",top=" + String(wTop)+"\"");         
			 //KryptoWindow.visible = false;
			 //moveKrypto();
		   }
		   else {
		     //alert("visible");
		     //KryptoWindow.visible = true;
			 KryptoWindow.focus();
		   }
		 }  
		 catch(e) {
		   //alert("KryptoWindow finns inte.");
		   KryptoWindow = window.open("MiniKrypto.html", "KryptoWindow", "height=550,width=450,menubar=no,toolbar=no,resizable=no,status=no,scrollbars=no,left=" + String(wLeft) + ",top=" + String(wTop)+"\"");
		   //KryptoWindow.visible = false;
		   //moveKrypto();
		 }
		 return true;
	   }
	   
	   function killKrypto()
	   {
	     try {
	       KryptoWindow.close();
		 }
		 catch(e) {
		   //alert("Kunde inte stänga kryptokryss-rutan.");
		 } 
		 return true; 
	   }
	</script>
*/