function topnav_hm(pgname) {
	 
}

function header_hm(pgname)
{
	document.write("<table cellpadding='0' cellspacing='0' border='0' class='hdfc_logo'>")
	document.write("<tr>")
		document.write("<td class='logo' rowspan='3'><img src='common/images/nh_logo-hdfc.gif' alt='HDFC Home Loan'></td>")
				document.write("</tr>")
				
			document.write("</table>")
			
		document.write("</td>")
	document.write("</tr>")
	
/*	document.write("<tr>")
		document.write("<td valign='top'>")
			document.write("<table width='100%' cellpadding='0' cellspacing='0' border='0' class='main_nav'>")
			document.write("<tr>")
					document.write("<td valign='bottom' rowspan='2' align='left'><img src='images/header_shadow.gif' alt=''></td>")
				document.write("</tr>")
			document.write("</table>")
		document.write("</td>")
	document.write("</tr>")*/
/*	document.write("<tr><td height='17px'><img src='images/header_shadow.gif' alt=''></td></tr>")
	document.write("<tr>")*/
		document.write("<td>")
			document.write("<table cellpadding='0' cellspacing='0' border='0' align='center' class='main_nav topNavTabs2'>")
				document.write("<tr valign='middle'>")
				if(pgname=='home_loans')
				{
					document.write("<td width='109' class='selected'><a href='../loans/home-loan.asp'><img src='common/images/top_nav_bullet1.gif' border='0' width='0' height='8'>Home Loans</a></td>")
				}
				else
				{
					document.write("<td width='109'><a href='../loans/home-loan.asp'>Home Loans</a></td>")
				}
				if(pgname=='home_loans_nri')
				{
					document.write("<td width='109' class='selected'><a href='../nri/home-loan-nri.asp'><img src='common/images/top_nav_bullet1.gif' border='0' width='0' height='8'>Home Loans for NRI</a></td>")
				}
				else
				{
					document.write("<td width='109'><a href='../nri/home-loan-nri.asp'>Home Loans<br>for NRI</a></td>")
				}
				if(pgname=='rural_developer')
				{
					document.write("<td width='109' class='selected'><a href='../rural/rural_housing_finance_features.asp'><img src='common/images/top_nav_bullet1.gif' border='0' width='0' height='8'>Rural Housing Finance</a></td>")
				}
				else
				{
					document.write("<td width='109'><a href='../rural/rural_housing_finance_features.asp'>Rural Housing Finance</a></td>")
				}
				if(pgname=='property_related')
				{
					document.write("<td width='109' class='selected'><a href='../services/loan_against_property.asp'><img src='common/images/top_nav_bullet1.gif' border='0' width='0' height='8'>Loan Against<br>Property</a></td>")
				}
				else
				{
					document.write("<td width='109'><a href='../services/loan_against_property.asp'>Loan Against<br>Property</a></td>")
				}
				if(pgname=='deposits')
				{
					document.write("<td width='109' class='selected'><a href='deposits/deposites_individuals.asp'><img src='common/images/top_nav_bullet1.gif' border='0' width='0' height='8'>Deposits</a></td>")
				}
				else
				{
					document.write("<td width='109'><a href='../deposits/deposites_individuals.asp'>Deposits</a></td>")
				}
				if(pgname=='corporate_governance')
				{
					document.write("<td class='bluebg_selected'><a href='../corporate_governance/cor_introduction.asp'><img src='common/images/top_nav_bullet1.gif' border='0' width='0' height='8'>Corporate Governance</a></td>")
				}
				else
				{
					document.write("<td class='bluebg_selected'><a href='../corporate_governance/cor_introduction.asp'>Corporate Governance</a></td>")
				}
				if(pgname=='investors')
				{
					document.write("<td width='83' class='bg_green_last'><a href='../investors/investors.asp'><img src='common/images/top_nav_bullet1.gif' border='0' width='0' height='8'>Investors</a></td>")
				}
				else
				{
					document.write("<td width='83' class='bg_green_last'><a href='../investors/investors.asp'>Investors</a></td>")
				}
				//document.write("<td><img src='common/images/seperator.gif' alt=''></td>")
				document.write("</tr>")
			document.write("</table>")
		document.write("</td>")
	document.write("</tr>")
	document.write("<tr><td height='10'></td></tr>")
	document.write("</table>")
}

var dropC = "0";
$(document).ready(function() {
    $("a").click(function() {

        if ($(this).attr("href").toLowerCase().indexOf(".asp") > 0 || $(this).attr("href").toLowerCase() == "http://www.hdfc.com") {
            dropC = 1;
        }
    });
});

$(window).unload(function() {
    if (dropC == "1") {
        dropC = "0";
    }
    else {
        if (checkCookie() == true) {
			//window.open("/applications/DropoutCapture/DropoutCapture.asp","Dropout","toolbar=no;scrollbars=yes;resizable=yes;");
			window.open("/applications/DropoutCapture/DropoutCapture.asp","Dropout","left=20,top=20,width=600,resizable=1,scrollbars=1,location=0,directories=0,menubar=0,status=0,toolbar=0");
            //var winpop = window.open("/applications/DropoutCapture/DropoutCapture.asp","Dropout","toolbar=no;scrollbars=yes;resizable=yes;");
			//var winpop = window.open("/applications/DropoutCapture/DropoutCapture.asp","Dropout","toolbar=no;");
			/*if (!winpop || winpop.closed) {
		        document.location.href = "/applications/DropoutCapture/DropoutCapture.asp"; target="_blank";
		    }*/
        }
    }
});

function getCookie(c_name) {
    var i, x, y, ARRcookies = document.cookie.split(";");
    for (i = 0; i < ARRcookies.length; i++) {
        x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
        y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
        x = x.replace(/^\s+|\s+$/g, "");
        if (x == c_name) {
            return unescape(y);
        }
    }
}

function checkCookie() {
    var check = getCookie("chkDropOut");
    if (check == null) {
        return true;
    }
    else {
        return false;
    }
}

