Template:Peking2012 CSS

From 2012.igem.org

(Difference between revisions)
m
m
Line 500: Line 500:
   </li>
   </li>
   <li>
   <li>
-
     <a id="PKU_banner_Team" onmouseover="ButtonMouseOver(this);ShowSubmenuTeam();" onmouseout="ButtonMouseOut(this);HideSubmenuTeam();" href="/Team:Peking/Team">
+
     <a id="PKU_banner_Team" onmouseover="ButtonMouseOver(this);ShowSubmenuTeam();" onmouseout="ButtonMouseOut(this);WithdrawSubmenuTeam();" href="/Team:Peking/Team">
     <img class="show" src="/wiki/images/0/0b/Peking2012_BannerMenu_Team.png" alt="Team" />
     <img class="show" src="/wiki/images/0/0b/Peking2012_BannerMenu_Team.png" alt="Team" />
     <img class="show" src="/wiki/images/3/34/Peking2012_BannerMenuH_Team.png" alt="Team" />
     <img class="show" src="/wiki/images/3/34/Peking2012_BannerMenuH_Team.png" alt="Team" />
Line 506: Line 506:
   </li>
   </li>
   <li>
   <li>
-
     <a id="PKU_banner_Project" onmouseover="ButtonMouseOver(this);ShowSubmenuProject();" onmouseout="ButtonMouseOut(this);HideSubmenuProject();" href="/Team:Peking/Project">
+
     <a id="PKU_banner_Project" onmouseover="ButtonMouseOver(this);ShowSubmenuProject();" onmouseout="ButtonMouseOut(this);WithdrawSubmenuProject();" href="/Team:Peking/Project">
     <img class="show" src="/wiki/images/2/2c/Peking2012_BannerMenu_Project.png" alt="Project" />
     <img class="show" src="/wiki/images/2/2c/Peking2012_BannerMenu_Project.png" alt="Project" />
     <img class="show" src="/wiki/images/3/34/Peking2012_BannerMenuH_Project.png" alt="Project" />
     <img class="show" src="/wiki/images/3/34/Peking2012_BannerMenuH_Project.png" alt="Project" />
Line 518: Line 518:
   </li>
   </li>
   <li>
   <li>
-
     <a id="PKU_banner_Modeling" onmouseover="ButtonMouseOver(this);ShowSubmenuModeling();" onmouseout="ButtonMouseOut(this);HideSubmenuModeling();" href="/Team:Peking/Modeling">
+
     <a id="PKU_banner_Modeling" onmouseover="ButtonMouseOver(this);ShowSubmenuModeling();" onmouseout="ButtonMouseOut(this);WithdrawSubmenuModeling();" href="/Team:Peking/Modeling">
     <img class="show" src="/wiki/images/9/97/Peking2012_BannerMenu_Modeling.png" alt="Modeling" />
     <img class="show" src="/wiki/images/9/97/Peking2012_BannerMenu_Modeling.png" alt="Modeling" />
     <img class="show" src="/wiki/images/b/ba/Peking2012_BannerMenuH_Modeling.png" alt="Modeling" />
     <img class="show" src="/wiki/images/b/ba/Peking2012_BannerMenuH_Modeling.png" alt="Modeling" />
Line 524: Line 524:
   </li>
   </li>
   <li>
   <li>
-
     <a id="PKU_banner_HumanPractice" onmouseover="ButtonMouseOver(this);ShowSubmenuHumanPractice();" onmouseout="ButtonMouseOut(this);HideSubmenuHumanPractice();" href="/Team:Peking/HumanPractice">
+
     <a id="PKU_banner_HumanPractice" onmouseover="ButtonMouseOver(this);ShowSubmenuHumanPractice();" onmouseout="ButtonMouseOut(this);WithdrawSubmenuHumanPractice();" href="/Team:Peking/HumanPractice">
     <img class="show" src="/wiki/images/9/93/Peking2012_BannerMenu_HumanPractice.png" alt="HumanPractice" />
     <img class="show" src="/wiki/images/9/93/Peking2012_BannerMenu_HumanPractice.png" alt="HumanPractice" />
     <img class="show" src="/wiki/images/5/54/Peking2012_BannerMenuH_HumanPractice.png" alt="HumanPractice" />
     <img class="show" src="/wiki/images/5/54/Peking2012_BannerMenuH_HumanPractice.png" alt="HumanPractice" />
Line 541: Line 541:
  </div>
  </div>
  <div>
  <div>
-
   <ul id="PKU_banner_Team_submenu" class="PKU_banner_submenu" onmouseover="SubmenuIsMouseOver = 1;">
+
   <ul id="PKU_banner_Team_submenu" class="PKU_banner_submenu" onmouseover="HoldSubmenuTeam();" onmouseout="WithdrawSubmenuTeam();" >
   <li class="border">
   <li class="border">
     <img src="" alt="|" >
     <img src="" alt="|" >
Line 573: Line 573:
   </li>
   </li>
   </ul>
   </ul>
-
   <ul id="PKU_banner_Project_submenu" class="PKU_banner_submenu" onmouseover="SubmenuIsMouseOver = 1;">
+
   <ul id="PKU_banner_Project_submenu" class="PKU_banner_submenu" onmouseover="HoldSubmenuProject();" onmouseout="WithdrawSubmenuProject();" >
   <li class="border">
   <li class="border">
     <img src="" alt="|" >
     <img src="" alt="|" >
Line 605: Line 605:
   </li>
   </li>
   </ul>
   </ul>
-
   <ul id="PKU_banner_Modeling_submenu" class="PKU_banner_submenu" onmouseover="SubmenuIsMouseOver = 1;">
+
   <ul id="PKU_banner_Modeling_submenu" class="PKU_banner_submenu" onmouseover="HoldSubmenuModeling();" onmouseout="WithdrawSubmenuModeling();" >
   <li class="border">
   <li class="border">
     <img src="" alt="|" >
     <img src="" alt="|" >
Line 646: Line 646:
   </li>
   </li>
   </ul>
   </ul>
-
   <ul id="PKU_banner_HumanPractice_submenu" class="PKU_banner_submenu" onmouseover="SubmenuIsMouseOver = 1;" >
+
   <ul id="PKU_banner_HumanPractice_submenu" class="PKU_banner_submenu" onmouseover="HoldSubmenuHumanPractice();" onmouseout="WithdrawSubmenuHumanPractice();" >
   <li class="border">
   <li class="border">
     <img src="" alt="|" >
     <img src="" alt="|" >
Line 709: Line 709:
var SubmenuHeight_Des_HumanPractice = 0; //Destination
var SubmenuHeight_Des_HumanPractice = 0; //Destination
var SubmenuHeight_Cur_HumanPractice = 0; //Current Val
var SubmenuHeight_Cur_HumanPractice = 0; //Current Val
-
var SubmenuIsMouseOver = 0; //Is Mouse Over Submenu?
+
var handleSubmenu_Team = null; //Submenu Withdraw Handle
 +
var handleSubmenu_Project = null; //Submenu Withdraw Handle
 +
var handleSubmenu_Modeling = null; //Submenu Withdraw Handle
 +
var handleSubmenu_HumanPractice = null; //Submenu Withdraw Handle
function ShowSubmenuTeam()
function ShowSubmenuTeam()
{
{
   SubmenuHeight_Des_Team = 1;
   SubmenuHeight_Des_Team = 1;
-
  SubmenuIsMouseOver = 1;
 
   document.getElementById("PKU_banner_Team_submenu").style.zIndex = 2;
   document.getElementById("PKU_banner_Team_submenu").style.zIndex = 2;
 +
  SubmenuHeight_Des_Project = 0;
 +
  SubmenuHeight_Des_Modeling = 0;
 +
  SubmenuHeight_Des_HumanPractice = 0;
}
}
function HideSubmenuTeam()
function HideSubmenuTeam()
{
{
-
   if (SubmenuIsMouseOver == 0)
+
   SubmenuHeight_Des_Team = 0;
 +
  document.getElementById("PKU_banner_Team_submenu").style.zIndex = 1;
 +
  handleSubmenu_Team = null;
 +
}
 +
function WithdrawSubmenuTeam()
 +
{
 +
  handleSubmenu_Team = setTimeout("HideSubmenuTeam();",1000);
 +
}
 +
function HoldSubmenuTeam()
 +
{
 +
  if (handleSubmenu_Team)
   {
   {
-
     SubmenuHeight_Des_Team = 0;
+
     clearTimeout(handleSubmenu_Team);
-
     document.getElementById("PKU_banner_Team_submenu").style.zIndex = 1;
+
     handleSubmenu_Team = null;
   }
   }
}
}
 +
function ShowSubmenuProject()
function ShowSubmenuProject()
{
{
   SubmenuHeight_Des_Project = 1;
   SubmenuHeight_Des_Project = 1;
   document.getElementById("PKU_banner_Project_submenu").style.zIndex = 2;
   document.getElementById("PKU_banner_Project_submenu").style.zIndex = 2;
 +
  SubmenuHeight_Des_Project = 0;
 +
  SubmenuHeight_Des_Modeling = 0;
 +
  SubmenuHeight_Des_HumanPractice = 0;
}
}
function HideSubmenuProject()
function HideSubmenuProject()
{
{
-
   if (SubmenuIsMouseOver == 0)
+
   SubmenuHeight_Des_Project = 0;
 +
  document.getElementById("PKU_banner_Project_submenu").style.zIndex = 1;
 +
  handleSubmenu_Project = null;
 +
}
 +
function WithdrawSubmenuProject()
 +
{
 +
  handleSubmenu_Project = setTimeout("HideSubmenuProject();",1000);
 +
}
 +
function HoldSubmenuProject()
 +
{
 +
  if (handleSubmenu_Project)
   {
   {
-
     SubmenuHeight_Des_Project = 0;
+
     clearTimeout(handleSubmenu_Project);
-
     document.getElementById("PKU_banner_Project_submenu").style.zIndex = 1;
+
     handleSubmenu_Project = null;
   }
   }
}
}
 +
function ShowSubmenuModeling()
function ShowSubmenuModeling()
{
{
   SubmenuHeight_Des_Modeling = 1;
   SubmenuHeight_Des_Modeling = 1;
   document.getElementById("PKU_banner_Modeling_submenu").style.zIndex = 2;
   document.getElementById("PKU_banner_Modeling_submenu").style.zIndex = 2;
 +
  SubmenuHeight_Des_Project = 0;
 +
  SubmenuHeight_Des_Modeling = 0;
 +
  SubmenuHeight_Des_HumanPractice = 0;
}
}
function HideSubmenuModeling()
function HideSubmenuModeling()
{
{
-
   if (SubmenuIsMouseOver == 0)
+
   SubmenuHeight_Des_Modeling = 0;
 +
  document.getElementById("PKU_banner_Modeling_submenu").style.zIndex = 1;
 +
  handleSubmenu_Modeling = null;
 +
}
 +
function WithdrawSubmenuModeling()
 +
{
 +
  handleSubmenu_Modeling = setTimeout("HideSubmenuModeling();",1000);
 +
}
 +
function HoldSubmenuModeling()
 +
{
 +
  if (handleSubmenu_Modeling)
   {
   {
-
     SubmenuHeight_Des_Modeling = 0;
+
     clearTimeout(handleSubmenu_Modeling);
-
     document.getElementById("PKU_banner_Modeling_submenu").style.zIndex = 1;
+
     handleSubmenu_Modeling = null;
   }
   }
}
}
 +
function ShowSubmenuHumanPractice()
function ShowSubmenuHumanPractice()
{
{
   SubmenuHeight_Des_HumanPractice = 1;
   SubmenuHeight_Des_HumanPractice = 1;
   document.getElementById("PKU_banner_HumanPractice_submenu").style.zIndex = 2;
   document.getElementById("PKU_banner_HumanPractice_submenu").style.zIndex = 2;
 +
  SubmenuHeight_Des_Project = 0;
 +
  SubmenuHeight_Des_Modeling = 0;
 +
  SubmenuHeight_Des_HumanPractice = 0;
}
}
function HideSubmenuHumanPractice()
function HideSubmenuHumanPractice()
{
{
-
   if (SubmenuIsMouseOver == 0)
+
   SubmenuHeight_Des_HumanPractice = 0;
 +
  document.getElementById("PKU_banner_HumanPractice_submenu").style.zIndex = 1;
 +
  handleSubmenu_HumanPractice = null;
 +
}
 +
function WithdrawSubmenuHumanPractice()
 +
{
 +
  handleSubmenu_HumanPractice = setTimeout("HideSubmenuHumanPractice();",1000);
 +
}
 +
function HoldSubmenuHumanPractice()
 +
{
 +
  if (handleSubmenu_HumanPractice)
   {
   {
-
     SubmenuHeight_Des_HumanPractice = 0;
+
     clearTimeout(handleSubmenu_HumanPractice);
-
     document.getElementById("PKU_banner_HumanPractice_submenu").style.zIndex = 1;
+
     handleSubmenu_HumanPractice = null;
   }
   }
}
}

Revision as of 01:52, 9 August 2012