<%@ Import Namespace="System.Web"%>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="edu.jhu.Cas.Util" %>
<%@ Import Namespace="edu.jhu.Cas" %>
<%@ Page language="c#" Codebehind="top.aspx.cs" AutoEventWireup="false" Inherits="edu.jhu.Cas.Web.Top" %>
<LINK href="styles.css" rel="stylesheet"></LINK>

<div id="div_title">
	<table background="img/new_home_bktile.jpg" cellpadding="0" cellspacing="0" border="0" width="100%" height="73">
		<tr height="73">
            <td height="73" width="800">
                <a href="http://www.sdss.org">
                    <img class="imgnoborder" border="0" src="img/sdss_logo_73.gif" width="50"></a></td>
            <td style="text-align:left;">
                <img src="img/titlebar.jpg" width="750" height="73"></td>
            <td height="73" width="100%">
            </td>
        </tr>
	</table>
</div>
<div id="div_nav">
	<table border="0" cellpadding="0" cellspacing="0" width="100%" height="25">
		<tr height="1" bgcolor="#000000">
			<td height="1" colspan="20" bgcolor="#000000"><img src="../img/new_1px_trans.gif" width="100%" height="1"></td>
		<tr bgcolor="#ffffff">
		<tr height="23" bgcolor="#313131" bgcolor="#000000">
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<td nowrap class="<%=GetMenuClass(MENU.HOME)%>" align="center" width="60"><a class="navlink" target="_parent" href="default.aspx">Home</a></td>
			<td width="1" bgcolor="#000000">
				<img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
	
			<td nowrap class="<%=GetMenuClass(MENU.GUIDE)%>" align="center" width="55">
				<a class="navlink" target="_parent" href="Guide.aspx">Help</a></td>
			<!--<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<td nowrap class="<%=GetMenuClass(MENU.FAQ)%>" align="center" width="50">
				<a class="navlink" target="_parent" href="faq.aspx">FAQ</a></td>-->

			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<td nowrap width="60" class="<%=GetMenuClass(MENU.TOOLS)%>" align="center">
				<a class="navlink" target="_parent" href="casjobscl.aspx">Tools</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>

			<!--<td nowrap width="90" class="<%=GetMenuClass(MENU.CHANGELOG)%>" align="center">
				<a class="navlink" target="_parent" href="changelog.aspx">ChangeLog</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>-->
<td nowrap class="<%=GetMenuClass(MENU.QUERY)%>" align="center" width="60"><a class="navlink" target="_parent" href="SubmitJob.aspx">Query</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>		
	<%	if (Session["USER"] == null){ // not loggeg in %>
			<td nowrap width="100" class="<%=GetMenuClass(MENU.CREATE)%>" align="center">
				<a class="navlink" target="_parent" href="CreateAccount.aspx">Create Account</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<td class="<%=GetMenuClass(MENU.LOGIN)%>" nowrap width="60" align="center">
				<a class="navlink" target="_parent" href="login.aspx">Login</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>

			<% } else { %>
		
			<td nowrap width="60" class="<%=GetMenuClass(MENU.JOBS)%>" align="center">
				<a class="navlink" target="_parent" href="ViewJobs.aspx">History</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<td nowrap width="60" class="<%=GetMenuClass(MENU.MYDB)%>" align="center">
				<a class="navlink" target="_parent" href="MyDB.aspx">MyDB</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
<td nowrap width="60" class="<%=GetMenuClass(MENU.IMPORT)%>" align="center">
				<a class="navlink" target="_parent" href="TableImport.aspx">Import</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<td nowrap width="60" class="<%=GetMenuClass(MENU.GROUPS)%>" align="center">
				<a class="navlink" target="_parent" href="Groups.aspx">Groups</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<td nowrap width="60" class="<%=GetMenuClass(MENU.OUTPUT)%>" align="center">
				<a class="navlink" target="_parent" href="Output.aspx">Output</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<td nowrap width="60" class="<%=GetMenuClass(MENU.PROFILE)%>" align="center">
				<a class="navlink" target="_parent" href="ChangeDetails.aspx">Profile</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<%if(admin){%>
			<td nowrap width="60" class="<%=GetMenuClass(MENU.ADMIN)%>" align="center">
				<a class="navlink" target="_parent" href="admin.aspx">Admin</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<%}else {%>
			<td nowrap width="60" class="<%=GetMenuClass(MENU.QUEUE)%>" align="center">
				<a class="navlink" target="_parent" href="admin.aspx">Queues</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<%}%>
			<td nowrap width="70" class="<%=GetMenuClass(MENU.LOGOUT)%>" align="center">
				<a class="navlink" target="_parent" href="logout.aspx">Logout</a></td>
			<td width="1" bgcolor="#000000"><img width="1" src="img/new_1px_trans.gif" height="1" height="23" /></td>
			<%} %>
			<td width="*">&nbsp;</td>
			<td nowrap width="100" class="navlink" align="center">
				<div class="menulink">
					<%= Session["userid"] == null ? " Not Logged in ": Session["userid"] %>
				</div>
			</td>
		</tr>
	</table>
</div>
