function pageloc()
{
	//alert(document.location.href);
	document.form1.pagelocation.value=document.location.href;
	document.form1.submit();

}

function setwbparam()
{
	document.getElementById('WT.oss').value = document.form1.searchtext.value;
}

function nri_bk_1()
{
//NRI Services Tabs for Level 1 files
document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign='top' bgcolor='#ECECEC'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign='top' bgcolor='#FFFFFF' colspan='10'><img src='/common/images/1ptrans.gif' width='2' height='14' alt=''></td></tr><tr><td width='26' align='right'><img src='/common/images/bullet_9.gif' width='6' height='9' hspace='6' alt=''></td><td width='105'><a href='/personal/default.htm' class='txt_bd'>Personal Banking</a></td><td bgcolor='#030751' width='22'><img src='/common/images/topnav/tab_bluelt.gif' width='22' height='23' alt=''></td><td bgcolor='#030751' width='16'><img src='/common/images/bullet_8.gif' width='9' height='6' hspace='5' alt=''></td><td bgcolor='#030751' width='90' class='txt_wbd'>NRI Banking</td><td bgcolor='#030751' width='22'><img src='/common/images/topnav/tab_bluert.gif' width='22' height='23' alt=''></td><td width='16'><img src='/common/images/bullet_9.gif' width='6' height='9' hspace='5' alt=''></td><td width='125'><a href='/wholesale/default.htm' class='txt_bd'>Wholesale Banking</a></td><td width='10'></td><td align='left'><font color='#2B308C'><a href='javascript:abc()' class='lnk'><font color='#2B308C'>Always bring me directly to NRI Banking</font></a></font></td></tr></table></td><td valign='top' width='200' align='right'><table width='100%' border='0' cellspacing='0' cellpadding='0'><form name='form1' method='get' action='/hdfcbank/search.aspx'> <tr> <td valign='top' width='22' align='left'><img src='/images/tab_grey.gif' width='19' height='35' alt=''></td> <td width='130'> <input name='searchtext' size='18' class='txt' value='Search this website' onkeyup='setwbparam_h()' onfocus='javascript: document.form1.searchtext.select();'> <input type='hidden' name='pagelocation'> <input type='hidden' name='check'> <input type='hidden' name='siteloc' > <input type='hidden' name='WT.oss' id='WT.oss'> <input type='hidden' name='searchtag' id='searchtag'> </td> <td align='left'><input type='image' src='/images/btn_go.gif' width='24' height='18' border='0' alt='GO'></td> </tr> </form></table></td></tr></table></td></tr></table>");
}
function nri_bk_2()
{
//NRI Services Tabs for Level 2 files
document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign='top' bgcolor='#ECECEC'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td valign='top' bgcolor='#FFFFFF' colspan='8'><img src='/common/images/1ptrans.gif' width='2' height='14' alt=''></td></tr><tr><td width='26' align='right'><img src='/common/images/bullet_9.gif' width='6' height='9' hspace='6' alt=''></td><td width='105'><a href='/personal/default.htm' class='txt_bd'>Personal Banking</a></td><td bgcolor='#030751' width='22'><img src='/common/images/topnav/tab_bluelt.gif' width='22' height='23' alt=''></td><td bgcolor='#030751' width='16'><img src='/common/images/bullet_8.gif' width='9' height='6' hspace='5' alt=''></td><td bgcolor='#030751' width='90' class='txt_wbd'><a href='/nri/default.htm' class='txt_wbd'>NRI Banking</a></td><td bgcolor='#030751' width='22'><img src='/common/images/topnav/tab_bluert.gif' width='22' height='23' alt=''></td><td width='16'><img src='/common/images/bullet_9.gif' width='6' height='9' hspace='5' alt=''></td><td><a href='/wholesale/default.htm' class='txt_bd'>Wholesale Banking</a></td></tr></table></td><td valign='top' width='200' align='right'><table width='100%' border='0' cellspacing='0' cellpadding='0'><form name='form1' method='get' action='/hdfcbank/search.aspx'> <tr> <td valign='top' width='22' align='left'><img src='/images/tab_grey.gif' width='19' height='35' alt=''></td> <td width='130'> <input name='searchtext' size='18' class='txt' value='Search this website' onkeyup='setwbparam_h()' onfocus='javascript: document.form1.searchtext.select();'> <input type='hidden' name='pagelocation'> <input type='hidden' name='check'> <input type='hidden' name='siteloc' > <input type='hidden' name='WT.oss' id='WT.oss'> <input type='hidden' name='searchtag' id='searchtag'> </td> <td align='left'><input type='image' src='/images/btn_go.gif' width='24' height='18' border='0' alt='GO'></td> </tr> </form></table></td></tr></table></td></tr></table>");
}

function abc()
	{
			var date = new Date();
			date.setTime(date.getTime()+(10000*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
			lnk=document.location.href.split("/")
			ref="/"+lnk[3]+"/"+lnk[4]
			document.cookie="defaultpage"+"="+ref+expires+"; path=/";
			alert("On your next visit to hdfcbank.com, you will see this page first.")
	}
	
function eraseCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
