function openwin(arg)
{
	if(arg=="")
	return;
	var a= window.open (arg,"","menubar=1,resizable=1,width=750,height=450");
 }

function printpg()
{
	var a=window.open('printpg.asp',"","scrollbars=yes,menubar=1,resizable=1,width=550,height=450");	
	//window.print();
}

function showTip(arg)
{
	if(arg=='1')
	{
			document.getElementById('msisdntip').style.display='block';
	}
	else if(arg=='0')
	{
			document.getElementById('msisdntip').style.display='none';
	}
	
	
}
function checkfrm()
{
	var f=document.getstat
	if(f.msisdn.value=='')
	{
		alert('Please enter your IVR_No');
		f.msisdn.focus();
		return false;
	}
	if(f.msisdn.value!='' && (isNaN(f.msisdn.value) ))
	{
		alert('Please enter a valid IVR_No');
		f.msisdn.focus();
		return false;
	}
}

function setFld(fld,val,flg)
{
if((fld.name=='Prof_Oth' && fld.readOnly==true) || (fld.name=='IVR_No' && fld.readOnly==true))
{return}
	if(flg=='fill')
	{
		if(fld.value==val)
		{
			fld.value='';
		}
	}
	if(flg=='clear')
	{
		if(fld.value=='')
		{
			fld.value=val;
		}
	}
}

/********************code for oscillating banner************************************
document.write('<div id="bandiv" style="display:none;position:absolute;z-index:1;margin-left:810px; border:1px solid #000; background-color:#ffffff; padding:5px" align="right" onMouseover="pauseResume();" onmouseout="pauseResume();">');
document.write('<table border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td style="font-family:Arial; font-size:9pt; color:#000000; font-weight:bold; text-align:center">Over 5000 scholarship&acute;s worth <br>Rs.1.5 crores</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td height="10"></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td style="font-family:Arial; font-size:10pt; color:#000000; font-weight:bold; text-align:center">Hurry! 15 day&acute;s to go...</td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');


var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;

var xPos = 20;
var yPos = document.body.clientHeight;
function changePos() {

	width = document.body.clientWidth;
	height = document.body.clientHeight;
	var bandiv=document.getElementById('bandiv');	
	bandiv.style.left = document.body.scrollLeft+'px';
	bandiv.style.top = yPos + document.body.scrollTop+'px';


if (yon) {
	yPos = yPos + step;
}
else {
	yPos = yPos - step;
}
if (yPos < 0) {
	yon = 1;
	yPos = 0;
}
if (yPos >= (height - Hoffset)) {
	yon = 0;
	yPos = (height - Hoffset);
}
if (xon) {
	xPos = xPos + step;
}
else {
	xPos = xPos - step;
}
if (xPos < 0) {
	xon = 1;
	xPos = 0;
}
if (xPos >= (width - Woffset)) {
	xon = 0;
	xPos = (width - Woffset);
   }
}
function start() {
	document.getElementById('bandiv').visibility = "visible";
	interval = setInterval('changePos()',delay);
}
function pauseResume() {
if(pause) {
	clearInterval(interval);
	pause = false;
}
else {
	interval = setInterval('changePos()',delay);
	pause = true;
   }
}



***********************code for oscillating banner ENDS********************************/


function rhs()
{

//Data = 'onfocus=if(this.value=="Mobile-Landline No.") this.value=""';
//Data += 'onblur=if(this.value=="Mobile-Landline No.") this.value=""';

document.write("<table width='210' border='0' align='left' cellpadding='0' cellspacing='0'>")
          document.write("<tr>")
            document.write("<td height='65'>&nbsp;</td>")
          document.write("</tr>")
          document.write("<tr>")
            document.write("<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>")
              document.write("<tr>")
                document.write("<td bgcolor='#e3e6da'><table width='210' border='0' align='center' cellpadding='0' cellspacing='0'>")
                  document.write("<tr>")
                    document.write("<td>&nbsp;</td>")
                  document.write("</tr>")
                  //document.write("<tr>")
                    //document.write("<td style='padding-left:10px'><a href='/meritus/online_test/login.asp' target='_blank'><img src='images/web_Banner.gif' alt=''/></a></td>")
                  //document.write("</tr>")
                  
                  //document.write("<tr>")
                    //document.write("<td height='3'><div id='msisdntip' class='msisdn_tooltip'><div class='bd'>Kindly enter the Registered Number</div><!--[if lte IE 6.5]><iframe></iframe><![endif]--></div></div></td>")
                  //document.write("</tr>")
                 // document.write("<tr>")
                  //  document.write("<td style='padding-left:10px'><table width='100%' border='0' cellspacing='0' cellpadding='0'>")
					//  document.write("<form method='post' name='getstat' action='process.asp?todo=getappstats' onsubmit='return checkfrm()'><tr>")

						//document.write("<td width='145'><input name='msisdn' ' onFocus='if(this.value==\"Mob/Tel\")this.value=\"\";showTip(\"1\")' onBlur='if(this.value==\"\") this.value=\"Mob/Tel\";showTip(\"0\")' onkeyup='showTip(\"0\")' type='text' Value='Mob/Tel' style='width:135px; border:1px solid #737373' maxlength='11' Value='Mob/Tel' class='txt_fld'></td>")

						//document.write("<td><input name='' type='image' src='images/go.gif'></td>")
					 // document.write("</tr></form>")
					//document.write("</table></td>")
                  //document.write("</tr>")
                  document.write("<tr>")
                    document.write("<td height='10'></td>")
                  document.write("</tr>")
                  document.write("<tr>")
                    document.write("<td style='padding-left:10px'><strong>Find your nearest branch</strong></td>")
                  document.write("</tr>")
                  document.write("<tr>")
                    document.write("<td height='3'></td>")
                  document.write("</tr>")
                  document.write("<tr>")
                    document.write("<td style='padding-left:10px'><select name='' class='txt_fld_big' onchange='openwin(this.value)' style='width:170px; border:1px solid #737373'>")
						document.write("<option value=''>Select</option>");
					document.write("<option value='/applications/locator/branch.asp'>Branch</option>");
					document.write("<option value='/applications/locator/atm.asp'>ATM</option>");
				   document.write("</select></td>");					
                  document.write("</tr>")
				  document.write("<tr>")
                    document.write("<td height='20'>&nbsp;</td>")
                  document.write("</tr>")
                document.write("</table></td>")
              document.write("</tr>")
            document.write("</table></td>")
          document.write("</tr>")
          document.write("<tr>")
            document.write("<td>&nbsp;</td>")
          document.write("</tr>")
          document.write("<tr>")
            document.write("<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>")
              document.write("<tr>")
                document.write("<td bgcolor='#e3e6da'><table width='210' border='0' align='center' cellpadding='0' cellspacing='0'>")
                    document.write("<tr>")
                      document.write("<td>&nbsp;</td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td style='padding-left:10px'><strong>Quick links</strong></td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td height='5'></td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td style='padding:0 10px'><table width='100%' border='0' cellspacing='0' cellpadding='0'>")
                          document.write("<tr>")
                            document.write("<td height='1' style='background:url(images/dotteed_lines.gif) repeat-x'></td>")
                          document.write("</tr>")
                      document.write("</table></td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td height='5'></td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td class='rhs'>")
					  document.write("<ul>")
					  	  document.write("<li><a href='imp_dates.htm'>Important Dates</a></li>")
						  document.write("<li><a href='sample_questions.pdf' target=_blank'>Download Sample Questions</a></li>")
						  document.write("<!-- <li><a href='#'>link 4</a></li> -->")
						  document.write("<!-- <li><a href='#'>link 1</a></li> -->")
					  document.write("</ul></td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td height='20'>&nbsp;</td>")
                    document.write("</tr>")
                document.write("</table></td>")
              document.write("</tr>")
            document.write("</table></td>")
          document.write("</tr>")
		  document.write("<tr>")
          document.write("<td height='15'></td>")
          document.write("</tr>")
          document.write("<tr>")
            document.write("<td><table border='0' cellspacing='0' cellpadding='0'>")
							  document.write("<tr>")
								document.write("<td width='100'><img src='images/standard_life.gif' alt=''/></td>")
								document.write("<td valign='top'><img src='images/ndtv_logo.gif' alt='' /></td>")
							  document.write("</tr>")
							document.write("</table></td>")
          document.write("</tr>")
		  document.write("<tr>")
          document.write("<td height='40'></td>")
          document.write("</tr>")
		  document.write("<tr>")
            document.write("<td style='font-size:10px'>*HDFC StandardLife Insurance Company Ltd. Insurance is the subject matter of the solicitation.</td>")
          document.write("</tr>")
        document.write("</table>")
}

function rhs_home()
{
document.write("<table width='210' border='0' align='left' cellpadding='0' cellspacing='0'>")
          document.write("<tr>")
            document.write("<td height='65'>&nbsp;</td>")
          document.write("</tr>")
          document.write("<tr>")
            document.write("<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>")
              document.write("<tr>")
                document.write("<td bgcolor='#e3e6da'><table width='210' border='0' align='center' cellpadding='0' cellspacing='0'>")
                  document.write("<tr>")
                    document.write("<td>&nbsp;</td>")
                  document.write("</tr>")
                  //document.write("<tr>")
                    //document.write("<td style='padding-left:10px'><a href='/meritus/online_test/login.asp' target='_blank'><img src='images/web_Banner.gif' alt=''/></a></td>")
                  //document.write("</tr>")
                  
                  //document.write("<tr>")
                    //document.write("<td height='3'><div id='msisdntip' class='msisdn_tooltip'><div class='bd'>Kindly enter the Registered Number you had selected at the time of filling up the Meritus Registration Form.</div><!--[if lte IE 6.5]><iframe></iframe><![endif]--></div></div></td>")
                  //document.write("</tr>")
                  //document.write("<tr>")
                    //document.write("<td style='padding-left:10px'><table width='100%' border='0' cellspacing='0' cellpadding='0'>")
					  //document.write("<form method='post' name='getstat' action='process.asp?todo=getappstats' onsubmit='return checkfrm()'><tr>")
						//document.write("<td width='145'><input name='msisdn' type='text' style='width:135px; border:1px solid #737373' onFocus='if(this.value==\"Mob/Tel\")this.value=\"\";showTip(\"1\")' onBlur='if(this.value==\"\") this.value=\"Mob/Tel\";showTip(\"0\")'  onkeyup='showTip(\"0\")'  maxlength='11' Value='Mob/Tel' class='txt_fld'></td>")
						//document.write("<td><input name='' type='image' src='images/go.gif'></td>")
					  //document.write("</tr></form>")
					//document.write("</table></td>")
                  //document.write("</tr>")
                  document.write("<tr>")
                    document.write("<td height='10'></td>")
                  document.write("</tr>")
                  document.write("<tr>")
                    document.write("<td style='padding-left:10px'><strong>Find your nearest branch</strong></td>")
                  document.write("</tr>")
                  document.write("<tr>")
                    document.write("<td height='3'></td>")
                  document.write("</tr>")
                  document.write("<tr>")
                    document.write("<td style='padding-left:10px'><select name='' class='txt_fld_big' onchange='openwin(this.value)' style='width:170px; border:1px solid #737373'>")
						document.write("<option value=''>Select</option>");
					document.write("<option value='/applications/locator/branch.asp'>Branch</option>");
					document.write("<option value='/applications/locator/atm.asp'>ATM</option>");
				   document.write("</select></td>");					
                  document.write("</tr>")
				  document.write("<tr>")
                    document.write("<td height='20'>&nbsp;</td>")
                  document.write("</tr>")
                document.write("</table></td>")
              document.write("</tr>")
            document.write("</table></td>")
          document.write("</tr>")
          document.write("<tr>")
            document.write("<td>&nbsp;</td>")
          document.write("</tr>")
          document.write("<tr>")
            document.write("<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>")
              document.write("<tr>")
                document.write("<td bgcolor='#e3e6da'><table width='210' border='0' align='center' cellpadding='0' cellspacing='0'>")
                    document.write("<tr>")
                      document.write("<td>&nbsp;</td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td style='padding-left:10px'><strong>Quick links</strong></td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td height='5'></td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td style='padding:0 10px'><table width='100%' border='0' cellspacing='0' cellpadding='0'>")
                          document.write("<tr>")
                            document.write("<td height='1' style='background:url(images/dotteed_lines.gif) repeat-x'></td>")
                          document.write("</tr>")
                      document.write("</table></td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td height='5'></td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td class='rhs'>")
					  document.write("<ul>")
					  	  document.write("<li><a href='imp_dates.htm'>Important Dates</a></li>")
						  document.write("<li><a href='sample_questions.pdf' target=_blank'>Download Sample Questions</a></li>")
						  document.write("<!-- <li><a href='#'>link 4</a></li> -->")
						  document.write("<!-- <li><a href='#'>link 1</a></li> -->")
					  document.write("</ul></td>")
                    document.write("</tr>")
                    document.write("<tr>")
                      document.write("<td height='20'>&nbsp;</td>")
                    document.write("</tr>")
                document.write("</table></td>")
              document.write("</tr>")
            document.write("</table></td>")
          document.write("</tr>")
		  document.write("<tr>")
          document.write("<td height='15'></td>")
          document.write("</tr>")
          document.write("<tr>")
            document.write("<td><table border='0' cellspacing='0' cellpadding='0'>")
						  document.write("<tr>")
							document.write("<td width='100'><img src='images/standard_life.gif' alt=''/></td>")
							document.write("<td valign='top'><img src='images/ndtv_logo.gif' alt='' /></td>")
						  document.write("</tr>")
						document.write("</table></td>")
          document.write("</tr>")
		  document.write("<tr>")
          document.write("<td height='65'></td>")
          document.write("</tr>")
		  document.write("<tr>")
            document.write("<td style='font-size:10px'>*HDFC StandardLife Insurance Company Ltd. Insurance is the subject matter of the solicitation.</td>")
          document.write("</tr>")
        document.write("</table>")

	/********code for banner in homepage***********/
	//document.getElementById('bandiv').style.display='block';
	//start();
	/******************/
}

function top_nav()
{
	document.write("<div id='top_links'>")
		document.write("<ul>")
		document.write("<li><a href='http://www.hdfcbank.com/personal/default.htm'>HDFC Bank Home</a></li> | ")
		document.write("<li><a href='http://www.hdfcbank.com/aboutus/default.htm' target='_blank'>About Us</a></li> | ")
		document.write("<li><a href='https://leads.hdfcbank.com/applications/webforms/customersupport/meritus_mainfrm.htm' target='_blank'>Contact Us</a></li>")
		document.write("</ul>")
		document.write("</div>")
}

function footer()
{
	document.write("<table width='100%' border='0' cellspacing='0' bgcolor='#e3e3e3' cellpadding='0'>")
      				 document.write("<tr>")
        				document.write("<td width='330' class='footer'></td>")
						document.write("<td width='330' align='center' class='footer'>")
							document.write("<a href='/aboutus/terms_conditions/privacy.htm'>Privacy</a> ")
							document.write("|")
							document.write("<a href='/aboutus/terms_conditions/security.htm'> Security</a> ")
							document.write("|")
							document.write("<a href='/aboutus/terms_conditions/default.htm'> Website Usage Terms</a></td>")
					    document.write("<td width='330' class='footer'>")
							document.write("<ul>")
								document.write("<li><a href='#' onclick=window.open('http://www.hdfcbank.com/applications/misc/sendemail/mail.asp?filepath='+location.href+'','mail','width=500,height=350,scrollbars=yes,menubar=no,location=no,left=0,top=0')><img src='images/email.gif' alt='' />E-mail this page</a></li>")
							document.write("<li><a href='#' onClick='javascript:printpg()' title='Print this page'><img src='images/print.gif' alt='' />Print this page</a></li>")
							document.write("</ul></td>")
				    document.write("</tr>")
				  document.write("</table>")
}
