<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="shortcut.aspx.cs" Inherits="MYAPP.General.shortcut" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml10-transitional.dtd">
<html lang="zh-cn" xml:lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/theme/2/style.css">
<link rel="stylesheet" type="text/css" href="/theme/2/shortcut.css">
<script>
function openURL(URL)
{
  	 parent.main.location=URL;
}

function winexe(NAME,PROG)
{
   URL="/general/winexe?PROG="+PROG+"&NAME="+NAME;
   window.open(URL,"winexe","height=100,width=350,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=0,left=0,resizable=no");
}

function re_login()
{
	msg="Are you sure to logout？";
  if(window.confirm(msg))
     parent.parent.location="/manage/logout.aspx";
}

var view_flag1=1;
function my_menu_view1(id)
{
	var el=document.getElementById(id);
	if(view_flag1==1)
	{
     parent.parent.document.getElementById("frame1").rows="0,*,20";
      el.className="call_down";
  }
	else
	{
		 parent.parent.document.getElementById("frame1").rows="50,*,20";
      el.className="call_up";
  }

  view_flag1=1-view_flag1;
}

var view_flag2=1;
function my_menu_view2(id)
{
	var el=document.getElementById(id);
	if(view_flag2==1)
	{
      parent.parent.document.getElementById("frame2").cols="0,*";
      el.className="call_right";
   }
   else
	{
      parent.parent.document.getElementById("frame2").cols="200,*";
      el.className="call_left";
   }

  view_flag2=1-view_flag2;
}
function startmarquee()
{
   var t,p=true,movepixel=1;
   var tb=document.getElementById("NAV");
   var o=document.getElementById("Nav_div");
   var m=document.getElementById("menu_tb");
   var r=document.getElementById("NavRight");
   var lineHeight=o.scrollHeight/m.rows.length;
   if(m.rows.length>1)
   {
      tb.onmouseover=function(){r.style.display="";}
      tb.onmouseout =function(){r.style.display="none";}
      r.onmouseover=function(){r.src="/images/nav_r2.gif";}
      r.onmouseout =function(){r.src="/images/nav_r1.gif";}
      p=false;
   }
   //r.onclick=function(){if(p) return; movepixel=1; t=setInterval(scroll_up,10); p=true;}
   document.body.onmousewheel=function(){if(p) return; if(event.wheelDelta>0) movepixel=-1; else movepixel=1; t=setInterval(scroll_up,10); p=true;}

   function scroll_up()
   {
      o.scrollTop+=movepixel;
      if(movepixel>0)
      {
         if(o.scrollTop % (lineHeight) == lineHeight-1)
         {
            clearInterval(t);
            p=false;
         }
         if(o.scrollTop>=lineHeight*(m.rows.length-1))
         {
            clearInterval(t);
            o.scrollTop=0;
            p=false;
         }
      }
      else
      {
         if(o.scrollTop % (lineHeight) == 1)
         {
            clearInterval(t);
            p=false;
         }
         if(o.scrollTop-1<0)
         {
            clearInterval(t);
            o.scrollTop=lineHeight*(m.rows.length-1);
            p=false;
         }
      }
   }
}
</script>
</head>
<body onload="startmarquee();" scroll="no">
<table id="NAV" border="0" cellspacing="0" cellpadding="0" class="small" width="100%">
  <tr height="30">
    <td nowrap width="18" valign="top"><div onclick="my_menu_view2('arrow2')" title="SHow/Hide" id="arrow2" class="call_left" style="cursor:pointer"/></td>
    <td nowrap><div id="Nav_div">
        <table id="menu_tb" class="small" border="0" cellspacing="0" cellpadding="0">
          <tr height="30">
            <td><ul>
                <asp:Repeater ID="rp_board" runat="server">
                  <ItemTemplate>
                    <li><a onclick="javascript:view_flag2=2;my_menu_view2('arrow2');view_flag2=1;top.mainFrame.leftmenu.menu.location='menu.aspx?Board_ID=<%#XPath("@id")%>';"><span><img src="<%#COE.Components.MyFun.ReplaceNullString(XPath("@icon").ToString().Trim(),"Board/101/BI_IconUrl.gif")%>" width="16" height="16"/> <%#XPath("@name")%></span></a></li>
                  </ItemTemplate>
                </asp:Repeater>
              </ul></td>
          </tr>
        </table>
      </div></td>
    <td width="60" align="center" valign="middle" nowrap><a href="javascript:top.openWindow('/manage/MY/Change_Password.aspx', '320', '120', 'Modify Password','no');">更改密码</a></td>
    <td width="120" align="right" valign="middle" nowrap><a href="javascript:re_login();"><img src="/images/login.gif" border="0" align="absmiddle"> 退出登录</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <div onclick="my_menu_view1('arrow1')" id="arrow1" class="call_up" alt="Show/Hide style="cursor:pointer"/></td>
  </tr>
</table>
</body>
</html>
