<html>
	<head>
		<title>$metadata.getApplication().getSheetName()</title>
		<link href="${application_static_path}/static/css/style.css"  rel="stylesheet" type="text/css"/>
        <link href="${application_static_path}/static/css/theme.css"  rel="stylesheet" type="text/css"/>
        <link rel="stylesheet" type="text/css" href="${application_static_path}/static/css/worktop-table.css"/>
        <link rel="stylesheet" type="text/css" href="${common_static_path}/common/css/jqueryslidemenu.css" />
        <script type="text/javascript" src="${common_static_path}/common/scripts/jquery.js"></script>
		<script>
            function toggle() {
				var ele = document.getElementById("toggleGoogleApps");
				var logins = document.getElementById("toggleOpenIdLogins");
				var text = document.getElementById("displayText");

				if(logins.style.visibility== "visible") {
			    		ele.style.display= "block";
			    		ele.style.visibility= "visible";
			    		logins.style.display= "none";
			    		logins.style.visibility= "hidden";
			  	}
				else if(ele.style.visibility=="visible") {
			    		logins.style.display= "block";
			    		logins.style.visibility= "visible";
			    		ele.style.display= "none";
			  	}
			}


			function goToPage()
			{
			    var base = "/_ah/login_required?openid=";
			    var extension = document.getElementById("company").value;
			    var forwardurl=document.getElementById("forwardUrl").value
			    var openid_url = encodeURIComponent("www.google.com/accounts/o8/site-xrds?hd="+extension)
			    window.location.href = base+openid_url+"&forward="+forwardurl;
			}

		</script>
	</head>

	<body height="100%" style="margin:0px; border:0px" class="openid_login">
		<table width=100% border=0 cellpadding=0 cellspacing=0 align=center   height="100%">
		<tr>
	       <td>
	            <!-- Title, Logo, Welcome text -->
	            <table cellpadding='0' cellspacing='0' width="100%" style="margin-bottom:-19px">
	            <tr >
	                <td valign="top">
	                	<table>
	                		<tr height="10px">
	                			<td>
	                			</td>
	                		</tr>
	                		<tr>
	                			 <td class="siteheader">
	                			 	$metadata.getApplication().getSheetName()
	                			 </td>
	                		</tr>
	               		</table>
	                </td>
	            </tr>
	            </table>
	        </td>
	    </tr>
        <tr>
            <td style="padding-top:20px">
                <img src="${application_static_path}/static/images/loginHeader.png"/>
            </td>
        </tr>
		<tr height="90%">
			<td>
				<table align="center">
						<tr>
							<td style="vertical-align:top;">
								<div  id="toggleOpenIdLogins" style="display: block; visibility:visible;">
									<table cellpadding="0" cellspacing="0">
											<tr height="40px" valign="top">
												<td class="siteheader" style="font-size:24px;" colspan="6" align="center">login</td>
											</tr>
											<tr>
                                                <td>
													<a href="/_ah/login_required?openid=www.google.com/accounts/o8/id&continue="+"${forwardUrl}">
														<img border="0" src="/static/images/live.png" onmouseover="this.src='/static/images/live_hover.png'" onmouseout="this.src='/static/images/live.png'">
                                                    </a>
												</td>
                                                <td valign="top">
													<img border="0" src="/static/images/separator.png">
												</td>
												<td>
													<a href="/_ah/login_required?openid=www.google.com/accounts/o8/id&continue="+"${forwardUrl}">
														<img border="0" src="/static/images/google.png" onmouseover="this.src='/static/images/google_hover.png'" onmouseout="this.src='/static/images/google.png'">
                                                    </a>
												</td>
                                                <td valign="top">
													<img border="0" src="/static/images/separator.png">
												</td>
												<td>
													<a href="/_ah/login_required?openid=www.yahoo.com&continue="+"${forwardUrl}"">
														<img border="0" src="/static/images/yahoo.png" onmouseover="this.src='/static/images/yahoo_hover.png'" onmouseout="this.src='/static/images/yahoo.png'">
													</a>
												</td>
											</tr>
									</table>
								</div>
							</td>
						</tr>
						<tr>
							<td style="vertical-align:top;">
								<div id="toggleGoogleApps" style="display: none;">
									<table border="0">
											<tr>
												<td colspan="2" class="Form_Label"> Sign In using Google Apps Account   </td>
											</tr>
											<tr>
												<td width="20%" class="Form_Label"> www. </td>
												<td>
													<input  style="width:0px;" id="forwardUrl" value="$forwardUrl" type="hidden">
													<input class="Form_Widget" style="width:229px;" id="company" value="" type="text">
												</td>
											</tr>
											<tr>
											<td colspan="2" align="right">
													<span class="round-cornered-button"><a style="text-decoration: none; color: white;" href="javascript:toggle();">&nbsp;&nbsp;Cancel&nbsp;&nbsp;</a></span>
												</td>
												<td colspan="2" align="right">
													<span class="round-cornered-button"><a style="text-decoration: none; color: white;" href="javascript:goToPage();">&nbsp;&nbsp;Go&nbsp;&nbsp;</a></span>
												</td>
											</tr>
									</table>
								</div>
							</td>
						</tr>
				</table>
			</td>
		</tr>
		<tr><td><br/></td></tr>
		<tr>
			<td height='1px'>
				#include source = $getFileContents($templatePath+"/footer.html")
			</td>
		</tr>
	</table>
	</body>
</html>