<style type="text/css">
/* places the content ontop of the background image */
#content {position:relative; z-index:1; width:100%;}
</style>
<!--[if IE 6]>
<style type="text/css">
/* some css fixes for IE browsers */
html {overflow-y:hidden;}
body {overflow-y:auto;}
#bg {position:absolute; z-index:-1;}
#content {position:static;}
</style>
<![endif]-->
<link href="<?=HTTP_SERVER;?>include/styles.css" rel="stylesheet" type="text/css" media="all">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>

<script type="text/javascript">
$(document).ready(function(){
	$("#stateId").change(function(){
		var stateId = $("#stateId").val();
		$("#cityDiv").html("<img src='images/loader.gif' align='absmiddle'/>");
		$.ajax({url:"include/cities.php?stateId="+stateId, success:function(result){ $("#cityDiv").html(result);}, error:function($resulte){ alert("error")} });
	});	
	
	$("#stateId2").change(function(){
		var stateId = $("#stateId2").val();
		$("#cityDiv2").html("<img src='images/loader.gif' align='absmiddle'/>");
		$.ajax({url:"include/cities.php?stateId="+stateId, success:function(result){ $("#cityDiv2").html(result);}, error:function($resulte){ alert("error")} });
	});	
	
	$("#newfrm").validate();
	
	$("#invitefrm").validate();
	
	$(".checkavail").click(function(){
		var username = $("#username").val();
		$("#checkavailDiv").html("<img src='images/loader.gif' align='absmiddle'/>");
		$.ajax({url:"checkavailusername.php?username="+username, success:function(result){ $("#checkavailDiv").html(result);}, error:function($resulte){ alert("error occured")} });
	});	
	
});

function searchformval(){
	if($("#bloodgroup").val() == ""){
		alert("Please select bloodgroup.")
		$("#bloodgroup").focus();
		return false;
	}
}

function loginval(){
	if($("#donorusername").val() == ""){
		alert("Please enter username.")
		$("#donorusername").focus();
		return false;
	}
	if($("#ipassword").val() == ""){
		alert("Please enter password.")
		$("#ipassword").focus();
		return false;
	}
}

</script>
</head>

<body>
<table style="margin:0 auto; width:980px" border="0">
<tr>
	<td width="230"><a href="index.php"><img src="<?=HTTP_IMAGES;?>logo.png" border="0"/></a></td>
	<td style="vertical-align:bottom;padding-bottom:5px;">A social initiative of Maa Vaishno Devi Seva Samiti(Bihar)</td>
	<td width="240" style="text-align:right">
	<? if(isset($_SESSION['uid']) && ($_SESSION['uid'])){ 
		?><a href="login.php">My Account</a> | <a href="logout.php">logout</a> <?
		}else{
	?>
		<form action="login.php" method="post" onSubmit="return loginval();">
		<table>
		<tr>
			<td>Donor Login:</td><td><input type="text" name="donorusername" id="donorusername" class="textbox"/></td>
		</tr>
		<tr>
			<td>Password:</td><td><input type="password" name="ipassword" id="ipassword" class="textbox"/></td>
		</tr>
		<tr>
			<td colspan="2" align="right"><a href="">Forgot Password?</a>&nbsp;&nbsp; <input type="image" src="<?=HTTP_IMAGES;?>login.png" value="Login" align="absmiddle"/></td>
		</tr>
		</table>
		</form>
	<? } ?>
	</td>
</tr>
</table>
<table style="margin:0 auto; width:980px; height:32px; border-spacing: 0px;" border="0">
<tr>
	<td style="background:url('<?=HTTP_IMAGES;?>topbannerred.png'); color:#ffffff; text-align:center;">
	<a href="registration.php" class="toplink">Free Register</a> | 
	<a href="invite-your-friends.php" class="toplink">Invite your friends</a> | 
	<a href="donors-speak.php" class="toplink">Donor's speak</a> | 
	<a href="blood-donation-eligibility.php" class="toplink">Blood Donation Eligibility</a> | 
	<a href="gallery.php" class="toplink">Gallery</a> | 
	<a href="blood-bank-numbers.php" class="toplink">Blood Bank Numbers</a> | 
	<a href="#" class="toplink">Media Center</a> | 
	<a href="contact-us.php" class="toplink">Contact us</a> 
	</td>
</tr>
</table>
<table style="margin:0 auto; width:980px; height:159px; border-spacing: 0px;" border="0">
<tr>
	<td style="background:url('<?=HTTP_IMAGES;?>topbannerblack.jpg');"></td>
</tr>
</table>
<form action="search.php" method="get" name="searchform" id="searchform" onSubmit="return searchformval()">
<table id="searchinputTable" style="margin:0 auto; margin-top:4px; width:980px; height:32px; background-color:#DA261D; color:#ffffff;">
<tr>
	<td>&nbsp;&nbsp;&nbsp;<b>Find a Donor</b></td>
	
	<td>Group</td>
	<td>
		<select name="bloodgroup" id="bloodgroup" value="" style="width:140px;" class="required">
		<option value="">Select
			<option value="O+" > O+
			<option value="O-" > O-
			<option value="B+" > B+
			<option value="B-" > B-	
			<option value="A+" > A+
			<option value="A-" > A-
			<option value="AB+" > AB+
			<option value="AB" > AB-
			<option value="A1+" > A1+
			<option value="A1-" > A1-
			<option value="A2+" > A2+
			<option value="A2-" > A2-
			<option value="A1B+" > A1B+
			<option value="A1B-" > A1B-
			<option value="A2B+" > A2B+
			<option value="A2B-" > A2B-
		</select>
	</td>
	<td>State</td>
	<td width="160"><? include "include/states.php"; ?></td>
	<td>City</td>
	<td width="160"><? include "include/cities.php";?></td>
	<td>Area</td>
	<td width="160"><select name="town" class="reginput"><option value="">--Select Area---</option><option value="all">All</option></select></td>
	<td><input type="image" src="<?=HTTP_IMAGES;?>search.png" align="absmiddle"/>&nbsp;&nbsp;&nbsp;</td>
</tr>
</table>
</form>