// Call.js

$(document).ready(function(){
/*Defect 107: Added null check before using the veribale*/
var hashObject=location.hash;var hashString=hashObject.toString();var hashSubString=hashString.substring(1);var linkableItemRef='#linkableItem_'+hashSubString;
$(linkableItemRef).show();if(typeof(newsList)!="undefined" && newsList.length>0){var currentNewsListPos=0;var headline_interval;var newsListSize=newsList.length;function populateNewsDiv()
{$("#newsTitle").text(newsList[currentNewsListPos].newsTitle);
$("#newsDate").text(newsList[currentNewsListPos].newsDate);
$("#newsAbstract").text(newsList[currentNewsListPos].newsAbstract);var newsDetailPage=newsList[currentNewsListPos].newsDetailPage;var locationString="/ub/web/who-we-are/news-detail?content.nodePath="+newsDetailPage;var anchorLocation=(locationString+"article"+currentNewsListPos.toString());
$("#newsTitle").attr({href:locationString});}
populateNewsDiv();function previousNewsItem(){if(currentNewsListPos==0){currentNewsListPos=newsListSize-1;}
else{currentNewsListPos--;}
populateNewsDiv();}
function nextNewsItem(){if(currentNewsListPos<(newsListSize-1)){currentNewsListPos++;}
else{currentNewsListPos=0;}
populateNewsDiv();}
function headline_rotate(){nextNewsItem();}
$("#prevNewsItem").click(function(){previousNewsItem();});
$("#nextNewsItem").click(function(){nextNewsItem();});headline_interval=setInterval(headline_rotate,5000);
$(".ddNewsContent").hover(function(){clearInterval(headline_interval);},function(){headline_interval=setInterval(headline_rotate,5000);});}
var currentWebisodePos=0;if($("#hWebisodeArrayPos").val()!="")
{}
/*Defect 107: Added null check before using the veribale.Start*/
if(typeof(webisodeList)!="undefined"){
        webisodeListSize=webisodeList.length;
}
/*Defect 107: Added null check before using the veribale.End*/
populateMoneyBoxDiv();
$("#prevMoneyBoxItem").click(function(){previousMoneyBoxItem();});
$("#nextMoneyBoxItem").click(function(){nextMoneyBoxItem();});function nextMoneyBoxItem(){if(currentWebisodePos==0){currentWebisodePos=webisodeListSize-1;}
else{currentWebisodePos--;}
populateMoneyBoxDiv();}
function previousMoneyBoxItem(){if(currentWebisodePos<(webisodeListSize-1)){currentWebisodePos++;}
else{currentWebisodePos=0;}
populateMoneyBoxDiv();}
/*Defect 107: Added null check before using the veribale.*/
function populateMoneyBoxDiv(){if(typeof(webisodeList)!="undefined" && webisodeList[currentWebisodePos]!=undefined){$("#webisodeId").text(webisodeList[currentWebisodePos].webisodeId);
$("#webisodeIntroPassage").text(webisodeList[currentWebisodePos].webisodeIntroPassage);
$("#webisodePoint3").text(webisodeList[currentWebisodePos].webisodePoint3);if(webisodeList[currentWebisodePos].webisodePoint1==undefined||webisodeList[currentWebisodePos].webisodePoint1.length==0)
{$("#webisodePoint4").hide();}
else
{$("#webisodePoint1").show();
$("#webisodePoint1").text(webisodeList[currentWebisodePos].webisodePoint1);}
if(webisodeList[currentWebisodePos].webisodePoint2==undefined||webisodeList[currentWebisodePos].webisodePoint2.length==0)
{$("#webisodePoint2").hide();}
else
{$("#webisodePoint2").show();
$("#webisodePoint2").text(webisodeList[currentWebisodePos].webisodePoint2);}
if(webisodeList[currentWebisodePos].webisodePoint3==undefined||webisodeList[currentWebisodePos].webisodePoint3.length==0)
{$("#webisodePoint3").hide();}
else
{$("#webisodePoint3").show();
$("#webisodePoint3").text(webisodeList[currentWebisodePos].webisodePoint3);}
if(webisodeList[currentWebisodePos].webisodePoint4==undefined||webisodeList[currentWebisodePos].webisodePoint4.length==0)
{$("#webisodePoint4").hide();}
else
{$("#webisodePoint4").show();
$("#webisodePoint4").text(webisodeList[currentWebisodePos].webisodePoint4);}
$("#webisodeInstruction").text(webisodeList[currentWebisodePos].webisodeInstruction);var strHTML="";strHTML+="<object width='336' height='270'>\n";strHTML+="<param name='movie' value="+webisodeList[currentWebisodePos].youTubeValue+"><\/param>\n";strHTML+="<param name='allowFullScreen' value='true'><\/param>\n";strHTML+="<param name='allowscriptaccess' value='always'><\/param>\n";strHTML+="<embed src="+webisodeList[currentWebisodePos].youTubeSrc+"type='application\/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='336' height='270'><\/embed>\n";strHTML+="<\/object>\n";
$(".webisodeLink").text(webisodeList[currentWebisodePos].webisodeLink);var webisodeDetailPage=webisodeList[currentWebisodePos].webisodeDetailPage;var locationString="/ub/web/money-box/money-box-detail?content.nodePath="+webisodeDetailPage;
$(".webisodeLink").attr({href:locationString});}}
$("table#tdrates tbody tr:eq(0) td ").addClass("greenRowTD");
$("table#tdrates tbody tr:eq(1) td ").addClass("lightGreenRow");
$(".helpArticle h3").toggle(function(){$("#"+$(this).attr("id")+" ~ div").attr({style:"display:block"});window.location.href = ("#"+$(this).attr("id"));},function(){$("#"+$(this).attr("id")+" ~ div").attr({style:"display:none"});});
$(".browserType").click(function(){$("#q9"+" ~ div").attr({style:"display:block"});});
$("table.oddEven thead th td").css("background-color","none");
$("table.oddEven tbody tr:even").css("background-color","#efefef");
$("table.oddEven tbody tr:odd").css("background-color","#ffffff");
$("table.oddEvenTermDeposit thead th td").css("background-color","none");
$("table.oddEvenTermDeposit tbody tr:even").css("background-color","#efefef");
$("table.oddEvenTermDeposit tbody tr:odd").css("background-color","#ffffff");

$("table.largeOddEven thead th td").css("background-color","none");
$("table.largeOddEven thead th").css("width","58px");
$("table.largeOddEven tbody tr:even").css("background-color","#efefef");
$("table.largeOddEven tbody tr:odd").css("background-color","#ffffff");
$("table.largeOddEven tbody tr:first").css("background-color","#004942");
$("table.largeOddEven tbody tr:first").css("color","#ffffff");
$("table.largeOddEven tbody tr:first").css("font-weight","bold");


/* mortgages product pages start*/
$("table.mortgagesOddEven thead th td").css("background-color","none");
$("table.mortgagesOddEven thead th td").css("vertical-align","middle");
$("table.mortgagesOddEven tbody tr:even").css("background-color","#efefef");
$("table.mortgagesOddEven tbody tr:odd").css("background-color","#ffffff");
$("table.mortgagesOddEven tbody tr:first").css("background-color","#004942");
$("table.mortgagesOddEven tbody tr:first").css("color","#ffffff");
$("table.mortgagesOddEven tbody tr:first").css("font-weight","bold");

//changes for mortgages overview product pages 
$("table#ourRatesPanel tbody tr:odd").css("font-style","italic");
/* mortgages product pages start*/


$("table.largeOddEvenAllRates thead th").css("background-color","#004942");
$("table.largeOddEvenAllRates thead th").css("color","#ffffff");
$("table.largeOddEvenAllRates thead th").css("width","58px");
$("table.largeOddEvenAllRates tbody tr:even").css("background-color","#efefef");
$("table.largeOddEvenAllRates tbody tr:odd").css("background-color","#ffffff");

$("table.largeOddEvenLBRates thead th").css("background-color","#afcf33");
$("table.largeOddEvenLBRates thead th").css("color","#004942");
$("table.largeOddEvenLBRates thead th").css("width","58px");
$("table.largeOddEvenLBRates tbody tr:even").css("background-color","#efefef");
$("table.largeOddEvenLBRates tbody tr:odd").css("background-color","#ffffff");

$(":radio").css({background:"none",border:"none"});
$(":checkbox").css({background:"none",border:"none"});
$(window).load(function(){placeElement($("#topDivider"),$("#whoFeature"),700,-322);if($("#dropFAQ").hasClass("ddTitle"))
{$("#dropFAQContent").hide();}
else
{$("#dropFAQContent").show();}
if($("#dropCalc").hasClass("ddTitle"))
{$("#dropCalcContent").hide();}
else
{$("#dropCalcContent").show();}
/* SMSF changes for Drag and Drop for TD and USuper Calculator Start */
if($("#dropTDCalc").hasClass("ddTitle"))
{$("#dropTDCalcContent").hide();}
else
{$("#dropTDCalcContent").show();}
if($("#dropUSuperCalc").hasClass("ddTitle"))
{$("#dropUSuperCalcContent").hide();}
else
{$("#dropUSuperCalcContent").show();}
/* SMSF changes for Drag and Drop for TD and USuper Calculator End*/
if($("#dropNews").hasClass("ddTitle"))
{$("#dropNewsContent").hide();}
else
{$("#dropNewsContent").show();}
if($("#dropAlerts").hasClass("ddTitle"))
{$("#dropAlertsContent").hide();}
else
{$("#dropAlertsContent").show();}
if($("#dropGoalTracker").hasClass("ddTitle"))
{$("#dropGoalTrackerContent").hide();}
else
{$("#dropGoalTrackerContent").show();}
if($("#dropMoneyMatters").hasClass("ddTitle"))
{$("#dropMoneyMattersContent").hide();}
else
{$("#dropMoneyMattersContent").show();}
if($("#dropMoney").hasClass("ddTitle"))
{$("#dropMoneyContent").hide();}
else
{$("#dropMoneyContent").show();}
if($("#dropInterestRates").hasClass("ratestitleBgCollapsed"))
{$("#dropInterestRatesContent").hide();}
else
{$("#dropInterestRatesContent").show();}


/*Mortgages MyMoney-Applications start*/
if($("#dropMyApps").hasClass("appsTitleBgCollapsed"))
{$("#dropMyAppsContent").hide();}
else
{$("#dropMyAppsContent").show();}
/*Mortgages MyMoney-Applications end*/

/*Mortgages MyMoney-HomeLoan start*/
if($("#dropHomeLoan").hasClass("homeLoanTitleBgCollapsed"))
{$("#dropHomeLoanContent").hide();}
else
{$("#dropHomeLoanContent").show();}
/*Mortgages MyMoney-HomeLoan end*/

/*Mortgages Product Pages RHS Portlet Start*/
if($("#dropHomeLoanCalc").hasClass("ddTitle"))
{$("#dropHomeLoanCalcContent").hide();}
else
{$("#dropHomeLoanCalcContent").show();}

if($("#dropHomeLoanVideo").hasClass("ddTitle"))
{$("#dropHomeLoanVideoContent").hide();}
else
{$("#dropHomeLoanVideoContent").show();}

/*Mortgages Product Pages RHS Portlet end*/


if($("#goaltrackeronhome").hasClass("goalTrackerBgCollapsed"))
{$("#goalTrackerContent").hide();}
else
{$("#goalTrackerContent").show();}
if($("#dropOSCalculator").hasClass("ostitleBgCollapsed"))
{$("#dropOSCalculatorContent").hide();}
else
{$("#dropOSCalculatorContent").show();}
if($("#dropTDCalculator").hasClass("titleBgCollapsed"))
{$("#dropTDCalculatorContent").hide();}
else
{$("#dropTDCalculatorContent").show();}});
$(window).resize(function(){placeElement($("#topDivider"),$("#whoFeature"),700,-322);});function placeElement(relEl,movingEl,extraX,extraY)
{if(relEl.attr("id")!=undefined)
{var xPos=(relEl.offset().left+extraX);var yPos=(relEl.offset().top+extraY);movingEl.css({left:xPos+"px",top:yPos+"px"});}}
/* SMSF changes for Drag and Drop for TD and USuper Calculator Start*/
/*$("ul#topNav li.active").attr({style:"background-position: 0px -70px"});*/
$("ul#tabs li.tabActive").attr({style:"background-position: 0px -35px"});
$("ul#tabsHelp li.tabActive").attr({style:"background-position: 0px -35px"});
/*$("#buttonMagazine .active").attr({style:"background-position: 0px -35px"});*/

/* Start By Milind for IE6 issue*/
$("#buttonMagazine .btnTopGrey2").hover(function(){$(this).attr({style:"background-position: 0px -35px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
$("#buttonMagazine .btnTopGrey2.active").attr({style:"background-position: 0px -35px"});
$("#buttonMagazine .btnTopGrey2.active").hover(function(){$(this).attr({style:"background-position: 0px -35px"});},function(){$(this).attr({style:"background-position: 0px -35px"});});

$("#buttonMagazine .btnTopGrey1").hover(function(){$(this).attr({style:"background-position: 0px -107px"});},function(){$(this).attr({style:"background-position: 0px -72px"});});
$("#buttonMagazine .btnTopGrey1.active").attr({style:"background-position: 0px -107px"});
$("#buttonMagazine .btnTopGrey1.active").hover(function(){$(this).attr({style:"background-position: 0px -107px"});},function(){$(this).attr({style:"background-position: 0px -107px"});});

$("#buttonMagazine .btnTopGrey3").hover(function(){$(this).attr({style:"background-position: 0px -178px"});},function(){$(this).attr({style:"background-position: 0px -143px"});});
$("#buttonMagazine .btnTopGrey3.active").attr({style:"background-position: 0px -178px"});
$("#buttonMagazine .btnTopGrey3.active").hover(function(){$(this).attr({style:"background-position: 0px -178px"});},function(){$(this).attr({style:"background-position: 0px -178px"});});

$("#buttonMagazine .btnTopGrey4").hover(function(){$(this).attr({style:"background-position: 0px -248px"});},function(){$(this).attr({style:"background-position: 0px -213px"});});
$("#buttonMagazine .btnTopGrey4.active").attr({style:"background-position: 0px -248px"});
$("#buttonMagazine .btnTopGrey4.active").hover(function(){$(this).attr({style:"background-position: 0px -248px"});},function(){$(this).attr({style:"background-position: 0px -248px"});});

$("ul#topNav li.navMoneyBox").hover(function(){$(this).attr({style:"background-position: 0px -319px"});},function(){$(this).attr({style:"background-position: 0px -284px"});});
$("ul#topNav li.navMoneyBox.active").attr({style:"background-position: 0px -354px"});
$("ul#topNav li.navMoneyBox.active").hover(function(){$(this).attr({style:"background-position: 0px -354px"});},function(){$(this).attr({style:"background-position: 0px -354px"});});

$("ul#topNav li.navMoneyTools").hover(function(){$(this).attr({style:"background-position: 0px -425px"});},function(){$(this).attr({style:"background-position: 0px -390px"});});
$("ul#topNav li.navMoneyTools.active").attr({style:"background-position: 0px -460px"});
$("ul#topNav li.navMoneyTools.active").hover(function(){$(this).attr({style:"background-position: 0px -460px"});},function(){$(this).attr({style:"background-position: 0px -460px"});});

$("ul#topNav li.navRates").hover(function(){$(this).attr({style:"background-position: 0px -531px"});},function(){$(this).attr({style:"background-position: 0px -496px"});});
$("ul#topNav li.navRates.active").attr({style:"background-position: 0px -566px"});
$("ul#topNav li.navRates.active").hover(function(){$(this).attr({style:"background-position: 0px -566px"});},function(){$(this).attr({style:"background-position: 0px -566px"});});

$("ul#topNav li.navWho").hover(function(){$(this).attr({style:"background-position: 0px -637px"});},function(){$(this).attr({style:"background-position: 0px -602px"});});
$("ul#topNav li.navWho.active").attr({style:"background-position: 0px -672px"});
$("ul#topNav li.navWho.active").hover(function(){$(this).attr({style:"background-position: 0px -672px"});},function(){$(this).attr({style:"background-position: 0px -672px"});});

$("ul#topNav li.navContact").hover(function(){$(this).attr({style:"background-position: 0px -743px"});},function(){$(this).attr({style:"background-position: 0px -708px"});});
$("ul#topNav li.navContact.active").attr({style:"background-position: 0px -778px"});
$("ul#topNav li.navContact.active").hover(function(){$(this).attr({style:"background-position: 0px -778px"});},function(){$(this).attr({style:"background-position: 0px -778px"});});

$("ul#topNav li.navFeedback").hover(function(){$(this).attr({style:"background-position: 0px -849px"});},function(){$(this).attr({style:"background-position: 0px -814px"});});
$("ul#topNav li.navFeedback.active").attr({style:"background-position: 0px -884px"});
$("ul#topNav li.navFeedback.active").hover(function(){$(this).attr({style:"background-position: 0px -884px"});},function(){$(this).attr({style:"background-position: 0px -884px"});});

/* End By Milind for IE6 issue*/


$("ul#tabs li").hover(function(){$(this).attr({style:"background-position: 0px -27px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
$("ul#tabsHelp li").hover(function(){$(this).attr({style:"background-position: 0px -27px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
$("ul#tabs li.tabActive").hover(function(){$(this).attr({style:"background-position: 0px -27px"});},function(){$(this).attr({style:"background-position: 0px -27px"});});
$("ul#tabsHelp li.tabActive").hover(function(){$(this).attr({style:"background-position: 0px -27px"});},function(){$(this).attr({style:"background-position: 0px -27px"});});
/*$("#buttonMagazine div").hover(function(){$(this).attr({style:"background-position: 0px -35px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});*/
/*$(".btnMore").hover(function(){$(this).attr({style:"background-position: 0px -21px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});*/
$("#bannerApplyBtn").hover(function(){$(this).attr({style:"background-position: 0px -26px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
/*$(".ddContent .floatL").hover(function(){$(this).attr({style:"background-position: 0px -30px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
$(".ddContent .floatR").hover(function(){$(this).attr({style:"background-position: 0px -30px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});*/
$(".formStep3Btn").hover(function(){$(this).attr({style:"background-position: 0px -19px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
$("#printConfirmBtn").hover(function(){$(this).attr({style:"background-position: 0px -21px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
$("#downloadConfirmBtn").hover(function(){$(this).attr({style:"background-position: 0px -21px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
$("#printPageBtn").hover(function(){$(this).attr({style:"background-position: 0px -21px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
$("#backHomeBtn").hover(function(){$(this).attr({style:"background-position: 0px -21px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
$("#btnInstall").hover(function(){$(this).attr({src:"../img/btnInstallOver.gif"});},function(){$(this).attr({src:"../img/btnInstall.gif"});});
$("#downloadPrintedAppBtn").hover(function(){$(this).attr({style:"background-position: 0px -26px"});},function(){$(this).attr({style:"background-position: 0px 0px"});});
$(".helpPreferredPhoneNumber").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">Please provide either a landline (include an area code) or a mobile phone number</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$("#helpInvestmentAmount").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">You can deposit between $10,000 and $2 million</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$("#helpChooseTerm").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">If you take out a 12-month term deposit, you can choose to have your interest paid to your chosen bank account every month, three months, six months, or at the end of the term</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$("#helpInterestPaid").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">You can decide whether the interest is paid into your chosen bank account every month, once a quarter, every 6 months or at maturity</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$("#helpMaturityInst").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">If you select 'No', we'll be in touch with you about a month before your maturity date to confirm what you want to do.</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$("#helpInvestmentAmount").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">You can deposit between $10,000 and $2 million</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$("#helpMaturity").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">Maturity help goes here.</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$("#helpDeposit").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">You can choose how you'd like to make your deposit - either BPAY, funds transfer or by cheque.</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$(".helpSecQuestion").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">We'll ask you this question to identify you when you call, so if you choose 'Other' it's important to be sure it's a question and answer that no-one else can easily guess.</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$(".helpSecAnswer").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">This is the answer to your security question that you'll need to give us when you call</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$(".helpResAddr").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">This must be your current Australian residential address, not a PO Box</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$(".helpPrevAddr").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">This must an Australian residential address, not a PO Box</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$("#helpRolloverFull").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">Rollover my full deposit (or more) at the current rate and get my Loyalty Bonus of 0.10% p.a.</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$("#helpRolloverPart").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">Rollover into another UBank Term Deposit, but with a reduced amount or different term</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$("#helpClose").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">Transfer my deposit (plus interest) to my chosen bank account and close my UBank Term Deposit</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});
$(".helpSrcCode").hover(function(){var yPos=($(this).offset().top-10);var xPos=($(this).offset().left+22);
$("#helpBubble").css({left:xPos+"px",top:yPos+"px"});
$("#helpText").html("<p style=\"text-align:left;\">If you can see a 4 digit code on the back of your printed application form or on your downloaded application form please enter it here.</p>");
$("#helpBubble").show();},function(){$("#helpBubble").hide();});var dropArrayBar=new Array($("#dropCalc"),$("#dropNews"),$("#dropFAQ"),$("#dropAlerts"),$("#dropMoneyMatters"),$("#dropMoney"),$("#dropTDCalc"),$("#dropUSuperCalc"),$("#dropHomeLoanCalc"),$("#dropHomeLoanVideo"))//Mortgages Changes
var dropArrayContent=new Array($("#dropCalcContent"),$("#dropNewsContent"),$("#dropFAQContent"),$("#dropAlertsContent"),$("#dropMoneyMattersContent"),$("#dropMoneyContent"),$("#dropTDCalcContent"),$("#dropUSuperCalcContent"),$("#dropHomeLoanCalcContent"),$("#dropHomeLoanVideoContent"))//Mortgages Changes
var dropInterestBar=new Array($("#dropInterestRates"),$("#dropHomeLoan"),$("#dropMyApps"),$("#dropOSCalculator"),$("#dropTDCalculator"),$("#goaltrackeronhome"))
var dropInterestContent=new Array($("#dropInterestRatesContent"),$("#dropHomeLoanContent"),$("#dropMyAppsContent"),$("#dropOSCalculatorContent"),$("#dropTDCalculatorContent"),$("#goalTrackerContent"))
$("#dropTDCalc").click(function(){toggleFunction($(this));});
$("#dropUSuperCalc").click(function(){toggleFunction($(this));});
$("#dropHomeLoanCalc").click(function(){toggleFunction($(this));});//Mortgages Changes
$("#dropHomeLoanVideo").click(function(){toggleFunction($(this));});//Mortgages Changes
$("#dropCalc").click(function(){toggleFunction($(this));});
/* $("#buttonMagazine .active").hover(function(){$(this).attr({style:"background-position: 0px -35px"});},function(){$(this).attr({style:"background-position: 0px -35px"});}); */
$("#dropNews").click(function(){toggleFunction($(this));});
$("#dropFAQ").click(function(){toggleFunction($(this));});
$("#dropAlerts").click(function(){toggleFunction($(this));});
$("#dropMoneyMatters").click(function(){toggleFunction($(this));});
$("#dropInterestRates").click(function(){togglePerPortlet($(this),"ratestitleBg","ratestitleBgCollapsed");});
$("#goaltrackeronhome").click(function(){togglePerPortlet($(this),"goalTrackerTitleBg","goalTrackerBgCollapsed");});
$("#dropOSCalculator").click(function(){togglePerPortlet($(this),"ostitleBg","ostitleBgCollapsed");});
$("#dropTDCalculator").click(function(){togglePerPortlet($(this),"titleBg","titleBgCollapsed");});
$("#dropMyApps").click(function(){togglePerPortlet($(this),"appsTitleBg","appsTitleBgCollapsed");});
$("#dropHomeLoan").click(function(){togglePerPortlet($(this),"homeLoanTitleBg","homeLoanTitleBgCollapsed");});
$("#dropMoney").click(function(){toggleFunction($(this));});function toggleFunction(el)
{for(var i=0;i<dropArrayBar.length;i++)
{if((dropArrayBar[i].attr("id")!=undefined))
{if(dropArrayBar[i].attr("id")!=el.attr("id"))
{dropArrayBar[i].removeClass("ddActive");dropArrayBar[i].addClass("ddTitle");dropArrayContent[i].slideUp();}
else
{if(el.hasClass("ddActive"))
{el.removeClass("ddActive");el.addClass("ddTitle");dropArrayContent[i].slideUp();}
else
{el.removeClass("ddTitle");el.addClass("ddActive");dropArrayContent[i].slideDown();}}}}}
/* SMSF changes for Drag and Drop for TD and USuper Calculator End*/

function togglePerPortlet(el,activeClass,inactiveClass)
{for(var i=0;i<dropInterestBar.length;i++)
{if((dropInterestBar[i].attr("id")!=undefined))
{if(dropInterestBar[i].attr("id")!=el.attr("id"))
{}
else
{if(el.hasClass(activeClass))
{el.removeClass(activeClass);el.addClass(inactiveClass);dropInterestContent[i].slideUp();if(inactiveClass=='ratestitleBgCollapsed'){$("#dropInterestRates").attr({title:document.getElementById('UBankRates:maximise').value});}else if(inactiveClass=='homeLoanTitleBgCollapsed'){$("#dropHomeLoan").attr({title:document.getElementById('myHomeLoanform:maximise').value});}else if(inactiveClass=='appsTitleBgCollapsed'){$("#dropMyApps").attr({title:document.getElementById('UBankRates:maximise').value});}else if(inactiveClass=='titleBgCollapsed'){$("#dropTDCalculator").attr({title:document.getElementById('UBankRates:maximise').value});}else if(inactiveClass=='ostitleBgCollapsed'){$("#dropOSCalculator").attr({title:document.getElementById('OSCalculator:maximise').value});}else if(inactiveClass=='goalTrackerBgCollapsed'){$("#goaltrackeronhome").attr({title:document.getElementById('GoalTracker:maximise').value});}}
else
{el.removeClass(inactiveClass);el.addClass(activeClass);dropInterestContent[i].slideDown();if(activeClass=='titleBg'){$("#dropTDCalculator").attr({title:document.getElementById('TDCalculator:minimise').value});}else if(activeClass=='ratestitleBg'){$("#dropInterestRates").attr({title:document.getElementById('UBankRates:minimise').value});}else if(activeClass=='homeLoanTitleBg'){$("#dropHomeLoan").attr({title:document.getElementById('myHomeLoanform:minimise').value});}else if(activeClass=='appsTitleBg'){$("#dropMyApps").attr({title:document.getElementById('UBankRates:minimise').value});}else if(activeClass=='ostitleBg'){$("#dropOSCalculator").attr({title:document.getElementById('OSCalculator:minimise').value});}else if(activeClass=='goalTrackerTitleBg'){$("#goaltrackeronhome").attr({title:document.getElementById('GoalTracker:minimise').value});}}}}}}
$("table.dottedLines tr td label").each(function(){var re=new RegExp("[0-9]+\.[0-9]+[%]");var reLambda=new RegExp("&#955;");if($(this).text().indexOf("3 months")>0)
{$(this).html("3 months <strong style=\"padding-left:10px;\">"+$(this).text().match(re)+" p.a.</strong>");}
else if($(this).text().indexOf("6 months")>0)
{$(this).html("6 months <strong style=\"padding-left:10px;\">"+$(this).text().match(re)+" p.a.</strong>");}
else if($(this).text().indexOf("9 months")>0)
{$(this).html("9 months <strong style=\"padding-left:10px;\">"+$(this).text().match(re)+" p.a.</strong>");}
else if($(this).text().indexOf("12 months")>0)
{$(this).html("12 months <strong style=\"padding-left:10px;\">"+$(this).text().match(re)+" p.a.</strong>");}});});function toggleFormDisable(checkBoxValue,elementname1,elementname2)
{if(checkBoxValue==true)
{document.getElementById(elementname1).disabled=true;document.getElementById(elementname2).disabled=true;}
else
{document.getElementById(elementname1).disabled=false;document.getElementById(elementname2).disabled=false;}}
function toggleFormDivs(inputVal,triggerVal,containerDivId)
{if(inputVal==triggerVal)
{document.getElementById(containerDivId).style.display='block';}
else
{document.getElementById(containerDivId).style.display='none';}}


//ubankutil.js

function showhome_img(){
     alert('hi, i am  1111');
     document.getElementById('homeimg').style.display = 'block';
}

function hidehome_img(){
  document.getElementById('homeimg').style.display = 'none';
}

/* Script to detect the browser, browser version & OS -- Start
	Usage
		Browser name: BrowserDetect.browser
		Browser version: BrowserDetect.version
		OS name: BrowserDetect.OS

*/
var BrowserDetect = {
        init: function () {
               this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
               this.version = this.searchVersion(navigator.userAgent)
                       || this.searchVersion(navigator.appVersion)
                       || "an unknown version";
               this.OS = this.searchString(this.dataOS) || "an unknown OS";
        },
        searchString: function (data) {
               for (var i=0;i<data.length;i++)       {
                       var dataString = data[i].string;
                       var dataProp = data[i].prop;
                       this.versionSearchString = data[i].versionSearch || data[i].identity;
                       if (dataString) {
                               if (dataString.indexOf(data[i].subString) != -1)
                                      return data[i].identity;
                       }
                       else if (dataProp)
                               return data[i].identity;
               }
        },
        searchVersion: function (dataString) {
               var index = dataString.indexOf(this.versionSearchString);
               if (index == -1) return;
               return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
        },
        dataBrowser: [
               {
                       string: navigator.userAgent,
                       subString: "Chrome",
                       identity: "Chrome"
               },
               {       string: navigator.userAgent,
                       subString: "OmniWeb",
                       versionSearch: "OmniWeb/",
                       identity: "OmniWeb"
               },
               {
                       string: navigator.vendor,
                       subString: "Apple",
                       identity: "Safari",
                       versionSearch: "Version"
               },
               {
                       prop: window.opera,
                       identity: "Opera"
               },
               {
                       string: navigator.vendor,
                       subString: "iCab",
                       identity: "iCab"
               },
               {
                       string: navigator.vendor,
                       subString: "KDE",
                       identity: "Konqueror"
               },
               {
                       string: navigator.userAgent,
                       subString: "Firefox",
                       identity: "Firefox"
               },
               {
                       string: navigator.vendor,
                       subString: "Camino",
                       identity: "Camino"
               },
               {              // for newer Netscapes (6+)
                       string: navigator.userAgent,
                       subString: "Netscape",
                       identity: "Netscape"
               },
               {
                       string: navigator.userAgent,
                       subString: "MSIE",
                       identity: "Explorer",
                       versionSearch: "MSIE"
               },
               {
                       string: navigator.userAgent,
                       subString: "Gecko",
                       identity: "Mozilla",
                       versionSearch: "rv"
               },
               {              // for older Netscapes (4-)
                       string: navigator.userAgent,
                       subString: "Mozilla",
                       identity: "Netscape",
                       versionSearch: "Mozilla"
               }
        ],
        dataOS : [
               {
                       string: navigator.platform,
                       subString: "Win",
                       identity: "Windows"
               },
               {
                       string: navigator.platform,
                       subString: "Mac",
                       identity: "Mac"
               },
               {
                          string: navigator.userAgent,
                          subString: "iPhone",
                          identity: "iPhone/iPod"
            },
               {
                       string: navigator.platform,
                       subString: "Linux",
                       identity: "Linux"
               }
        ]

};
BrowserDetect.init();

/* Script to detect the browser, browser version & OS -- End 
*/

/*To resolve dynamic IFRAME height issue - 2367*/
function autoResize(id){
    var newheight;
	if (navigator.appName == "Microsoft Internet Explorer"){
		newheight=document.getElementById(id).contentWindow.document.body.scrollHeight;
	}else if (navigator.appName == "Netscape"){
        newheight=document.getElementById(id).contentWindow.document.body.offsetHeight;
	}else{
		newheight=document.getElementById(id).contentWindow.document.body.scrollHeight;
	}
    document.getElementById(id).height= (newheight) + "px";
}








/*dhtmlwindow.js*/
// -------------------------------------------------------------------
// Date 06/05/2009   Defect 1671 model window rounded corners look and feel applied. 
// Date 06/06/2009   Defect 1922 SEO Friendly URL's changes
// -------------------------------------------------------------------

var dhtmlwindow={
imagefiles:['/ub/framework/skins/ubankonline/images/min.gif', '/ub/framework/skins/ubankonline/images/close.gif', '/ub/framework/skins/ubankonline/images/restore.gif', '/ub/framework/skins/ubankonline/images/resize.gif'], //Path to 4 images used by script, in that order
ajaxbustcache: true, //Bust caching when fetching a file via Ajax?
ajaxloadinghtml: '<b>Loading Page. Please wait...</b>', //HTML to show while window fetches Ajax Content?

minimizeorder: 0,
zIndexvalue:100,
tobjects: [], //object to contain references to dhtml window divs, for cleanup purposes
lastactivet: {}, //reference to last active DHTML window

init:function(t){
	var domwindow=document.createElement("div") //create dhtml window div
	domwindow.id=t
	domwindow.className="dhtmlwindow"
	var domwindowdata=''
	domwindowdata='<div class="drag-handle">'
		domwindowdata+='DHTML Window <div class="drag-controls"></div>'
	domwindowdata+='</div>'
	domwindowdata+='<div class="drag-contentarea"></div>'
	domwindowdata+='<div class="bottomCurve"></div>'
	domwindowdata+='<div class="drag-statusarea"><div class="drag-resizearea">&nbsp;</div></div>'
	domwindowdata+='</div>'
	domwindow.innerHTML=domwindowdata
	document.getElementById("dhtmlwindowholder").appendChild(domwindow)
	//this.zIndexvalue=(this.zIndexvalue)? this.zIndexvalue+1 : 100 //z-index value for DHTML window: starts at 0, increments whenever a window has focus
	var t=document.getElementById(t)
	var divs=t.getElementsByTagName("div")
	for (var i=0; i<divs.length; i++){ //go through divs inside dhtml window and extract all those with class="drag-" prefix
		if (/drag-/.test(divs[i].className))
			t[divs[i].className.replace(/drag-/, "")]=divs[i] //take out the "drag-" prefix for shorter access by name
	}
	//t.style.zIndex=this.zIndexvalue //set z-index of this dhtml window
	t.handle._parent=t //store back reference to dhtml window
	t.resizearea._parent=t //same
	t.controls._parent=t //same
	t.onclose=function(){return true} //custom event handler "onclose"
	t.onmousedown=function(){dhtmlwindow.setfocus(this)} //Increase z-index of window when focus is on it
	t.handle.onmousedown=dhtmlwindow.setupdrag //set up drag behavior when mouse down on handle div
	t.resizearea.onmousedown=dhtmlwindow.setupdrag //set up drag behavior when mouse down on resize div
	t.controls.onclick=dhtmlwindow.enablecontrols
	t.show=function(){dhtmlwindow.show(this)} //public function for showing dhtml window
	t.hide=function(){dhtmlwindow.hide(this)} //public function for hiding dhtml window
	t.close=function(){dhtmlwindow.close(this)} //public function for closing dhtml window (also empties DHTML window content)
	t.setSize=function(w, h){dhtmlwindow.setSize(this, w, h)} //public function for setting window dimensions
	t.moveTo=function(x, y){dhtmlwindow.moveTo(this, x, y)} //public function for moving dhtml window (relative to viewpoint)
	t.isResize=function(bol){dhtmlwindow.isResize(this, bol)} //public function for specifying if window is resizable
	t.isScrolling=function(bol){dhtmlwindow.isScrolling(this, bol)} //public function for specifying if window content contains scrollbars
	t.load=function(contenttype, contentsource, title){dhtmlwindow.load(this, contenttype, contentsource, title)} //public function for loading content into window
	t.doResize=function(w, h){dhtmlwindow.doResize(this, w, h)}	// added for auto resizing iframe
	this.tobjects[this.tobjects.length]=t
	return t //return reference to dhtml window div
},

open:function(t, contenttype, contentsource, title, attr, recalonload){
	var d=dhtmlwindow //reference dhtml window object
	function getValue(Name){
		var config=new RegExp(Name+"=([^,]+)", "i") //get name/value config pair (ie: width=400px,)
		return (config.test(attr))? parseInt(RegExp.$1) : 0 //return value portion (int), or 0 (false) if none found
	}
	if (document.getElementById(t)==null) //if window doesn't exist yet, create it
		t=this.init(t) //return reference to dhtml window div
	else
		t=document.getElementById(t)
	this.setfocus(t)
	t.setSize(getValue(("width")), (getValue("height"))) //Set dimensions of window
	var xpos=getValue("center")? "middle" : getValue("left") //Get x coord of window
	var ypos=getValue("center")? "middle" : getValue("top") //Get y coord of window
	//t.moveTo(xpos, ypos) //Position window
	if (typeof recalonload!="undefined" && recalonload=="recal" && this.scroll_top==0){ //reposition window when page fully loads with updated window viewpoints?
		if (window.attachEvent && !window.opera) //In IE, add another 400 milisecs on page load (viewpoint properties may return 0 b4 then)
			this.addEvent(window, function(){setTimeout(function(){t.moveTo(xpos, ypos)}, 400)}, "load")
		else
			this.addEvent(window, function(){t.moveTo(xpos, ypos)}, "load")
	}
	t.isResize(getValue("resize")) //Set whether window is resizable
	t.isScrolling(getValue("scrolling")) //Set whether window should contain scrollbars
	t.style.visibility="visible"
	t.style.display="block"
	t.contentarea.style.display="block"
	t.moveTo(xpos, ypos) //Position window
	t.load(contenttype, contentsource, title)
	if (t.state=="minimized" && t.controls.firstChild.title=="Restore"){ //If window exists and is currently minimized?
		t.controls.firstChild.setAttribute("src", dhtmlwindow.imagefiles[0]) //Change "restore" icon within window interface to "minimize" icon
		t.controls.firstChild.setAttribute("title", "Minimize")
		t.state="fullview" //indicate the state of the window as being "fullview"
	}
	return t
},

//Added for auto resizing iframe modal
doResize:function(t,wid,hid){
	t.setSize(wid, hid);
	t.moveTo('middle','middle');
	return false;
},

setSize:function(t, w, h){ //set window size (min is 150px wide by 100px tall)
	t.style.width=Math.max(parseInt(w), 150)+"px"
	t.contentarea.style.height=Math.max(parseInt(h), 100)+"px"
	dhtmlmodal.adjustveil(); //to adjust veil when window is resized
},

moveTo:function(t, x, y){ //move window. Position includes current viewpoint of document
	this.getviewpoint() //Get current viewpoint numbers
	t.style.left=(x=="middle")? this.scroll_left+(this.docwidth-t.offsetWidth)/2+"px" : this.scroll_left+parseInt(x)+"px"
	t.style.top=(y=="middle")? this.scroll_top+(this.docheight-t.offsetHeight)/2+"px" : this.scroll_top+parseInt(y)+"px"
},

isResize:function(t, bol){ //show or hide resize inteface (part of the status bar)
	t.statusarea.style.display=(bol)? "block" : "none"
	t.resizeBool=(bol)? 1 : 0
},

isScrolling:function(t, bol){ //set whether loaded content contains scrollbars
	t.contentarea.style.overflow=(bol)? "auto" : "hidden"
},

load:function(t, contenttype, contentsource, title){ //loads content into window plus set its title (3 content types: "inline", "iframe", or "ajax")
	if (t.isClosed){
		alert("DHTML Window has been closed, so no window to load contents into. Open/Create the window again.")
		return
	}
	var contenttype=contenttype.toLowerCase() //convert string to lower case
	if (typeof title!="undefined")
		t.handle.firstChild.nodeValue=title
	if (contenttype=="inline")
		t.contentarea.innerHTML=contentsource
	else if (contenttype=="div"){
		var inlinedivref=document.getElementById(contentsource)
		t.contentarea.innerHTML=(inlinedivref.defaultHTML || inlinedivref.innerHTML) //Populate window with contents of inline div on page
		if (!inlinedivref.defaultHTML)
			inlinedivref.defaultHTML=inlinedivref.innerHTML //save HTML within inline DIV
		inlinedivref.innerHTML="" //then, remove HTML within inline DIV (to prevent duplicate IDs, NAME attributes etc in contents of DHTML window
		inlinedivref.style.display="none" //hide that div
	}
	else if (contenttype=="iframe"){
		t.contentarea.style.overflow="hidden" //disable window scrollbars, as iframe already contains scrollbars
		if (!t.contentarea.firstChild || t.contentarea.firstChild.tagName!="IFRAME") //If iframe tag doesn't exist already, create it first
			t.contentarea.innerHTML='<iframe src="://0" frameborder="0" scrolling="no"  style="margin:0; padding:0; width:100%; height: 100%" name="_iframe-'+t.id+'"></iframe>'
		window.frames["_iframe-"+t.id].location.replace(contentsource) //set location of iframe window to specified URL
		}
	else if (contenttype=="ajax"){
		this.ajax_connect(contentsource, t) //populate window with external contents fetched via Ajax
	}
	t.contentarea.datatype=contenttype //store contenttype of current window for future reference
},

setupdrag:function(e){
	var d=dhtmlwindow //reference dhtml window object
	var t=this._parent //reference dhtml window div
	d.etarget=this //remember div mouse is currently held down on ("handle" or "resize" div)
	var e=window.event || e
	d.initmousex=e.clientX //store x position of mouse onmousedown
	d.initmousey=e.clientY
	d.initx=parseInt(t.offsetLeft) //store offset x of window div onmousedown
	d.inity=parseInt(t.offsetTop)
	d.width=parseInt(t.offsetWidth) //store width of window div
	d.contentheight=parseInt(t.contentarea.offsetHeight) //store height of window div's content div
	if (t.contentarea.datatype=="iframe"){ //if content of this window div is "iframe"
	//	t.style.backgroundColor="#F8F8F8" //colorize and hide content div (while window is being dragged)
		t.contentarea.style.visibility="visible"
	}
	document.onmousemove=d.getdistance //get distance travelled by mouse as it moves
	document.onmouseup=function(){
		if (t.contentarea.datatype=="iframe"){ //restore color and visibility of content div onmouseup
			t.contentarea.style.backgroundColor="white"
			t.contentarea.style.visibility="visible"
		}
		d.stop()
	}
	return false
},

getdistance:function(e){
	var d=dhtmlwindow
	var etarget=d.etarget
	var e=window.event || e
	d.distancex=e.clientX-d.initmousex //horizontal distance travelled relative to starting point
	d.distancey=e.clientY-d.initmousey
	if (etarget.className=="drag-handle") //if target element is "handle" div
		d.move(etarget._parent, e)
	else if (etarget.className=="drag-resizearea") //if target element is "resize" div
		d.resize(etarget._parent, e)
	return false //cancel default dragging behavior
},

getviewpoint:function(){ //get window viewpoint numbers
	var ie=document.all && !window.opera
	var domclientWidth=document.documentElement && parseInt(document.documentElement.clientWidth) || 100000 //Preliminary doc width in non IE browsers
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	this.scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset
	this.scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset
	this.docwidth=(ie)? this.standardbody.clientWidth : (/Safari/i.test(navigator.userAgent))? window.innerWidth : Math.min(domclientWidth, window.innerWidth-16)
	this.docheight=(ie)? this.standardbody.clientHeight: window.innerHeight
},

rememberattrs:function(t){ //remember certain attributes of the window when it's minimized or closed, such as dimensions, position on page
	this.getviewpoint() //Get current window viewpoint numbers
	t.lastx=parseInt((t.style.left || t.offsetLeft))-dhtmlwindow.scroll_left //store last known x coord of window just before minimizing
	t.lasty=parseInt((t.style.top || t.offsetTop))-dhtmlwindow.scroll_top
	t.lastwidth=parseInt(t.style.width) //store last known width of window just before minimizing/ closing
},

move:function(t, e){
	t.style.left=dhtmlwindow.distancex+dhtmlwindow.initx+"px"
	t.style.top=dhtmlwindow.distancey+dhtmlwindow.inity+"px"
	dhtmlmodal.adjustveil(); //to adjust veil when window is resized
},

resize:function(t, e){
	t.style.width=Math.max(dhtmlwindow.width+dhtmlwindow.distancex, 150)+"px"
	t.contentarea.style.height=Math.max(dhtmlwindow.contentheight+dhtmlwindow.distancey, 100)+"px"
},

enablecontrols:function(e){
	var d=dhtmlwindow
	var sourceobj=window.event? window.event.srcElement : e.target //Get element within "handle" div mouse is currently on (the controls)
	if (/Minimize/i.test(sourceobj.getAttribute("title"))) //if this is the "minimize" control
		d.minimize(sourceobj, this._parent)
	else if (/Restore/i.test(sourceobj.getAttribute("title"))) //if this is the "restore" control
		d.restore(sourceobj, this._parent)
	else if (/Close/i.test(sourceobj.getAttribute("title"))) //if this is the "close" control
		d.close(this._parent)

	return false
},

minimize:function(button, t){
	dhtmlwindow.rememberattrs(t)
	button.setAttribute("src", dhtmlwindow.imagefiles[2])
	button.setAttribute("title", "Restore")
	t.state="minimized" //indicate the state of the window as being "minimized"
	t.contentarea.style.display="none"
	t.statusarea.style.display="none"
	if (typeof t.minimizeorder=="undefined"){ //stack order of minmized window on screen relative to any other minimized windows
		dhtmlwindow.minimizeorder++ //increment order
		t.minimizeorder=dhtmlwindow.minimizeorder
	}
	t.style.left="10px" //left coord of minmized window
	t.style.width="200px"
	var windowspacing=t.minimizeorder*10 //spacing (gap) between each minmized window(s)
	t.style.top=dhtmlwindow.scroll_top+dhtmlwindow.docheight-(t.handle.offsetHeight*t.minimizeorder)-windowspacing+"px"
},

restore:function(button, t){
	dhtmlwindow.getviewpoint()
	button.setAttribute("src", dhtmlwindow.imagefiles[0])
	button.setAttribute("title", "Minimize")
	t.state="fullview" //indicate the state of the window as being "fullview"
	t.style.display="block"
	t.contentarea.style.display="block"
	if (t.resizeBool) //if this window is resizable, enable the resize icon
		t.statusarea.style.display="block"
	t.style.left=parseInt(t.lastx)+dhtmlwindow.scroll_left+"px" //position window to last known x coord just before minimizing
	t.style.top=parseInt(t.lasty)+dhtmlwindow.scroll_top+"px"
	t.style.width=parseInt(t.lastwidth)+"px"
},


close:function(t){
	try{
		var closewinbol=t.onclose()
	}
	catch(err){ //In non IE browsers, all errors are caught, so just run the below
		var closewinbol=true
 }
	finally{ //In IE, not all errors are caught, so check if variable isn't defined in IE in those cases
		if (typeof closewinbol=="undefined"){
			// alert("An error has occured somwhere inside your \"onclose\" event handler")
			var closewinbol=true
		}
	}
	if (closewinbol){ //if custom event handler function returns true
		if (t.state!="minimized") //if this window isn't currently minimized
			dhtmlwindow.rememberattrs(t) //remember window's dimensions/position on the page before closing
		if (window.frames["_iframe-"+t.id]) //if this is an IFRAME DHTML window
		{
			//window.frames["_iframe-"+t.id].location.replace("about:blank")
		}
		else
			t.contentarea.innerHTML=""
		t.style.display="none"
		t.isClosed=true //tell script this window is closed (for detection in t.show())
	}
	return closewinbol
},


setopacity:function(targetobject, value){ //Sets the opacity of targetobject based on the passed in value setting (0 to 1 and in between)
	if (!targetobject)
		return
	if (targetobject.filters && targetobject.filters[0]){ //IE syntax
		if (typeof targetobject.filters[0].opacity=="number") //IE6
			targetobject.filters[0].opacity=value*100
		else //IE 5.5
			targetobject.style.filter="alpha(opacity="+value*100+")"
		}
	else if (typeof targetobject.style.MozOpacity!="undefined") //Old Mozilla syntax
		targetobject.style.MozOpacity=value
	else if (typeof targetobject.style.opacity!="undefined") //Standard opacity syntax
		targetobject.style.opacity=value
},

setfocus:function(t){ //Sets focus to the currently active window
	this.zIndexvalue++
	t.style.zIndex=this.zIndexvalue
	t.isClosed=false //tell script this window isn't closed (for detection in t.show())
	this.setopacity(this.lastactivet.handle, 0.5) //unfocus last active window
	this.setopacity(t.handle, 1) //focus currently active window
	this.lastactivet=t //remember last active window
},


show:function(t){
	if (t.isClosed){
		alert("DHTML Window has been closed, so nothing to show. Open/Create the window again.")
		return
	}
	if (t.lastx) //If there exists previously stored information such as last x position on window attributes (meaning it's been minimized or closed)
		dhtmlwindow.restore(t.controls.firstChild, t) //restore the window using that info
	else
		t.style.display="block"
	this.setfocus(t)
	t.state="fullview" //indicate the state of the window as being "fullview"
},

hide:function(t){
	t.style.display="none"
},

ajax_connect:function(url, t){
	var page_request = false
	var bustcacheparameter=""
	if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc
		page_request = new XMLHttpRequest()
	else if (window.ActiveXObject){ // if IE6 or below
		try {
		page_request = new ActiveXObject("Msxml2.XMLHTTP")
		} 
		catch (e){
			try{
			page_request = new ActiveXObject("Microsoft.XMLHTTP")
			}
			catch (e){}
		}
	}
	else
		return false
	t.contentarea.innerHTML=this.ajaxloadinghtml
	page_request.onreadystatechange=function(){dhtmlwindow.ajax_loadpage(page_request, t)}
	if (this.ajaxbustcache) //if bust caching of external page
		bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
	page_request.open('GET', url+bustcacheparameter, true)
	page_request.send(null)
},

ajax_loadpage:function(page_request, t){
	if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
	t.contentarea.innerHTML=page_request.responseText
	}
},


stop:function(){
	dhtmlwindow.etarget=null //clean up
	document.onmousemove=null
	document.onmouseup=null
},

addEvent:function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
	var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false)
	else if (target.attachEvent)
		target.attachEvent(tasktype, functionref)
},

cleanup:function(){
	for (var i=0; i<dhtmlwindow.tobjects.length; i++){
		dhtmlwindow.tobjects[i].handle._parent=dhtmlwindow.tobjects[i].resizearea._parent=dhtmlwindow.tobjects[i].controls._parent=null
	}
	window.onload=null
}

} //End dhtmlwindow object

document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>') //container that holds all dhtml window divs on page
window.onunload=dhtmlwindow.cleanup

function autoReSize(mainDiv, model){
   	divheight = document.getElementById(mainDiv).offsetHeight;
	dhtmlwindow.doResize(model, 570, divheight);	     	
}


























/*sifr.js*/

/*=:project
 scalable Inman Flash Replacement (sIFR) version 3, revision 419

 =:file
	Copyright: 2006 Mark Wubben.
	Author: Mark Wubben, <http://novemberborn.net/>

 =:history
	* IFR: Shaun Inman
	* sIFR 1: Mike Davidson, Shaun Inman and Tomas Jogin
	* sIFR 2: Mike Davidson, Shaun Inman, Tomas Jogin and Mark Wubben

 =:license
	This software is licensed and provided under the CC-GNU LGPL.
	See <http://creativecommons.org/licenses/LGPL/2.1/>	
*/
/*Defect 107: Added null check before using the veriable.Start*/
var sIFR=new function(){var O=this;var E={ACTIVE:"sIFR-active",REPLACED:"sIFR-replaced",IGNORE:"sIFR-ignore",ALTERNATE:"sIFR-alternate",CLASS:"sIFR-class",LAYOUT:"sIFR-layout",FLASH:"sIFR-flash",FIX_FOCUS:"sIFR-fixfocus",DUMMY:"sIFR-dummy"};E.IGNORE_CLASSES=[E.REPLACED,E.IGNORE,E.ALTERNATE];this.MIN_FONT_SIZE=6;this.MAX_FONT_SIZE=126;this.FLASH_PADDING_BOTTOM=5;this.VERSION="419";this.isActive=false;this.isEnabled=true;this.fixHover=true;this.autoInitialize=true;this.setPrefetchCookie=true;this.cookiePath="/";this.domains=[];this.forceWidth=true;this.fitExactly=false;this.forceTextTransform=true;this.useDomLoaded=false;this.useStyleCheck=false;this.hasFlashClassSet=false;this.repaintOnResize=true;this.replacements=[];var L=0;var R=false;function Y(){}function D(c){function d(e){return e.toLocaleUpperCase()}this.normalize=function(e){return e.replace(/\n|\r|\xA0/g,D.SINGLE_WHITESPACE).replace(/\s+/g,D.SINGLE_WHITESPACE)};this.textTransform=function(e,f){switch(e){case"uppercase":return f.toLocaleUpperCase();case"lowercase":return f.toLocaleLowerCase();case"capitalize":return f.replace(/^\w|\s\w/g,d)}return f};this.toHexString=function(e){if(e.charAt(0)!="#"||e.length!=4&&e.length!=7){return e}e=e.substring(1);return"0x"+(e.length==3?e.replace(/(.)(.)(.)/,"$1$1$2$2$3$3"):e)};this.toJson=function(g,f){var e="";switch(typeof (g)){case"string":e='"'+f(g)+'"';break;case"number":case"boolean":e=g.toString();break;case"object":e=[];for(var h in g){if(g[h]==Object.prototype[h]){continue}e.push('"'+h+'":'+this.toJson(g[h]))}e="{"+e.join(",")+"}";break}return e};this.convertCssArg=function(e){if(!e){return{}}if(typeof (e)=="object"){if(e.constructor==Array){e=e.join("")}else{return e}}var l={};var m=e.split("}");for(var h=0;h<m.length;h++){var k=m[h].match(/([^\s{]+)\s*\{(.+)\s*;?\s*/);if(!k||k.length!=3){continue}if(!l[k[1]]){l[k[1]]={}}var g=k[2].split(";");for(var f=0;f<g.length;f++){var n=g[f].match(/\s*([^:\s]+)\s*\:\s*([^;]+)/);if(!n||n.length!=3){continue}l[k[1]][n[1]]=n[2].replace(/\s+$/,"")}}return l};this.extractFromCss=function(g,f,i,e){var h=null;if(g&&g[f]&&g[f][i]){h=g[f][i];if(e){delete g[f][i]}}return h};this.cssToString=function(f){var g=[];for(var e in f){var j=f[e];if(j==Object.prototype[e]){continue}g.push(e,"{");for(var i in j){if(j[i]==Object.prototype[i]){continue}var h=j[i];if(D.UNIT_REMOVAL_PROPERTIES[i]){h=parseInt(h,10)}g.push(i,":",h,";")}g.push("}")}return g.join("")};this.escape=function(e){return escape(e).replace(/\+/g,"%2B")};this.encodeVars=function(e){return e.join("&").replace(/%/g,"%25")};this.copyProperties=function(g,f){for(var e in g){if(f[e]===undefined){f[e]=g[e]}}return f};this.domain=function(){var f="";try{f=document.domain}catch(g){}return f};this.domainMatches=function(h,g){if(g=="*"||g==h){return true}var f=g.lastIndexOf("*");if(f>-1){g=g.substr(f+1);var e=h.lastIndexOf(g);if(e>-1&&(e+g.length)==h.length){return true}}return false};this.uriEncode=function(e){return encodeURI(decodeURIComponent(e))};this.delay=function(f,h,g){var e=Array.prototype.slice.call(arguments,3);setTimeout(function(){h.apply(g,e)},f)}}D.UNIT_REMOVAL_PROPERTIES={leading:true,"margin-left":true,"margin-right":true,"text-indent":true};D.SINGLE_WHITESPACE=" ";function U(e){var d=this;function c(g,j,h){var k=d.getStyleAsInt(g,j,e.ua.ie);if(k==0){k=g[h];for(var f=3;f<arguments.length;f++){k-=d.getStyleAsInt(g,arguments[f],true)}}return k}this.getBody=function(){return document.getElementsByTagName("body")[0]||null};this.querySelectorAll=function(f){return window.parseSelector(f)};this.addClass=function(f,g){if(g){g.className=((g.className||"")==""?"":g.className+" ")+f}};this.removeClass=function(f,g){if(g){g.className=g.className.replace(new RegExp("(^|\\s)"+f+"(\\s|$)"),"").replace(/^\s+|(\s)\s+/g,"$1")}};this.hasClass=function(f,g){return new RegExp("(^|\\s)"+f+"(\\s|$)").test(g.className)};this.hasOneOfClassses=function(h,g){for(var f=0;f<h.length;f++){if(this.hasClass(h[f],g)){return true}}return false};this.ancestorHasClass=function(g,f){g=g.parentNode;while(g&&g.nodeType==1){if(this.hasClass(f,g)){return true}g=g.parentNode}return false};this.create=function(f,g){var h=document.createElementNS?document.createElementNS(U.XHTML_NS,f):document.createElement(f);if(g){h.className=g}return h};this.getComputedStyle=function(h,i){var f;if(document.defaultView&&document.defaultView.getComputedStyle){var g=document.defaultView.getComputedStyle(h,null);f=g?g[i]:null}else{if(h.currentStyle){f=h.currentStyle[i]}}return f||""};this.getStyleAsInt=function(g,i,f){var h=this.getComputedStyle(g,i);if(f&&!/px$/.test(h)){return 0}return parseInt(h)||0};this.getWidthFromStyle=function(f){return c(f,"width","offsetWidth","paddingRight","paddingLeft","borderRightWidth","borderLeftWidth")};this.getHeightFromStyle=function(f){return c(f,"height","offsetHeight","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth")};this.getDimensions=function(j){var h=j.offsetWidth;var f=j.offsetHeight;if(h==0||f==0){for(var g=0;g<j.childNodes.length;g++){var k=j.childNodes[g];if(k.nodeType!=1){continue}h=Math.max(h,k.offsetWidth);f=Math.max(f,k.offsetHeight)}}return{width:h,height:f}};this.getViewport=function(){return{width:window.innerWidth||document.documentElement.clientWidth||this.getBody().clientWidth,height:window.innerHeight||document.documentElement.clientHeight||this.getBody().clientHeight}};this.blurElement=function(g){try{g.blur();return }catch(h){}var f=this.create("input");f.style.width="0px";f.style.height="0px";g.parentNode.appendChild(f);f.focus();f.blur();f.parentNode.removeChild(f)}}U.XHTML_NS="http://www.w3.org/1999/xhtml";function H(r){var g=navigator.userAgent.toLowerCase();var q=(navigator.product||"").toLowerCase();var h=navigator.platform.toLowerCase();this.parseVersion=H.parseVersion;this.macintosh=/^mac/.test(h);this.windows=/^win/.test(h);this.quicktime=false;this.opera=/opera/.test(g);this.konqueror=/konqueror/.test(q);this.ie=false/*@cc_on||true@*/;this.ieSupported=this.ie&&!/ppc|smartphone|iemobile|msie\s5\.5/.test(g)/*@cc_on&&@_jscript_version>=5.5@*/;this.ieWin=this.ie&&this.windows/*@cc_on&&@_jscript_version>=5.1@*/;this.windows=this.windows&&(!this.ie||this.ieWin);this.ieMac=this.ie&&this.macintosh/*@cc_on&&@_jscript_version<5.1@*/;this.macintosh=this.macintosh&&(!this.ie||this.ieMac);this.safari=/safari/.test(g);this.webkit=!this.konqueror&&/applewebkit/.test(g);this.khtml=this.webkit||this.konqueror;this.gecko=!this.webkit&&q=="gecko";this.ieVersion=this.ie&&/.*msie\s(\d\.\d)/.exec(g)?this.parseVersion(RegExp.$1):"0";this.operaVersion=this.opera&&/.*opera(\s|\/)(\d+\.\d+)/.exec(g)?this.parseVersion(RegExp.$2):"0";this.webkitVersion=this.webkit&&/.*applewebkit\/(\d+).*/.exec(g)?this.parseVersion(RegExp.$1):"0";this.geckoVersion=this.gecko&&/.*rv:\s*([^\)]+)\)\s+gecko/.exec(g)?this.parseVersion(RegExp.$1):"0";this.konquerorVersion=this.konqueror&&/.*konqueror\/([\d\.]+).*/.exec(g)?this.parseVersion(RegExp.$1):"0";this.flashVersion=0;if(this.ieWin){var l;var o=false;try{l=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(m){try{l=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");this.flashVersion=this.parseVersion("6");l.AllowScriptAccess="always"}catch(m){o=this.flashVersion==this.parseVersion("6")}if(!o){try{l=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(m){}}}if(!o&&l){this.flashVersion=this.parseVersion((l.GetVariable("$version")||"").replace(/^\D+(\d+)\D+(\d+)\D+(\d+).*/g,"$1.$2.$3"))}}else{if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){var n=navigator.plugins["Shockwave Flash"].description.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var p=n.replace(/^\D*(\d+\.\d+).*$/,"$1");if(/r/.test(n)){p+=n.replace(/^.*r(\d*).*$/,".$1")}else{if(/d/.test(n)){p+=".0"}}this.flashVersion=this.parseVersion(p);var j=false;for(var k=0,c=this.flashVersion>=H.MIN_FLASH_VERSION;c&&k<navigator.mimeTypes.length;k++){var f=navigator.mimeTypes[k];if(f.type!="application/x-shockwave-flash"){continue}if(f.enabledPlugin){j=true;if(f.enabledPlugin.description.toLowerCase().indexOf("quicktime")>-1){c=false;this.quicktime=true}}}if(this.quicktime||!j){this.flashVersion=this.parseVersion("0")}}}this.flash=this.flashVersion>=H.MIN_FLASH_VERSION;this.transparencySupport=this.macintosh||this.windows;this.computedStyleSupport=this.ie||!!document.defaultView.getComputedStyle;this.fixFocus=this.gecko&&this.windows;this.nativeDomLoaded=this.gecko||this.webkit&&this.webkitVersion>=this.parseVersion("525")||this.konqueror&&this.konquerorMajor>this.parseVersion("03")||this.opera;this.mustCheckStyle=this.khtml||this.opera;this.forcePageLoad=this.webkit&&this.webkitVersion<this.parseVersion("523");this.properDocument=typeof (document.location)=="object";this.supported=this.flash&&this.properDocument&&(!this.ie||this.ieSupported)&&this.computedStyleSupport&&(!this.opera||this.operaVersion>=this.parseVersion("9.50"))&&(!this.webkit||this.webkitVersion>=this.parseVersion("412"))&&(!this.gecko||this.geckoVersion>=this.parseVersion("1.8.0.12"))&&(!this.konqueror)}H.parseVersion=function(c){return c.replace(/(^|\D)(\d+)(?=\D|$)/g,function(f,e,g){f=e;for(var d=4-g.length;d>=0;d--){f+="0"}return f+g})};H.MIN_FLASH_VERSION=H.parseVersion("8");function F(c){this.fix=c.ua.ieWin&&window.location.hash!="";var d;this.cache=function(){d=document.title};function e(){document.title=d}this.restore=function(){if(this.fix){setTimeout(e,0)}}}function S(l){var e=null;function c(){try{if(l.ua.ie||document.readyState!="loaded"&&document.readyState!="complete"){document.documentElement.doScroll("left")}}catch(n){return setTimeout(c,10)}i()}function i(){if(l.useStyleCheck){h()}else{if(!l.ua.mustCheckStyle){d(null,true)}}}function h(){e=l.dom.create("div",E.DUMMY);l.dom.getBody().appendChild(e);m()}function m(){if(l.dom.getComputedStyle(e,"marginLeft")=="42px"){g()}else{setTimeout(m,10)}}function g(){if(e&&e.parentNode){e.parentNode.removeChild(e)}e=null;d(null,true)}function d(n,o){l.initialize(o);if(n&&n.type=="load"){if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",d,false)}if(window.removeEventListener){window.removeEventListener("load",d,false)}}}function j(){l.prepareClearReferences();if(document.readyState=="interactive"){document.attachEvent("onstop",f);setTimeout(function(){document.detachEvent("onstop",f)},0)}}function f(){document.detachEvent("onstop",f);k()}function k(){l.clearReferences()}this.attach=function(){if(window.addEventListener){window.addEventListener("load",d,false)}else{window.attachEvent("onload",d)}if(!l.useDomLoaded||l.ua.forcePageLoad||l.ua.ie&&window.top!=window){return }if(l.ua.nativeDomLoaded){document.addEventListener("DOMContentLoaded",i,false)}else{if(l.ua.ie||l.ua.khtml){c()}}};this.attachUnload=function(){if(!l.ua.ie){return }window.attachEvent("onbeforeunload",j);window.attachEvent("onunload",k)}}var Q="sifrFetch";function N(c){var e=false;this.fetchMovies=function(f){if(c.setPrefetchCookie&&new RegExp(";?"+Q+"=true;?").test(document.cookie)){return }try{e=true;d(f)}catch(g){if(c.debug){throw g}}if(c.setPrefetchCookie){document.cookie=Q+"=true;path="+c.cookiePath}};this.clear=function(){if(!e){return }try{var f=document.getElementsByTagName("script");for(var g=f.length-1;g>=0;g--){var h=f[g];if(h.type=="sifr/prefetch"){h.parentNode.removeChild(h)}}}catch(j){}};function d(f){for(var g=0;g<f.length;g++){document.write('<script defer type="sifr/prefetch" src="'+f[g].src+'"><\/script>')}}}function b(e){var g=e.ua.ie;var f=g&&e.ua.flashVersion<e.ua.parseVersion("9.0.115");var d={};var c={};this.fixFlash=f;this.register=function(h){if(!g){return }var i=h.getAttribute("id");this.cleanup(i,false);c[i]=h;delete d[i];if(f){window[i]=h}};this.reset=function(){if(!g){return false}for(var j=0;j<e.replacements.length;j++){var h=e.replacements[j];var k=c[h.id];if(!d[h.id]&&(!k.parentNode||k.parentNode.nodeType==11)){h.resetMovie();d[h.id]=true}}return true};this.cleanup=function(l,h){var i=c[l];if(!i){return }for(var k in i){if(typeof (i[k])=="function"){i[k]=null}}c[l]=null;if(f){window[l]=null}if(i.parentNode){if(h&&i.parentNode.nodeType==1){var j=document.createElement("div");j.style.width=i.offsetWidth+"px";j.style.height=i.offsetHeight+"px";i.parentNode.replaceChild(j,i)}else{i.parentNode.removeChild(i)}}};this.prepareClearReferences=function(){if(!f){return }__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}};this.clearReferences=function(){if(f){var j=document.getElementsByTagName("object");for(var h=j.length-1;h>=0;h--){c[j[h].getAttribute("id")]=j[h]}}for(var k in c){if(Object.prototype[k]!=c[k]){this.cleanup(k,true)}}}}function K(d,g,f,c,e){this.sIFR=d;this.id=g;this.vars=f;this.movie=null;this.__forceWidth=c;this.__events=e;this.__resizing=0}K.prototype={getFlashElement:function(){return document.getElementById(this.id)},getAlternate:function(){return document.getElementById(this.id+"_alternate")},getAncestor:function(){var c=this.getFlashElement().parentNode;return !this.sIFR.dom.hasClass(E.FIX_FOCUS,c)?c:c.parentNode},available:function(){var c=this.getFlashElement();return c&&c.parentNode},call:function(c){var d=this.getFlashElement();return Function.prototype.apply.call(d[c],d,Array.prototype.slice.call(arguments,1))},attempt:function(){if(!this.available()){return false}try{this.call.apply(this,arguments)}catch(c){if(this.sIFR.debug){throw c}return false}return true},updateVars:function(c,e){for(var d=0;d<this.vars.length;d++){if(this.vars[d].split("=")[0]==c){this.vars[d]=c+"="+e;break}}var f=this.sIFR.util.encodeVars(this.vars);this.movie.injectVars(this.getFlashElement(),f);this.movie.injectVars(this.movie.html,f)},storeSize:function(c,d){this.movie.setSize(c,d);this.updateVars(c,d)},fireEvent:function(c){if(this.available()&&this.__events[c]){this.sIFR.util.delay(0,this.__events[c],this,this)}},resizeFlashElement:function(c,d,e){if(!this.available()){return }this.__resizing++;var f=this.getFlashElement();f.setAttribute("height",c);this.updateVars("renderheight",c);this.storeSize("height",c);if(d!==null){f.setAttribute("width",d);this.movie.setSize("width",d)}if(this.__events.onReplacement){this.sIFR.util.delay(0,this.__events.onReplacement,this,this);delete this.__events.onReplacement}if(e){this.sIFR.util.delay(0,function(){this.attempt("scaleMovie");this.__resizing--},this)}else{this.__resizing--}},blurFlashElement:function(){if(this.available()){this.sIFR.dom.blurElement(this.getFlashElement())}},resetMovie:function(){this.sIFR.util.delay(0,this.movie.reset,this.movie,this.getFlashElement(),this.getAlternate())},resizeAfterScale:function(){if(this.available()&&this.__resizing==0){this.sIFR.util.delay(0,this.resize,this)}},resize:function(){if(!this.available()){return }this.__resizing++;var g=this.getFlashElement();var f=g.offsetWidth;if(f==0){return }var e=g.getAttribute("width");var l=g.getAttribute("height");var m=this.getAncestor();var o=this.sIFR.dom.getHeightFromStyle(m);g.style.width="1px";g.style.height="1px";m.style.minHeight=o+"px";var c=this.getAlternate().childNodes;var n=[];for(var k=0;k<c.length;k++){var h=c[k].cloneNode(true);n.push(h);m.appendChild(h)}var d=this.sIFR.dom.getWidthFromStyle(m);for(var k=0;k<n.length;k++){m.removeChild(n[k])}g.style.width=g.style.height=m.style.minHeight="";g.setAttribute("width",this.__forceWidth?d:e);g.setAttribute("height",l);if(sIFR.ua.ie){g.style.display="none";var j=g.offsetHeight;g.style.display=""}if(d!=f){if(this.__forceWidth){this.storeSize("width",d)}this.attempt("resize",d)}this.__resizing--},replaceText:function(g,j){var d=this.sIFR.util.escape(g);if(!this.attempt("replaceText",d)){return false}this.updateVars("content",d);var f=this.getAlternate();if(j){while(f.firstChild){f.removeChild(f.firstChild)}for(var c=0;c<j.length;c++){f.appendChild(j[c])}}else{try{f.innerHTML=g}catch(h){}}return true},changeCSS:function(c){c=this.sIFR.util.escape(this.sIFR.util.cssToString(this.sIFR.util.convertCssArg(c)));this.updateVars("css",c);return this.attempt("changeCSS",c)},remove:function(){if(this.movie&&this.available()){this.movie.remove(this.getFlashElement(),this.id)}}};var X=new function(){this.create=function(p,n,j,i,f,e,g,o,l,h,m){var k=p.ua.ie?d:c;return new k(p,n,j,i,f,e,g,o,["flashvars",l,"wmode",h,"bgcolor",m,"allowScriptAccess","always","quality","best"])};function c(s,q,l,h,f,e,g,r,n){var m=s.dom.create("object",E.FLASH);var p=["type","application/x-shockwave-flash","id",f,"name",f,"data",e,"width",g,"height",r];for(var o=0;o<p.length;o+=2){m.setAttribute(p[o],p[o+1])}var j=m;if(h){j=W.create("div",E.FIX_FOCUS);j.appendChild(m)}for(var o=0;o<n.length;o+=2){if(n[o]=="name"){continue}var k=W.create("param");k.setAttribute("name",n[o]);k.setAttribute("value",n[o+1]);m.appendChild(k)}while(l.firstChild){l.removeChild(l.firstChild)}l.appendChild(j);this.html=j.cloneNode(true)}c.prototype={reset:function(e,f){e.parentNode.replaceChild(this.html.cloneNode(true),e)},remove:function(e,f){e.parentNode.removeChild(e)},setSize:function(e,f){this.html.setAttribute(e,f)},injectVars:function(e,g){var h=e.getElementsByTagName("param");for(var f=0;f<h.length;f++){if(h[f].getAttribute("name")=="flashvars"){h[f].setAttribute("value",g);break}}}};function d(p,n,j,h,f,e,g,o,k){this.dom=p.dom;this.broken=n;this.html='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+f+'" width="'+g+'" height="'+o+'" class="'+E.FLASH+'"><param name="movie" value="'+e+'"></param></object>';var m="";for(var l=0;l<k.length;l+=2){m+='<param name="'+k[l]+'" value="'+k[l+1]+'"></param>'}this.html=this.html.replace(/(<\/object>)/,m+"$1");j.innerHTML=this.html;this.broken.register(j.firstChild)}d.prototype={reset:function(f,g){g=g.cloneNode(true);var e=f.parentNode;e.innerHTML=this.html;this.broken.register(e.firstChild);e.appendChild(g)},remove:function(e,f){this.broken.cleanup(f)},setSize:function(e,f){this.html=this.html.replace(e=="height"?/(height)="\d+"/:/(width)="\d+"/,'$1="'+f+'"')},injectVars:function(e,f){if(e!=this.html){return }this.html=this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/,"$1"+f)}}};this.errors=new Y(O);var A=this.util=new D(O);var W=this.dom=new U(O);var T=this.ua=new H(O);var G={fragmentIdentifier:new F(O),pageLoad:new S(O),prefetch:new N(O),brokenFlashIE:new b(O)};this.__resetBrokenMovies=G.brokenFlashIE.reset;var J={kwargs:[],replaceAll:function(d){for(var c=0;c<this.kwargs.length;c++){O.replace(this.kwargs[c])}if(!d){this.kwargs=[]}}};this.activate=function(){if(!T.supported||!this.isEnabled||this.isActive||!C()||a()){return }G.prefetch.fetchMovies(arguments);this.isActive=true;this.setFlashClass();G.fragmentIdentifier.cache();G.pageLoad.attachUnload();if(!this.autoInitialize){return }G.pageLoad.attach()};this.setFlashClass=function(){if(this.hasFlashClassSet){return }W.addClass(E.ACTIVE,W.getBody()||document.documentElement);this.hasFlashClassSet=true};this.removeFlashClass=function(){if(!this.hasFlashClassSet){return }W.removeClass(E.ACTIVE,W.getBody());W.removeClass(E.ACTIVE,document.documentElement);this.hasFlashClassSet=false};this.initialize=function(c){if(!this.isActive||!this.isEnabled){return }if(R){if(!c){J.replaceAll(false)}return }R=true;J.replaceAll(c);if(O.repaintOnResize){if(window.addEventListener){window.addEventListener("resize",Z,false)}else{window.attachEvent("onresize",Z)}}G.prefetch.clear()};this.replace=function(w,t){if(!T.supported){return }if(t){w=A.copyProperties(w,t)}if(!R){return J.kwargs.push(w)}if(this.onReplacementStart){this.onReplacementStart(w)}var AL=w.elements||W.querySelectorAll(w.selector);if(AL.length==0){return }var v=M(w.src);var AQ=A.convertCssArg(w.css);var u=B(w.filters);var AM=w.forceSingleLine===true;var AR=w.preventWrap===true&&!AM;var p=AM||(w.fitExactly==null?this.fitExactly:w.fitExactly)===true;var AC=p||(w.forceWidth==null?this.forceWidth:w.forceWidth)===true;var r=w.ratios||[];var AD=w.pixelFont===true;var q=parseInt(w.tuneHeight)||0;var y=!!w.onRelease||!!w.onRollOver||!!w.onRollOut;if(p){A.extractFromCss(AQ,".sIFR-root","text-align",true)}var s=A.extractFromCss(AQ,".sIFR-root","font-size",true)||"0";var e=A.extractFromCss(AQ,".sIFR-root","background-color",true)||"#FFFFFF";var n=A.extractFromCss(AQ,".sIFR-root","kerning",true)||"";var AV=A.extractFromCss(AQ,".sIFR-root","opacity",true)||"100";var k=A.extractFromCss(AQ,".sIFR-root","cursor",true)||"default";var AO=parseInt(A.extractFromCss(AQ,".sIFR-root","leading"))||0;var AI=w.gridFitType||(A.extractFromCss(AQ,".sIFR-root","text-align")=="right")?"subpixel":"pixel";var h=this.forceTextTransform===false?"none":A.extractFromCss(AQ,".sIFR-root","text-transform",true)||"none";s=/^\d+(px)?$/.test(s)?parseInt(s):0;AV=parseFloat(AV)<1?100*parseFloat(AV):AV;var AB=w.modifyCss?"":A.cssToString(AQ);var AF=w.wmode||"";if(!AF){if(w.transparent){AF="transparent"}else{if(w.opaque){AF="opaque"}}}if(AF=="transparent"){if(!T.transparencySupport){AF="opaque"}else{e="transparent"}}for(var AU=0;AU<AL.length;AU++){var AE=AL[AU];if(W.hasOneOfClassses(E.IGNORE_CLASSES,AE)||W.ancestorHasClass(AE,E.ALTERNATE)){continue}var AN=W.getDimensions(AE);var f=AN.height;var c=AN.width;var z=W.getComputedStyle(AE,"display");if(!f||!c||!z||z=="none"){continue}c=W.getWidthFromStyle(AE);var m,AG;if(!s){var AK=I(AE);m=Math.min(this.MAX_FONT_SIZE,Math.max(this.MIN_FONT_SIZE,AK.fontSize));if(AD){m=Math.max(8,8*Math.round(m/8))}AG=AK.lines;if(isNaN(AG)||!isFinite(AG)||AG==0){AG=1}if(AG>1&&AO){f+=Math.round((AG-1)*AO)}}else{m=s;AG=1}var d=W.create("span",E.ALTERNATE);var AW=AE.cloneNode(true);AE.parentNode.appendChild(AW);for(var AT=0,AS=AW.childNodes.length;AT<AS;AT++){d.appendChild(AW.childNodes[AT].cloneNode(true))}if(w.modifyContent){w.modifyContent(AW,w.selector)}if(w.modifyCss){AB=w.modifyCss(AQ,AW,w.selector)}var o=P(AW,h,w.uriEncode);AW.parentNode.removeChild(AW);if(w.modifyContentString){o.text=w.modifyContentString(o.text,w.selector)}if(o.text==""){continue}f=Math.round(AG*m);var AJ=Math.round(AG*V(m,r)*m)+this.FLASH_PADDING_BOTTOM+q;var AA=AC?c:"100%";var AH="sIFR_replacement_"+L++;var AP=["id="+AH,"content="+A.escape(o.text),"width="+c,"height="+f,"renderheight="+AJ,"link="+A.escape(o.primaryLink.href||""),"target="+A.escape(o.primaryLink.target||""),"size="+m,"css="+A.escape(AB),"cursor="+k,"tunewidth="+(w.tuneWidth||0),"tuneheight="+q,"offsetleft="+(w.offsetLeft||""),"offsettop="+(w.offsetTop||""),"fitexactly="+p,"preventwrap="+AR,"forcesingleline="+AM,"antialiastype="+(w.antiAliasType||""),"thickness="+(w.thickness||""),"sharpness="+(w.sharpness||""),"kerning="+n,"gridfittype="+AI,"flashfilters="+u,"opacity="+AV,"blendmode="+(w.blendMode||""),"selectable="+(w.selectable==null||AF!=""&&!sIFR.ua.macintosh&&sIFR.ua.gecko&&sIFR.ua.geckoVersion>=sIFR.ua.parseVersion("1.9")?"true":w.selectable===true),"fixhover="+(this.fixHover===true),"events="+y,"delayrun="+G.brokenFlashIE.fixFlash,"version="+this.VERSION];var x=A.encodeVars(AP);var g=new K(O,AH,AP,AC,{onReplacement:w.onReplacement,onRollOver:w.onRollOver,onRollOut:w.onRollOut,onRelease:w.onRelease});g.movie=X.create(sIFR,G.brokenFlashIE,AE,T.fixFocus&&w.fixFocus,AH,v,AA,AJ,x,AF,e);this.replacements.push(g);this.replacements[AH]=g;if(w.selector){if(!this.replacements[w.selector]){this.replacements[w.selector]=[g]}else{this.replacements[w.selector].push(g)}}d.setAttribute("id",AH+"_alternate");AE.appendChild(d);W.addClass(E.REPLACED,AE)}G.fragmentIdentifier.restore()};this.getReplacementByFlashElement=function(d){for(var c=0;c<O.replacements.length;c++){if(O.replacements[c].id==d.getAttribute("id")){return O.replacements[c]}}};this.redraw=function(){for(var c=0;c<O.replacements.length;c++){O.replacements[c].resetMovie()}};this.prepareClearReferences=function(){ if(G!=null){G.brokenFlashIE.prepareClearReferences()}};this.clearReferences=function(){G.brokenFlashIE.clearReferences();G=null;J=null;delete O.replacements};function C(){if(O.domains.length==0){return true}var d=A.domain();for(var c=0;c<O.domains.length;c++){if(A.domainMatches(d,O.domains[c])){return true}}return false}function a(){if(document.location.protocol=="file:"){if(O.debug){O.errors.fire("isFile")}return true}return false}function M(c){if(T.ie&&c.charAt(0)=="/"){c=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+c}return c}function V(d,e){for(var c=0;c<e.length;c+=2){if(d<=e[c]){return e[c+1]}}return e[e.length-1]||1}function B(g){var e=[];for(var d in g){if(g[d]==Object.prototype[d]){continue}var c=g[d];d=[d.replace(/filter/i,"")+"Filter"];for(var f in c){if(c[f]==Object.prototype[f]){continue}d.push(f+":"+A.escape(A.toJson(c[f],A.toHexString)))}e.push(d.join(","))}return A.escape(e.join(";"))}function Z(d){var e=Z.viewport;var c=W.getViewport();if(e&&c.width==e.width&&c.height==e.height){return }Z.viewport=c;if(O.replacements.length==0){return }if(Z.timer){clearTimeout(Z.timer)}Z.timer=setTimeout(function(){delete Z.timer;for(var f=0;f<O.replacements.length;f++){O.replacements[f].resize()}},200)}function I(g){var h,d;if(!T.ie){h=W.getStyleAsInt(g,"lineHeight");d=Math.floor(W.getStyleAsInt(g,"height")/h)}else{if(T.ie){var h=W.getComputedStyle(g,"fontSize");if(h.indexOf("px")>0){h=parseInt(h)}else{var f=g.innerHTML;g.style.visibility="visible";g.style.overflow="visible";g.style.position="static";g.style.zoom="normal";g.style.writingMode="lr-tb";g.style.width=g.style.height="auto";g.style.maxWidth=g.style.maxHeight=g.style.styleFloat="none";var i=g;var c=g.currentStyle.hasLayout;if(c){g.innerHTML='<div class="'+E.LAYOUT+'">X<br>X<br>X</div>';i=g.firstChild}else{g.innerHTML="X<br>X<br>X"}var e=i.getClientRects();h=e[1].bottom-e[1].top;h=Math.ceil(h*0.8);if(c){g.innerHTML='<div class="'+E.LAYOUT+'">'+f+"</div>";i=g.firstChild}else{g.innerHTML=f}e=i.getClientRects();d=e.length;if(c){g.innerHTML=f}g.style.visibility=g.style.width=g.style.height=g.style.maxWidth=g.style.maxHeight=g.style.overflow=g.style.styleFloat=g.style.position=g.style.zoom=g.style.writingMode=""}}}return{fontSize:h,lines:d}}function P(c,g,s){s=s||A.uriEncode;var q=[],m=[];var k=null;var e=c.childNodes;var o=false,p=false;var j=0;while(j<e.length){var f=e[j];if(f.nodeType==3){var t=A.textTransform(g,A.normalize(f.nodeValue)).replace(/</g,"&lt;");if(o&&p){t=t.replace(/^\s+/,"")}m.push(t);o=/\s$/.test(t);p=false}if(f.nodeType==1&&!/^(style|script)$/i.test(f.nodeName)){var h=[];var r=f.nodeName.toLowerCase();var n=f.className||"";if(/\s+/.test(n)){if(n.indexOf(E.CLASS)>-1){n=n.match("(\\s|^)"+E.CLASS+"-([^\\s$]*)(\\s|$)")[2]}else{n=n.match(/^([^\s]+)/)[1]}}if(n!=""){h.push('class="'+n+'"')}if(r=="a"){var d=s(f.getAttribute("href")||"");var l=f.getAttribute("target")||"";h.push('href="'+d+'"','target="'+l+'"');if(!k){k={href:d,target:l}}}m.push("<"+r+(h.length>0?" ":"")+h.join(" ")+">");p=true;if(f.hasChildNodes()){q.push(j);j=0;e=f.childNodes;continue}else{if(!/^(br|img)$/i.test(f.nodeName)){m.push("</",f.nodeName.toLowerCase(),">")}}}if(q.length>0&&!f.nextSibling){do{j=q.pop();e=f.parentNode.parentNode.childNodes;f=e[j];if(f){m.push("</",f.nodeName.toLowerCase(),">")}}while(j==e.length-1&&q.length>0)}j++}return{text:m.join("").replace(/^\s+|\s+$|\s*(<br>)\s*/g,"$1"),primaryLink:k||{}}}};
var parseSelector=(function(){var B=/\s*,\s*/;var A=/\s*([\s>+~(),]|^|$)\s*/g;var L=/([\s>+~,]|[^(]\+|^)([#.:@])/g;var F=/(^|\))[^\s>+~]/g;var M=/(\)|^)/;var K=/[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;function H(R,P){P=P||document.documentElement;var S=R.split(B),X=[];for(var U=0;U<S.length;U++){var N=[P],W=G(S[U]);for(var T=0;T<W.length;){var Q=W[T++],O=W[T++],V="";if(W[T]=="("){while(W[T++]!=")"&&T<W.length){V+=W[T]}V=V.slice(0,-1)}N=I(N,Q,O,V)}X=X.concat(N)}return X}function G(N){var O=N.replace(A,"$1").replace(L,"$1*$2").replace(F,D);return O.match(K)||[]}function D(N){return N.replace(M,"$1 ")}function I(N,P,Q,O){return(H.selectors[P])?H.selectors[P](N,Q,O):[]}var E={toArray:function(O){var N=[];for(var P=0;P<O.length;P++){N.push(O[P])}return N}};var C={isTag:function(O,N){return(N=="*")||(N.toLowerCase()==O.nodeName.toLowerCase())},previousSiblingElement:function(N){do{N=N.previousSibling}while(N&&N.nodeType!=1);return N},nextSiblingElement:function(N){do{N=N.nextSibling}while(N&&N.nodeType!=1);return N},hasClass:function(N,O){return(O.className||"").match("(^|\\s)"+N+"(\\s|$)")},getByTag:function(N,O){return O.getElementsByTagName(N)}};var J={"#":function(N,P){for(var O=0;O<N.length;O++){if(N[O].getAttribute("id")==P){return[N[O]]}}return[]}," ":function(O,Q){var N=[];for(var P=0;P<O.length;P++){N=N.concat(E.toArray(C.getByTag(Q,O[P])))}return N},">":function(O,R){var N=[];for(var Q=0,S;Q<O.length;Q++){S=O[Q];for(var P=0,T;P<S.childNodes.length;P++){T=S.childNodes[P];if(T.nodeType==1&&C.isTag(T,R)){N.push(T)}}}return N},".":function(O,Q){var N=[];for(var P=0,R;P<O.length;P++){R=O[P];if(C.hasClass([Q],R)){N.push(R)}}return N},":":function(N,P,O){return(H.pseudoClasses[P])?H.pseudoClasses[P](N,O):[]}};H.selectors=J;H.pseudoClasses={};H.util=E;H.dom=C;return H})();
/*Defect 107: Added null check before using the veriable.End*/


/*sifr-config.js*/

var cochin = {
 src: '/ub/framework/skins/ubankonline/flash/cochin.swf'
};

sIFR.activate(cochin);


sIFR.replace(cochin, {
 selector: 'h1.largeWhite'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#FFFFFF', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h1'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#FFFFFF', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h1.green'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h2.RHSBannerTitle'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h2.darkGreenBig'
	,css: {
		'.sIFR-root': { 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h1.medGreen'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h2'
	,css: {
		'.sIFR-root': { 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h2.medWhite'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#FFFFFF', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});
/* Added By Lilly for center panel*/
sIFR.replace(cochin, {
 selector: 'h1.medWhite'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#FFFFFF', 'letter-spacing': 0.1, 'CURSOR': 'hand'}
	}
	,wmode:'transparent'
});
/* Added By Lilly for right panel*/

sIFR.replace(cochin, {
 selector: 'h1.largeWhiteFailedKyc'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#FFFFFF', 'letter-spacing': 0.2, 'CURSOR': 'hand'}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h1.whiteForRhs'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#FFFFFF', 'letter-spacing': 0.1, 'CURSOR': 'hand'}
	}
	,wmode:'transparent'
});
/* Added By Lilly */
sIFR.replace(cochin, {
 selector: 'h1.smallWhite'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#FFFFFF', 'letter-spacing': 0.1, 'CURSOR': 'true', 'width':'50px'}
	}
	,wmode:'transparent'
});


sIFR.replace(cochin, {
 selector: 'h2.call'
	,css: {
		'.sIFR-root': { 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h2.phoneNum'
	,css: {
		'.sIFR-root': { 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h2.startApp'
	,css: {
		'.sIFR-root': { 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h2.medGreen'
	,css: {
		'.sIFR-root': { 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});


sIFR.replace(cochin, {
 selector: 'h2.smallGreen'
	,css: {
		'.sIFR-root': { 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h3.smallGreen'
	,css: {
		'.sIFR-root': { 'color': '#004942', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h3.midGreen'
	,css: {
		'.sIFR-root': { 'color': '#004942', 'letter-spacing': 0.4}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h3.greyText'
	,css: {
		'.sIFR-root': { 'color': '#8e8e8e', 'letter-spacing': 0.4}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h3.lightGreen'
	,css: {
		'.sIFR-root': { 'color': '#6B9B3A', 'letter-spacing': 0.4}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h3.lightGreenFailedKyc'
	,css: {
		'.sIFR-root': { 'color': '#b3d233', 'letter-spacing': 0.4}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h3.lightGreenForBanner'
	,css: {
		'.sIFR-root': { 'color': '#b3d233', 'letter-spacing': 0.4}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h4.grey'
	,css: {
		'.sIFR-root': { 'color': '#666666', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h4.black'
	,css: {
		'.sIFR-root': { 'color': '#000000', 'letter-spacing': 0.1}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h2.ScreenLevelTitle'
	,css: {
		'.sIFR-root': {'margin':'0','padding':'0', 'color': '#004942', 'letter-spacing': 0.0}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h2.applyOnlineTitle'
	,css: {
		'.sIFR-root': {'margin':'0','padding':'0', 'color': '#004942', 'letter-spacing': 0.0}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h3.subTitleOnlineApp'
	,css: {
		'.sIFR-root': {'margin':'0','padding':'0', 'color': '#004942', 'letter-spacing': 0.0}
	}
	,wmode:'transparent'
});

sIFR.replace(cochin, {
 selector: 'h2.modalWindowTitleTxt'
	,css: {
		'.sIFR-root': {'margin':'0','padding':'0', 'color': '#004942', 'letter-spacing': 0.0}
	}
	,wmode:'transparent'
});

/* Added By Lilly for right hand portlets*/
sIFR.replace(cochin, {
 selector: 'h1.rhsPortletsHeading'
	,css: {
		'.sIFR-root': { 'background':'none', 'color': '#FFFFFF', 'letter-spacing': 0.1, 'CURSOR': 'hand'}
	}
	,wmode:'transparent'
});







/*swfobject.js*/

/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();


/*swfobjectOS.js*/
/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;


/*AC_RunActiveContent.js*/
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblclick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}


/*callOut.js*/

var offsetfromcursorX=10 //Customize x offset of tooltip
var offsetfromcursorY=-10 //Customize y offset of tooltip

var offsetdivfrompointerX=-9 //Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=-10 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

document.write('<div id="dhtmltooltip"></div>') //write out tooltip DIV
document.write('<img id="dhtmlpointer" src="/ub/framework/skins/ubankonline/images/arrow1.gif" width="10" height="15" >') //write out pointer image  

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
var stayStillInsideImage = 0

if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
var strContent = thetext.replace("\\\'","'");
tipobj.innerHTML=strContent
enabletip=true
stayStillInsideImage=0
return false
}
}

function positiontip(e){
stayStillInsideImage++;
if ((stayStillInsideImage > 1)) return;

if (enabletip){
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth){
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}

}

document.onmousemove=positiontip



/*datepicker.js*/
/**
 * Calendar Script
 * Creates a calendar widget which can be used to select the date more easily than using just a text box
 * http://www.openjs.com/scripts/ui/calendar/
 *
 */
calendar = {
	month_names: ["January","February","March","April","May","June","July","August","September","October","November","December"],
	weekdays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
	month_days: [31,28,31,30,31,30,31,31,30,31,30,31],
	//Get today's date - year, month, day and date
	today : new Date(),
	opt : {},
	data: [],

	//Functions
	/// Used to create HTML in a optimized way.
	wrt:function(txt) {
		this.data.push(txt);
	},
	
	/* Inspired by http://www.quirksmode.org/dom/getstyles.html */
	getStyle: function(ele, property){
		if (ele.currentStyle) {
			var alt_property_name = property.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});//background-color becomes backgroundColor
			var value = ele.currentStyle[property]||ele.currentStyle[alt_property_name];
		
		} else if (window.getComputedStyle) {
			property = property.replace(/([A-Z])/g,"-$1").toLowerCase();//backgroundColor becomes background-color

			var value = document.defaultView.getComputedStyle(ele,null).getPropertyValue(property);
		}
		
		//Some properties are special cases
		if(property == "opacity" && ele.filter) value = (parseFloat( ele.filter.match(/opacity\=([^)]*)/)[1] ) / 100);
		else if(property == "width" && isNaN(value)) value = ele.clientWidth || ele.offsetWidth;
		else if(property == "height" && isNaN(value)) value = ele.clientHeight || ele.offsetHeight;
		return value;
	},
	getPosition:function(ele) {
		var x = 0;
		var y = 0;
		while (ele) {
			x += ele.offsetLeft;
			y += ele.offsetTop;
			ele = ele.offsetParent;
		}
		if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") {
			x += document.body.leftMargin;
			offsetTop += document.body.topMargin;
		}
	
		var xy = new Array(x,y);
		return xy;
	},
	/// Called when the user clicks on a date in the calendar.
	selectDate:function(year,month,day) {
		var ths = _calendar_active_instance;
		document.getElementById(ths.opt["input"]).value = day + "/" + month + "/" + year; // Date format is :HARDCODE:
		ths.hideCalendar();
		document.getElementById(ths.opt["input"]).focus();
	},
	/// Creates a calendar with the date given in the argument as the selected date.
	makeCalendar:function(year, month, day) {
		year = parseInt(year);
		month= parseInt(month);
		day	 = parseInt(day);

		this.wrt("<table>");

		this.wrt("<th colspan='7' class='calendar-title'><select name='calendar-month' class='calendar-month' onChange='calendar.makeCalendar("+year+",this.value);'>");
		for(var i in this.month_names) {
			this.wrt("<option value='"+i+"'");
			if(i == month) this.wrt(" selected='selected'");
			this.wrt(">"+this.month_names[i]+"</option>");
		}
		this.wrt("</select>");
		this.wrt("<select name='calendar-year' class='calendar-year' onChange='calendar.makeCalendar(this.value, "+month+");'>");
		var current_year = this.today.getYear();
		if(current_year < 1900) current_year += 1900;
		
		for(var i=current_year-100; i<current_year+40; i++) {// Defect 1122 changed i<current_year+10 to i<current_year+100
			this.wrt("<option value='"+i+"'")
			if(i == year) this.wrt(" selected='selected'");
			this.wrt(">"+i+"</option>");
		}
		this.wrt("</select></th>");

		this.wrt("<tr class='header'>");
		for(var weekday=0; weekday<7; weekday++) this.wrt("<td>"+this.weekdays[weekday]+"</td>");
		this.wrt("</tr>");
		
		//Get the first day of this month
		var first_day = new Date(year,month,1);
		var start_day = first_day.getDay();
		
		var d = 1;
		var flag = 0;
		
		//Leap year support
		if(year % 4 == 0) this.month_days[1] = 29;
		else this.month_days[1] = 28;
		
		var days_in_this_month = this.month_days[month];

		//Create the calender
		for(var i=0;i<=5;i++) {
			if(w >= days_in_this_month) break;
			this.wrt("<tr>");
			for(var j=0;j<7;j++) {
				if(d > days_in_this_month) flag=0; //If the days has overshooted the number of days in this month, stop writing
				else if(j >= start_day && !flag) flag=1;//If the first day of this month has come, start the date writing

				if(flag) {
					var w = d, mon = month+1;
					if(w < 10)	w	= "0" + w;
					if(mon < 10)mon = "0" + mon;

					//Is it today?
					var class_name = '';
					var yea = this.today.getYear();
					if(yea < 1900) yea += 1900;

					if(yea == year && this.today.getMonth() == month && this.today.getDate() == d) class_name = " today";
					if(day == d) class_name += " selected";
					
					class_name += " " + this.weekdays[j].toLowerCase();

					this.wrt("<td class='days"+class_name+"'><a class='selectDate' href='javascript:calendar.selectDate(\""+year+"\",\""+mon+"\",\""+w+"\")'>"+w+"</a></td>");
					d++;
				} else {
					this.wrt("<td class='days'>&nbsp;</td>");
				}
			}
			this.wrt("</tr>");
		}
		this.wrt("</table>");
		
		this.wrt("<input type='button' value='Close' class='calendar-cancel' onclick='calendar.hideCalendar();' />");
		

		document.getElementById(this.opt['calendar']).innerHTML = this.data.join("");
		this.data = [];
	},
	
	/// Display the calendar - if a date exists in the input box, that will be selected in the calendar.
	showCalendar: function() {
		var input = document.getElementById(this.opt['input']);
		
		//Position the div in the correct location...
		var div = document.getElementById(this.opt['calendar']);
		var xy = this.getPosition(input);
		var width = parseInt(this.getStyle(input,'width'));
		div.style.left=(xy[0]+width+10)+"px";
		div.style.top=xy[1]+"px";

		// Show the calendar with the date in the input as the selected date
		var existing_date = new Date();
		var date_in_input = input.value;
		if(date_in_input) {
			var selected_date = false;
			var date_parts = date_in_input.split("/");
			if(date_parts.length == 3) {
				date_parts[1]--; //Month starts with 0
				selected_date = new Date(date_parts[2], date_parts[1], date_parts[0]);
			}
			if(selected_date && !isNaN(selected_date.getYear())) { //Valid date.
				existing_date = selected_date;
			}
		}
		
		var the_year = existing_date.getYear();

		if(the_year < 1900) the_year += 1900;
		this.makeCalendar(the_year, existing_date.getMonth(), existing_date.getDate());
		document.getElementById(this.opt['calendar']).style.display = "block";
		_calendar_active_instance = this;
	},
	
	/// Hides the currently show calendar.
	hideCalendar: function(instance) {
		var active_calendar_id = "";
		if(instance) active_calendar_id = instance.opt['calendar'];
		else active_calendar_id = _calendar_active_instance.opt['calendar'];
		
		if(active_calendar_id) document.getElementById(active_calendar_id).style.display = "none";
		_calendar_active_instance = {};
	},
	
	/// Setup a text input box to be a calendar box.
	set: function(input_id) {
		var input = document.getElementById(input_id);
		if(!input) return; //If the input field is not there, exit.
		
		if(!this.opt['calendar']) this.init();
		
		var ths = this;
		input.onclick=function(){};
			
	},
	
	/// Will be called once when the first input is set.
	init: function() {
		if(!this.opt['calendar'] || !document.getElementById(this.opt['calendar'])) {
			var div = document.createElement('div');
			if(!this.opt['calendar']) this.opt['calendar'] = 'calender_div_'+ Math.round(Math.random() * 100);

			div.setAttribute('id',this.opt['calendar']);
			div.className="calendar-box";

			document.getElementsByTagName("body")[0].insertBefore(div,document.getElementsByTagName("body")[0].firstChild);
		}
	}
}

function displayDatePicker(id_input){
    calendar.set(id_input);
	calendar.opt['input'] = id_input;
	calendar.showCalendar();
 }



 /*nab.js*/
/**
 Date         Defect ID           Description of Change
 04/04/2009   Onsite defect 823   Mouse right click has been disabled on both Mozilla firefox and IE                      
 15/04/2009   Onsite defect 823   Mouse right click has been enabled
 02/05/2009   Defect: 1798        slpitObject method is added.
 26/05/2009   Code review         Secured ajax call method has been added.  
*/

var formname = 'registerMemberForm';

var sessionTimeOutVar;

<!-- Show/Hide Source Information -->
function showHideSourceInfoDetails(ob){
     var elem="";
     elem=document.getElementById(ob);
     
     if(elem.value == 1 || elem.value == 3)
     {
      
     document.getElementById("divSourceCodeText").style.display = '';
     document.getElementById("divSourcCodeNews").style.display = 'none';
     }
     else if(elem.value == 4)
     {
    
      document.getElementById("divSourcCodeNews").style.display = '';
       document.getElementById("divSourceCodeText").style.display = 'none';
     }
     else
     {
      document.getElementById("divSourceCodeText").style.display = 'none';
      document.getElementById("divSourcCodeNews").style.display = 'none';
     }
}
<!-- Show/Hide Communication sources Phone/Post on load-->
function selectCommunicationSourcesOnLoad(){
	var objCommSource = document.getElementsByName(formname+":receiveUBankInfo");
	var commSourceReq = false;
	
	for(i=0; i<objCommSource.length; i++){
		if(objCommSource[i].checked==true)
			commSourceReq=true;
	}
	               
	if(commSourceReq==true ){
		document.getElementById("divCommunicationSources").style.display = '';
		return true;
	}else{
	  	document.getElementById("divCommunicationSources").style.display = 'none';
	    return true;
	}
}                

<!-- Show/Hide Other security question field-->
function IsOtherSecurityQRequest(object){
	if(object.value == 37){
	 	document.getElementById("divOtherSecurityQuestion").style.display = '';
	}else{
	    document.getElementById("divOtherSecurityQuestion").style.display = 'none';
	}
}

function changeSecurityQuest(object,fname){
	if(object.value == 37){
	 	document.getElementById("divOtherSecurityQuestion").style.display = '';
	}else{
	    document.getElementById("divOtherSecurityQuestion").style.display = 'none';
	    if(fname=='R'){
	        document.getElementById("registerMemberForm:securityQuestionOther").value='';
	    }
	    else{
	        document.getElementById("form1:inputSecurityQuestionOther").value='';
	    }    
	}
}
//function added for contextual linking
function fcdbLogonContextual(formName,target,landingFldTXN,elementId)
{
	if(eval('document.getElementById("'+formName+'").'+elementId) != null)
	{
		eval('document.getElementById("'+formName+'").'+elementId).value = landingFldTXN; 
	}
	//document.getElementById(elementId).value= landingFldTXN;
	var val = eval('document.getElementById("'+formName+'").'+elementId).value;
	//alert(landingFldTXN+"            "+val);
	fcdbLogon(formName,target,elementId);
}
<!-- Login window for FCDB-->
function fcdbLogon(formName,target,formElement) {
var scr_w, scr_w1;
var scr_h, scr_h1;
scr_w1 = 1015;
scr_h1 = 740;

if (scr_w == '800') {
scr_w1 = 785;
scr_h1 = 510;
}

var subdomain= document.domain;
document.cookie="dbcl=o;path=/;domain="+subdomain.substring(subdomain.indexOf("."));

var loginWindow = window.open ('', target, 'dependant=no,directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,titlebar=no,toolbar=no,0, 0, top=0,left=0,status=1,width=' +scr_w1+',height='+scr_h1);
document.getElementById(formName).submit();
loginWindow.focus();

if(eval('document.getElementById("'+formName+'").'+formElement) != null)
{
	var elem = eval('document.getElementById("'+formName+'").'+formElement);
	elem.value = ""; 
}
	
return false;
}

<!-- Close FCDB Login window -->
function closeFCDBWindow(target) {
var scr_w1;
var scr_h1;
scr_w1 = 0;
scr_h1 = 0;

if (document.cookie.length>0)
{
var isClosed=document.cookie.indexOf("dbcl=o");
if(isClosed > -1)
{
var loginWindow = window.open ('', target, 'dependant=no,directories=no,location=no,menubar=no,resizable=no,scrollbars=yes,titlebar=no,toolbar=no,0, 0, top=0,left=0,status=1,width=' +scr_w1+',height='+scr_h1);
loginWindow.close();
var subdomain= document.domain;
document.cookie="dbcl=acl;path=/;domain="+subdomain.substring(subdomain.indexOf("."));
return false;
}
}
}
	
/* Convert value to lower case */
function convertToLowerCase(object){
	var userinput=object.value;
	userinput=userinput.toLowerCase();
	//alert('-'+userinput+'-  -'+userinput.trim()+'-');
	object.value = jQuery.trim(userinput);
	
}

/* Clear date field */           
function clearDateField(object){
	if(null != object && object.value!= null && object.value!= ""){
        if(object.value == 'dd/mm/yyyy'){
			object.value = '';
		}
	}
}
           
/* Clear name fields */           
function clearNameFields(object){
    var firstName=document.getElementById('form1:hiddenFirstName').value;
    var lastName=document.getElementById('form1:hiddenLastName').value;
    if(null != object && object.value!= null && object.value!= "")
       {
        if(object.value == firstName || object.value == lastName){
			object.value = '';
		}
	}
}

/* Clear fields */                      
function clearFields(){
	inputs = document.getElementsByTagName('input');

	for(i=0; i<inputs.length; i++){
     	document.getElementById(inputs[i].id).value = "";
	}
}
    	   
function sendRequest(url, handler) {
    initXHR();
    xhr.onreadystatechange = handler; // set callback function
    xhr.open("GET", url, true); // open asynchronous GET request
    xhr.send(null); // send the request without params
}

function initXHR() {
   if(window.XMLHttpRequest) {
      xhr = new XMLHttpRequest();
   }
   else if(window.ActiveXObject) {
      xhr = new ActiveXObject("Microsoft.XMLHTTP");
   }
 }

/** Defect 3173 - Videos dissappear on load **/
function sendVideoRequest(url, handler) {
    initVideoXHR();
    xhrVideo.onreadystatechange = handler; // set callback function
    xhrVideo.open("GET", url, true); // open asynchronous GET request
    xhrVideo.send(null); // send the request without params
}

function initVideoXHR() {
   if(window.XMLHttpRequest) {
      xhrVideo = new XMLHttpRequest();
   }
   else if(window.ActiveXObject) {
      xhrVideo = new ActiveXObject("Microsoft.XMLHTTP");
   }
 }
/** Defect 3173 - Videos dissappear on load **/
      
 function sendPostRequest(url, params, handler) {
     initXHR();
     xhr.onreadystatechange = handler; // set callback function
     xhr.open("POST", url, true); // open asynchronous GET request
      xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xhr.setRequestHeader("Content-length", params.length);
      xhr.setRequestHeader("Connection", "close");
      xhr.send(params); // send the request with params
  }
                  
function initXHR_old() {
	xhr = new  bea.wlp.disc.io.XMLHttpRequest();
}

/*   Function for hiding No Thanks   */
function hideComChannel(ob){ 
   if(ob.value==1 ){
        document.getElementById("divCommunicationSources").style.display = '';
   }else{
		document.getElementById("divCommunicationSources").style.display = 'none';
   }
}
   
/*   Function for hiding No Thanks - Onload  */
function hideComChannelOnLoad(){ 
	   var obj = document.getElementsByName(formname+':receiveUBankInfo');
	   var index_yes = 0;
	   if(obj.length==3)
	   		index_yes =1 ;
	   if(obj[index_yes].checked == false){
          	document.getElementById("divCommunicationSources").style.display = '';
       }else{
			document.getElementById("divCommunicationSources").style.display = 'none';
       }
}

//Disabling right click in IE and Mozila Firefox
function noRightClick(event) 
{ 
	if (event.button==2)//RIGHT CLICK 
	{ 
		alert("Right Click is not allowed"); 
		return false;
    } 
}

//Disabling Control-Copy Key
function noCTRLCopy(e) 
{ 
	 var key;
	 if(window.event){
		key = window.event.keyCode;
		if(window.event.ctrlKey)
			isCtrl = true;
		else
			isCtrl = false;
		if(window.event.ctrlKey==1)          //Disabling Control Key in IE
			isCtrl = true;
	  }else{
		key = e.which;     
		if(e.ctrlKey){//Disabling Control Key in Mozila Firefox
		  	isCtrl = true;
		}else
			isCtrl = false;
                                 
	  }
	  
	  if(isCtrl){
		//case-insensitive comparation
        if('c' == String.fromCharCode(key).toLowerCase()){
                return false;
      	}
      }
}

//Disabling Control-Paste Key
function noCTRLPaste(e) 
{ 
   var key;
   if(window.event){
      //Disabling Shift Insert in IE
      if(window.event.shiftKey==1)
         if(window.event.keyCode==45){
             //alert("Shift Insert is not allowed");
             return false;
         }
                  
         key = window.event.keyCode;
         if(window.event.ctrlKey)
         	isCtrl = true;
         else
            isCtrl = false;
         if(window.event.ctrlKey==1)          //Disabling Control Key in IE
            isCtrl = true;
   }else{
       key = e.which;     
       if(e.ctrlKey){//Disabling Control Key in Mozila Firefox
       		isCtrl = true;
       }else
       		isCtrl = false;
                                 
	   if(e.shiftKey){ //Disabling Shift Insert in Mozila Firefox 
       		if(e.keyCode==45){
            //alert("Shift Insert is not allowed");
            return false;
            }
       }
   }
        
   if(isCtrl){
            //case-insensitive comparation
   if('v' == String.fromCharCode(key).toLowerCase()){
   		return false;
   }
   }
}
//Defect: 1798 --start
function splitObjectValue(obj , position){
	var oldString = document.getElementById(obj).innerHTML;
	var newString ='';
	var splitDone = false;
	var positionPlus = parseInt(position)+1;
	while(oldString.length>positionPlus){
		splitDone = true;
		newString = newString + oldString.substring(0,position) + " ";
		oldString = oldString.substring(position);
	}
	if(splitDone){
		newString = newString + (" ") + oldString;
	}else {
		newString = oldString;
	}		
	 document.getElementById(obj).innerHTML = newString;		
}

function displayFieldAfterSplit(obj, locationOfSplit, splitFiller){
	obj.innerHTML = splitString( obj.innerHTML, locationOfSplit, splitFiller );
}

function splitString (string , locationOfSplit, splitFiller){
	var oldString = string;
	var newString ='';
	var splitDone = false;
	var locationOfSplitPlus = parseInt(locationOfSplit)+1;
	while(oldString.length>locationOfSplitPlus){
		splitDone = true;
		newString = newString + oldString.substring(0,locationOfSplit) + splitFiller;
		oldString = oldString.substring(locationOfSplit);
	}
	if(splitDone){
		newString = newString + oldString;
	}else {
		newString = oldString;
	}		
	return newString;		
}
//Defect: 1798 -- end
/* Trim function - Remove leading and trailing spaces */ 
function trim( userInput){
	return userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
}

/* Disable right click */
function whichButton(event) 
{ 
	if (event.button==2)//RIGHT CLICK 
	{ 
		alert("Right Click is not allowed"); 
		return false;
    } 
} 

/* Disable control button & shift insert */
function noCTRLAndShiftInsert(e) 
{ 
   var key;
   if(window.event){
      //Disabling Shift Insert in IE
      if(window.event.shiftKey==1)
         if(window.event.keyCode==45){
             return false;
         }
                 
         key = window.event.keyCode;
         if(window.event.ctrlKey)
         	isCtrl = true;
         else
            isCtrl = false;
         if(window.event.ctrlKey==1)          //Disabling Control Key in IE
            isCtrl = true;
   }else{
       key = e.which;     
       if(e.ctrlKey) //Disabling Control Key in Mozila Firefox
       {
		isCtrl = true;
       }else
       		isCtrl = false;
                                 
	   if(e.shiftKey){ //Disabling Shift Insert in Mozila Firefox 
       		if(e.keyCode==45){
            return false;
            }
       }
   }
        
   if(isCtrl){
	   if('v' == String.fromCharCode(key).toLowerCase()){
	   		return false;
	   }
   }
}

function sessionTimeoutAjax(responseTxt, sessionConst, contextPath){
	var sesionTimeoutStr = responseTxt.substring(0,sessionConst.length);
	if(sesionTimeoutStr == sessionConst){
       	document.location=contextPath+'/portlets/logout/sessiontimeout.jsf';
       	return true;
    }
    return false;
}

function customSearch(formId, contextPath){
	(function() {
		var f = document.getElementById(formId);
		if (!f) {
			f = document.getElementById('searchbox_demo');
		}
		if (f && f.q) {
			var q = f.q;
			var n = navigator;
			var l = location;
			var b = function() {
				if (q.value == '') {
					/* CSS Sprite */
					q.style.background = 'url('+contextPath+'/framework/skins/ubankonline/images/sprite_64.gif) no-repeat -188px -419px';
					/* /CSS Sprite */
					/* CR 313 :Modifications to Login box layout and reusing reset password.Starts  */
					//q.style.margin = '0px 0px 3px 0px';
					/* CR 313 :Modifications to Login box layout and reusing reset password.End */
					q.style.float = 'left';
				}
			};
			var f = function() {
				q.style.background = '#ffffff';
			};
			q.onfocus = f;
			q.onblur = b;
			if (!/[&?]q=[^&]/.test(l.search)) {
				b();
			}
		}
	})();
}

function closeIBWindow(){
	closeFCDBWindow('mywindow');
	closeFCDBWindow('AccountForm');
}

function replaceBrTextWithBrHTML(){
	var spans = document.getElementsByTagName('span');
	var i=0, el;
    while (el = spans.item(i++)){
       el.innerHTML = el.innerHTML.replace(/--new--line--/g,'<br/>')
    } 
}

function refreshBrowserFunction(autoRefresh){	
	clearTimeout(sessionTimeOutVar);	
	sessionTimeOutVar = setTimeout("location.reload(true);",autoRefresh * 1000);	
}





/*modal.js*/
 
if (typeof dhtmlwindow=="undefined"){}

var dhtmlmodal={
veilstack: 0,
open:function(t, contenttype, contentsource, title, attr, recalonload){
	var d=dhtmlwindow //reference dhtmlwindow object
	this.interVeil=document.getElementById("interVeil") //Reference "veil" div
	this.veilstack++ //var to keep track of how many modal windows are open right now
	this.loadveil()
	if (recalonload=="recal" && d.scroll_top==0)
		d.addEvent(window, function(){dhtmlmodal.adjustveil()}, "load")
	var t=d.open(t, contenttype, contentsource, title, attr, recalonload)
	//t.controls.firstChild.style.display="none" //Disable "minimize" button
	t.controls.onclick=function(){dhtmlmodal.close(this._parent, true)} //OVERWRITE default control action with new one
	t.show=function(){dhtmlmodal.show(this)} //OVERWRITE default t.show() method with new one
	t.hide=function(){dhtmlmodal.close(this)} //OVERWRITE default t.hide() method with new one
	
		
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
 var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
 if (ieversion>=6 && ieversion<7)
 {
 var selects = document.getElementsByTagName('select');
                  for(i = 0; i < selects.length; i++) {
                  selects[i].style.visibility = 'hidden';
                  if(selects[i].id == 'form1:occupation')
                  {
                  document.getElementById("occupationDiv").style.display='none';
                  }

                //  document.getElementById(selects[i].id).disabled = true; 
                 // document.getElementById(selects[i].id).style.background="#cccccc";
                  // document.getElementById("p2").style.color="magenta";
   }
  }
	
}	
return t
},


loadveil:function(){
	var d=dhtmlwindow
	d.getviewpoint()
	this.docheightcomplete=(d.standardbody.offsetHeight>d.standardbody.scrollHeight)? d.standardbody.offsetHeight : d.standardbody.scrollHeight 
	this.interVeil.style.width=d.docwidth+"px" //set up veil over page
	this.interVeil.style.height=this.docheightcomplete+"px" //set up veil over page
	this.interVeil.style.left=0 //Position veil over page
	this.interVeil.style.top=0 //Position veil over page
	this.interVeil.style.visibility="visible" //Show veil over page
	this.interVeil.style.display="block" //Show veil over page
},

adjustveil:function(){ //function to adjust veil when window is resized
	if (this.interVeil && this.interVeil.style.display=="block") //If veil is currently visible on the screen
		this.loadveil() //readjust veil
},

closeveil:function(){ //function to close veil
	this.veilstack--
	// if (this.veilstack==0) //if this is the only modal window visible on the screen, and being closed
		this.interVeil.style.display="none"
},


close:function(t, forceclose){ //DHTML modal close function
	t.contentDoc=(t.contentarea.datatype=="iframe")? window.frames["_iframe-"+t.id].document : t.contentarea //return reference to modal window DIV (or document object in the case of iframe
	if (typeof forceclose!="undefined"){
		doOperationOnClose(t);
	}
	if (dhtmlwindow.close(t)) //if close() returns true
		this.closeveil()
		
		if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
 var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
 if (ieversion>=6 && ieversion<7)
 {
 var selects = document.getElementsByTagName('select');
                  for(i = 0; i < selects.length; i++) {
                  selects[i].style.visibility = 'visible';
                   if(selects[i].id == 'form1:occupation')
                  {
                  document.getElementById("occupationDiv").style.display='';
                  }

                //  document.getElementById(selects[i].id).disabled = true; 
                 // document.getElementById(selects[i].id).style.background="#cccccc";
                  // document.getElementById("p2").style.color="magenta";
   }
  }
  }
},


show:function(t){
	dhtmlmodal.veilstack++
	dhtmlmodal.loadveil()
	dhtmlwindow.show(t)
}
} //END object declaration


document.write('<div id="interVeil"></div>')
dhtmlwindow.addEvent(window, function(){if (typeof dhtmlmodal!="undefined") dhtmlmodal.adjustveil()}, "resize")

function doOperationOnClose(t){
	if(t.id == 'changePassword'){
		t.onclose=function(){setTimeout('closeChangePasswordPopup()', 1000); return true;}
	}else if(t.id == 'editLoginEmailId' || t.id == 'editSecurityQnA' || t.id == 'editCantactEmail' || t.id == 'editIVRPin' || t.id == 'editPassword'){
	    //window.location.reload( false )
		t.onclose=function(){setTimeout('donothing()', 1000); return true; }
	}else if(t.id == 'forgotPassword1'){
		t.onclose=function(){setTimeout('window.location.reload( false )', 10); return true;}
	}else if(t.id == 'LoginWindow'){
	    t.onclose=function(){setTimeout('deselectItems()', 10); return true;}
	}else{
		t.onclose=function(){return true;}
	}
}

function deselectItems()
{
//var alreadyWithUB = parent.document.getElementsByName('form1:alreadyWithUBank');
//var secAppAvl = document.getElementsByName('form1:secondAppAvailable');
//var secAppAlreadyUbank = document.getElementsByName('form1:secondAppAlreadyUBank');
//checkradio(alreadyWithUB);
//checkradio(secAppAvl);
//checkradio(secAppAlreadyUbank);
}

function donothing(){

//alert("Cross Button Clicked!");
//alert(modalLoginId.contentDoc);   //.getElementById('result:newlogin').value);

}



/*clientValidation.js*/

<!-- Client Side Validation Scripts-->

<!--Apply style class to lable/input pair -->
function applyCSS(labelField, labelCSS, inputField , inputFieldCSS){	
	labelField.className = labelCSS;
	inputField.className = inputFieldCSS;
}

<!--Check if the field is empty-->
function isEmptyField(inputFieldObj){
	inputFieldObj.value = trim(inputFieldObj.value); 
	if (inputFieldObj.value== "") {
		return true;
	}
	return false;
}

<!--Check if two fields have same content -->
function checkEquals(object,reConfirmObj){
    object.value = trim(object.value);
    reConfirmObj.value = trim(reConfirmObj.value);
	
	if (object.value == reConfirmObj.value) {
		return true;
	}
	return false;
}

<!--Display validation message in success / error div. The parameter validationSuccess tells which div to show. --> 
function displayValidationMessage(validationSuccess,errorDiv,errorMessage){
	if(!validationSuccess){
		errorDiv.innerHTML = errorMessage;
		errorDiv.className = 'clientValidationError';
	}
	return true;
} 

<!-- Check if field is empty and render status message -->

function checkEmpty(fieldId, divId, errMsg){
	var inputField = document.getElementById(fieldId);
    var errorDiv = document.getElementById(divId);
    if (errMsg == "") {
    	errMsg = "Mandatory Field";
    }
    
	if (inputField.value == "") {
		inputField.className = 'inputFieldValidationError';
		errorDiv.className = 'clientValidationErrorAccOpe';
		errorDiv.innerHTML = errMsg;
		return false;
	}else{
		inputField.className = 'inputFieldValidationOK'; 
		errorDiv.className = 'clientValidationOK';
		//errorDiv.innerHTML = 'OK';
		return true;
	}
	
}

function checkEmptyValue(fieldId, divId, errMsg){
	var inputField = document.getElementById(fieldId);
    var errorDiv = document.getElementById(divId);
    if (errMsg == "") {
    	errMsg = "Mandatory Field";
    }
    
	if (inputField.value == "") {
		inputField.className = 'set4FieldError';
		errorDiv.className = 'clientValidationErrorAccOpe';
		errorDiv.innerHTML = errMsg;
		return false;
	}else{
		return true;
	}
	
}

<!-- Check minimum length required and render status message -->
function checkLength(inputId, minLength, msgId, msg){
    var inputField = document.getElementById(inputId);
    var errorDiv = document.getElementById(msgId);
    
	if (inputField.value.length < minLength) {
		inputField.className = 'inputFieldValidationError';
		errorDiv.className = 'clientValidationErrorAccOpe';
		errorDiv.innerHTML = msg;
		return false;
	}else{
		inputField.className = 'inputFieldValidationOK';
		errorDiv.className = 'clientValidationOK';
		errorDiv.innerHTML = 'OK';
		return true;
	}
	
}

<!-- Check if field is empty and render status message. See : compareValues -->
function compareSame(compareId, withId, msgId, mssg){
    compareInput = document.getElementById(compareId);
    withInput = document.getElementById(withId);	
    errorDiv =  document.getElementById(msgId);	
     
	if (compareInput.value == withInput.value) {
		errorDiv.className = 'clientValidationOK';
		withInput.className = 'forgotPasswordInput';
		document.getElementById(msgId).innerHTML = 'OK';
		return true;
	}else{
		errorDiv.className = 'clientValidationError';
		withInput.className = 'forgotPasswordInputError';
		document.getElementById(msgId).innerHTML = mssg;
		return false;
	}
}

<!-- Validate email id and render status message. See : isEmailIdValid -->
function validateEmailID(fldName, divId, errMsg){
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var address = document.getElementById(fldName).value;
	var inputField = document.getElementById(fldName);
	var errorDiv = document.getElementById(divId);
	
	if(reg.test(address) == false ) {
		inputField.className = 'inputFieldValidationError';
		errorDiv.className = 'clientValidationErrorAccOpe';
		errorDiv.innerHTML = errMsg;
      	return false;
   }else{
   		inputField.className = 'inputFieldValidationOK';
		errorDiv.className = 'clientValidationOK';
   		errorDiv.innerHTML = 'OK';
   		return true;
   }
}

<!-- Deprecated. isEmptyField() method should be used instead --> 
<!-- Check if field is empty and render status message -->
function isEmpty(fieldId, errorDivId, okDivId, errMsg){
	var inputField = document.getElementById(fieldId);
	var inputFieldValue = document.getElementById(fieldId).value;
	inputFieldValue = inputFieldValue.replace(/^\s+/g, '').replace(/\s+$/g, '');
	var errorDiv = document.getElementById(errorDivId);
    var okDiv = document.getElementById(okDivId);
    if (errMsg == "") {
    	errMsg = "Mandatory Field";
    }
    
	if (inputFieldValue == "") {
		inputField.className = 'forgotPasswordInputError';
		errorDiv.className = 'clientValidationErrorAccOpe';
		errorDiv.innerHTML = errMsg;
		okDiv.innerHTML = '';
		return false;
	}else{
		inputField.className = 'forgotPasswordInput';
		okDiv.className = 'clientValidationOK';
		okDiv.innerHTML = 'OK';
		errorDiv.innerHTML = '';
		return true;
	}
	
}
<!-- Deprecated. isEmptyField() method should be used instead --> 
<!-- Check if field is empty and render status message -->
function isEmptyFields(fieldId, errorDivId, okDivId, errMsg, classNameError, classNameOK){
	var inputField = document.getElementById(fieldId);
    var errorDiv = document.getElementById(errorDivId);
    var okDiv = document.getElementById(okDivId);
    if (errMsg == "") {
    	errMsg = "Mandatory Field";
    }
	if (inputField.value.replace(/^\s\s*/, '').replace(/\s\s*$/, '') == "") {
		inputField.className =classNameError;
		errorDiv.className = 'clientValidationErrorAccOpe';
		errorDiv.innerHTML = errMsg;
		okDiv.innerHTML = '';
		return false;
	}else{
		inputField.className = classNameOK;
		okDiv.className = 'clientValidationOK';
		errorDiv.innerHTML = '';
		return true;
	}
	
}
 
<!-- Validate email id and render status message. See : validateEmailID -->
function isEmailIdValid(fldName, errordivId, okDivId, errMsg){
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var address = document.getElementById(fldName).value;
	var inputField = document.getElementById(fldName);
	var errorDiv = document.getElementById(errordivId);
	var okDiv = document.getElementById(okDivId);
	
	if(reg.test(address) == false) {
		inputField.className = 'forgotPasswordInputError';
		errorDiv.className = 'clientValidationErrorAccOpe';
		errorDiv.innerHTML = errMsg;
		okDiv.innerHTML = '';
      	return false;
   }else{
   		inputField.className = 'forgotPasswordInput';
		okDiv.className = 'clientValidationOK';
   		okDiv.innerHTML = 'OK';
   		errorDiv.innerHTML = '';
   		return true;
   }
}

<!-- Compare values of two field and render status message. See : compareSame-->
function compareValues(compareId, withId, msgId, okDivId, mssg){
    compareInput = document.getElementById(compareId);
    withInput = document.getElementById(withId);	
    errorDiv =  document.getElementById(msgId);	
    okDiv =  document.getElementById(okDivId);	
    
	if (compareInput.value == withInput.value) {
		withInput.className = 'forgotPasswordInput';
		document.getElementById(msgId).innerHTML = '';
		okDiv.innerHTML = 'OK';
		okDiv.className = 'clientValidationOK';
		return true;
	}else{
		errorDiv.className = 'clientValidationErrorAccOpe';
		withInput.className = 'forgotPasswordInputError';
		okDiv.innerHTML = '';
		document.getElementById(msgId).innerHTML = mssg;
		return false;
	}
}

<!-- Validate address field and render status message.-->
function fieldValidation(fldName, errordivId, errMsg, classNameError, classNameOK){
	var reg =/^((-?)[\sA-Za-z]+)([-\sA-Za-z]+)*$/;
	var address = document.getElementById(fldName).value.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
	var inputField = document.getElementById(fldName);
	var errorDiv = document.getElementById(errordivId);
		//alert('hi4');
		if(reg.test(address) == false) {
			inputField.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.style.display='block';
			errorDiv.innerHTML = errMsg;
			return false;
	   }else{
	   		return true;
	   }
}

function fieldValidationQuote(fldName, errordivId, errMsg, classNameError, classNameOK){
	var reg =/^((-?)[\sA-Za-z\']+)([-\sA-Za-z\']+)*$/;
	var address = document.getElementById(fldName).value.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
	var inputField = document.getElementById(fldName);
	var errorDiv = document.getElementById(errordivId);
		//alert('hi4');
		if(reg.test(address) == false && address.length!=0) {	//Change for CR 247
			inputField.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.style.display='block';
			errorDiv.innerHTML = errMsg;
			return false;
	   }else{
	   		return true;
	   }
}
<!-- Validate middle name field and render status message.-->	
function middlenameValidation(fldName, errordivId, errMsg, classNameError, classNameOK){
	//alert('hi4');
	var reg =/^((-?)[\sA-Za-z]+)([-\sA-Za-z]+)*$/;
	var address = document.getElementById(fldName).value.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
	var inputField = document.getElementById(fldName);
	var errorDiv = document.getElementById(errordivId);
	
		if(reg.test(address) == false && address.length!=0) {
			//	alert('hi4');
			inputField.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.style.display='block';
			errorDiv.innerHTML = errMsg;
		   	return false;
	   }else{
	   		return true;
	   }
	}

<!-- Validate DOB field and render status message.-->	
function validateDateOfBirth(fieldId, errorDivId, errMsg, errMsg1, classNameError, classNameOK)
{
		var input=document.getElementById(fieldId);
		var userInput = document.getElementById(fieldId).value;
		userInput =userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
	    var errorDiv = document.getElementById(errorDivId);
	    var reg = /^\d{1,2}\/\d{1,2}\/\d{4}$/ ;
		if (reg.test(userInput)==false && userInput.length!=0) {
			input.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.innerHTML = errMsg;
			return false;
		}else{
			var dayfield=userInput.split("/")[0]
			var monthfield=userInput.split("/")[1]
			var yearfield=userInput.split("/")[2]
		
			var dayobj = new Date(yearfield, monthfield-1, dayfield)
			var currentDate= new Date();
			var dayobj1 = new Date(input);
		if ((dayobj.getMonth()+1!=monthfield)||(dayobj.getDate()!=dayfield)||(dayobj.getFullYear()!=yearfield)){
			input.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.innerHTML = errMsg;
			returnval=false;
		}else{
			if(displayage(yearfield, monthfield, dayfield, "years", 2, "rounddown")==true){
				input.className = classNameOK;
				//okDiv.className = 'clientValidationOK';
		   		//okDiv.innerHTML = 'OK';
		   		errorDiv.innerHTML = '';
		   		//return true;
				returnval=true
			}else{
				input.className = classNameError;
				errorDiv.className = 'clientValidationErrorAccOpe';
				errorDiv.innerHTML = errMsg1;
				//okDiv.innerHTML = '';
				returnval=false;
			}
		}
	}
	if (returnval==false) input.select();
		return returnval
}

<!-- Validate mobile number. -->
function validateMoblie(mobileNoObj,mandatory){
		mobileNoObj.value = trim(mobileNoObj.value);
		var mobileNo = mobileNoObj.value; 
	    var reg = /^((04[0-9]*)+)$/;
		if ((reg.test(mobileNo)==false || mobileNo.length!=10) ) {
			return false;
		}
		if(mandatory)
			return  (mobileNo.length!=0); 
		return true;
}
<!-- Validate mobile number and render status message. -->	
function validateMoblieNumber(fieldId, errorDivId, okDivId, errMsg, successMsg){
		var userInput = document.getElementById(fieldId).value;
		userInput =userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
	    var errorDiv = document.getElementById(errorDivId);
	    var okDiv = document.getElementById(okDivId);
	    var reg = /^((04[0-9]*)+)$/;
		if ((reg.test(userInput)==false || userInput.length!=10) && (userInput.length!=0) ) {
			errorDiv.className = 'clientValidationErrorAccOpe';
			okDiv.innerHTML = '';
			errorDiv.innerHTML = errMsg;
			return false;
		}else{
			okDiv.className = 'clientValidationOK';
			errorDiv.innerHTML = '';
			okDiv.innerHTML = successMsg;
			return true;
		}
}

<!-- Validate mobile number and render status message.-->
	function validateMoblieNumber1(fieldId, errorDivId, errMsg, classNameError, classNameOK){
 		var input=document.getElementById(fieldId);
		var userInput = document.getElementById(fieldId).value;
		userInput =userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
	    var errorDiv = document.getElementById(errorDivId);
	    //var okDiv = document.getElementById(okDivId);
	    var reg = /^((04[0-9]*)+)$/;
		if ((reg.test(userInput)==false || userInput.length!=10) && (userInput.length!=0) ) {
			input.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			//okDiv.innerHTML = '';
			errorDiv.style.display='block';
			errorDiv.innerHTML = errMsg;
			return false;
		}else{
			input.className = classNameOK;
			//okDiv.className = 'clientValidationOK';
			errorDiv.style.display='none';
			errorDiv.innerHTML = '';
		//	okDiv.innerHTML = successMsg;
			return true;
		}
	}
 
<!-- Validate re-enter mobile number and render status message. -->
	function validateRenterMoblieNumber(fieldId1, fieldId, errorDivId, errMsg, classNameError, classNameOK){
		var input=document.getElementById(fieldId);
		var userInput = document.getElementById(fieldId).value;
		userInput =userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
		
		var userInput1 = document.getElementById(fieldId1).value;
		userInput1 =userInput1.replace(/^\s+/g, '').replace(/\s+$/g, '');
		
	    var errorDiv = document.getElementById(errorDivId);
	  //  var okDiv = document.getElementById(okDivId);
	    //alert(userInput+""+userInput1);
	    
		if (userInput==userInput1) 
		{
			//alert("claled");
			input.className = classNameOK;
			//okDiv.className = 'clientValidationOK';
			errorDiv.style.display='none';
			errorDiv.innerHTML = '';
			//okDiv.innerHTML = successMsg;
			return true;
		}
		else
		{
			input.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			//okDiv.innerHTML = '';
			errorDiv.style.display='block';
			errorDiv.innerHTML = errMsg;
			//fieldId.select();
			return false;
		}
	}

<!-- Validate work phone number and render status message.-->
	function validateWorkPhoneNumber(fieldId, errorDivId, errMsg, errMsg1, classNameError, classNameOK){
			var input=document.getElementById(fieldId);
			var userInput = document.getElementById(fieldId).value;
			userInput =userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
		    var errorDiv = document.getElementById(errorDivId);
		    var reg = /^(((02|03|07|08)[0-9]*)+)$/;
			if ((userInput.length!=10 || isNaN(userInput)) && userInput.length!=0) {
				input.className = classNameError;
				errorDiv.className = 'clientValidationErrorAccOpe';
				errorDiv.style.display='block';
				errorDiv.innerHTML = errMsg1;
				//fieldId.select();
				return false;
			}
			else if((reg.test(userInput)==false && userInput.length!=0 )) 
			{
				input.className = classNameError;
				errorDiv.className = 'clientValidationErrorAccOpe';
				errorDiv.style.display='block';
				errorDiv.innerHTML = errMsg;
				//fieldId.select();
				return false;
			}
			else
			{
				input.className = classNameOK;
				errorDiv.style.display='none';
				errorDiv.innerHTML = '';
				return true;
			}
	}

<!-- Validate Tax File number and render status message.-->
	function validateTaxFileNumber(fieldId, errorDivId, errMsg, totalSize, classNameError, classNameOK){
			var input=document.getElementById(fieldId);
			var userInput = document.getElementById(fieldId).value;
			userInput =userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
		    var errorDiv = document.getElementById(errorDivId);
		   // var okDiv = document.getElementById(okDivId);
		    var reg = /^[(0-9)]*$/;
		    //alert(totalSize);
			if(((reg.test(userInput)==false || userInput.length!=totalSize) && userInput.length!=0 )) 
			{
				input.className = classNameError;
				errorDiv.className = 'clientValidationErrorAccOpe';
				//okDiv.innerHTML = '';
				errorDiv.innerHTML = errMsg;
				//userInput.select();
				return false;
			}
			else
			{
				input.className = classNameOK;
				//okDiv.className = 'clientValidationOK';
				errorDiv.innerHTML = '';
				//okDiv.innerHTML = successMsg;
				return true;
			}
	}

/*
Calculate the age:
//Sample usage
//displayage (year, month, day, unit, decimals, rounding)
//Unit can be "years", "months", or "days"
//Decimals specifies demical places to round to (ie: 2)
//Rounding can be "roundup" or "rounddown"
//displayage(1997, 11, 24, "years", 0, "rounddown")
*/

var one_day=1000*60*60*24
var one_month=1000*60*60*24*30
var one_year=1000*60*60*24*365.25

function displayage(yr, mon, day, unit, decimal, round){
	today=new Date()
	var pastdate=new Date(yr, mon-1, day)
	
	var countunit=unit
	var decimals=decimal
	var rounding=round
	
	finalunit=(countunit=="days")? one_day : (countunit=="months")? one_month : one_year
	decimals=(decimals<=0)? 1 : decimals*10
	
	if (unit!="years"){
		if (rounding=="rounddown")
			alert(Math.floor((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals+" "+countunit)
		else
			alert(Math.ceil((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals+" "+countunit)
	}
	else{
		yearspast=today.getFullYear()-yr-1
		tail=(today.getMonth()>mon-1 || today.getMonth()==mon-1 && today.getDate()>=day)? 1 : 0
		pastdate.setFullYear(today.getFullYear())
		pastdate2=new Date(today.getFullYear()-1, mon-1, day)
		tail=(tail==1)? tail+Math.floor((today.getTime()-pastdate.getTime())/(finalunit)*decimals)/decimals : Math.floor((today.getTime()-pastdate2.getTime())/(finalunit)*decimals)/decimals
		//alert(yearspast+tail+" "+countunit);
		if(yearspast+tail>=18)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}

<!-- Validate post code and render status message.-->
	function validatePostCode(fieldId, errorDivId, errMsg, classNameError, classNameOK){
			var input=document.getElementById(fieldId);
			var userInput = document.getElementById(fieldId).value;
			userInput =userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
		    var errorDiv = document.getElementById(errorDivId);
		  //  var okDiv = document.getElementById(okDivId);
		    var reg = /^[(A-Za-z0-9)]*$/;
			
			if(reg.test(userInput)==false || userInput.length<4) 
			{
				input.className = classNameError;
				errorDiv.className = 'clientValidationErrorAccOpe';
				//okDiv.innerHTML = '';
				errorDiv.innerHTML = errMsg;
				//fieldId.select();
				return false;
			}
			else
			{
				input.className = classNameOK;
				//okDiv.className = 'clientValidationOK';
				errorDiv.innerHTML = '';
				//okDiv.innerHTML = successMsg;
				return true;
			}
	}

<!-- Validate deposit amount and render status message.-->
	function validateDepositAmount(fieldId, errorDivId, errMsg1,errMsg2, minValue, maxValue, classNameError, classNameOK){
		var input=document.getElementById(fieldId);
		var userInput = document.getElementById(fieldId).value;
		userInput =userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
	    var errorDiv = document.getElementById(errorDivId);
	    var reg = /^[(0-9)]*$/;
	    //alert(totalSize);
		if(reg.test(userInput)==false) 
		{
			input.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.innerHTML = errMsg1;
			//userInput.select();
			return false;
		} else {
			if(parseInt(userInput)>=parseInt(minValue) && parseInt(userInput)<=parseInt(maxValue)){
				input.className = classNameOK;
				errorDiv.innerHTML = '';
				return true;
			} else {
				input.className = classNameError;
				errorDiv.className = 'clientValidationErrorAccOpe';
				errorDiv.innerHTML = errMsg2;
				//userInput.select();
				return false
			}
		}
	}

<!-- Validate account nickname and render status message.-->
	function validateAccountNickName(fieldId, errorDivId, errMsg, classNameError, classNameOK){
		var input=document.getElementById(fieldId);
		var userInput = document.getElementById(fieldId).value;
		userInput =userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
	    var errorDiv = document.getElementById(errorDivId);
	    var reg = /^[A-Za-z0-9\s!"#$%'*(+&<>,-./:;\]=?@)^\[_`{|}~\\]*$/;
	    /^((-?)[\sA-Za-z]+)([-\sA-Za-z]+)*$/
	    //alert(totalSize);
		if(reg.test(userInput)==false && userInput.length!=0) 
		{
			input.className =classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.innerHTML = errMsg;
			//userInput.select();
			return false;
		}else{
			input.className =classNameOK;
			errorDiv.innerHTML = '';
			return true;
		}
	}

<!-- Validate security answer and render status message.-->
function validateSecurityAnswerInput(fieldId, errorDivId, okDivId, errMsg, successMsg){
		var userInput = document.getElementById(fieldId).value;
	    var errorDiv = document.getElementById(errorDivId);
	    var okDiv = document.getElementById(okDivId);
	    var reg = /^([\s\_A-Za-z0-9]*)$/;
		
		if (reg.test(userInput) == false ) {
			errorDiv.className = 'clientValidationErrorAccOpe';
			okDiv.innerHTML = '';
			errorDiv.innerHTML = errMsg;
			return false;
		}else{
			okDiv.className = 'clientValidationOK';
			errorDiv.innerHTML = '';
			okDiv.innerHTML = successMsg;
			return true;
		}
}
<!-- Validate security answer.-->
function validateSecurityAnswer(securityAnswerObj){
		securityAnswerObj.value = trim(securityAnswerObj.value);
	    var reg = /^([\s\_A-Za-z0-9]*)$/;
		if (reg.test(securityAnswerObj.value) == false ) {
			return false;
		}
		return true;
}
<!-- Validate ContactEmailId and render status message.-->
	function contactEmailIdValid(fldName, errordivId, errMsg, classNameError, classNameOK)
	{
		var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		var address = document.getElementById(fldName).value.replace(/^\s+/g, '').replace(/\s+$/g, '');;
		var inputField = document.getElementById(fldName);
		var errorDiv = document.getElementById(errordivId);
		
		if(reg.test(address) == false && address.length!=0)
		{ 
			inputField.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.innerHTML = errMsg;
	      	return false;
	   }else{
	   		inputField.className = classNameOK;
	   		errorDiv.innerHTML = '';
	   		return true;
	   }
	}

<!-- Validate date and render status message.-->
	function dateValidation(fldName, errordivId, classNameError){
		var address = document.getElementById(fldName).value.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
		var inputField = document.getElementById(fldName);
		var errorDiv = document.getElementById(errordivId);
		   if(address.length==0) {
		   		return false;
		   }else{
		      	return true;
		   }
	}
<!-- Check if special characters are present in password.-->
function noSpecialCharsInPassword(passwordObj){
	var regEx = /[\s\[\]<>%()="]/;
	if ((passwordObj.value).match(regEx)) {
		return false;
	}
	return true;
}	
<!-- Validate password rules-->
function validatPassword(passwordObj){
	passwordObj.value = trim(passwordObj.value);
	var passwordValue = passwordObj.value; 
	var regEx = /(?=.*\d)(?=.*[a-zA-Z])./;
	if (regEx.test(passwordValue) == false || passwordValue.length<6 || passwordValue.length>16 ) {
		return false;
	}
	return true;
}


<!-- Validate Account Number-->	
	function validateAccountNumber(fieldId, errorDivId, errMsg, totalSize, classNameError, classNameOK){
		var input=document.getElementById(fieldId);
		var userInput = document.getElementById(fieldId).value;
		userInput =userInput.replace(/^\s+/g, '').replace(/\s+$/g, '');
	    var errorDiv = document.getElementById(errorDivId);
	    var reg = /^[(0-9)]*$/;
	    //alert(totalSize);
		if(((reg.test(userInput)==false || userInput.length<1) && userInput.length!=0 )) 
		{
			input.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.innerHTML = errMsg;
			//userInput.select();
			return false;
		}
		else
		{
			input.className = classNameOK;
			errorDiv.innerHTML = '';
			return true;
		}
	}

function crossSiteScriptingSafety(inputField, fieldClass, inputFieldLabel, fieldLableClass, errorDiv, errMsg )
{
	  if(isSafeFromCrossSiteScripting(inputField) == false){ 
          inputField.className = 'errorInput '+ fieldClass;
          inputFieldLabel.className = 'errorLabel '+ fieldLableClass;
          errorDiv.className = 'clientValidationErrorAccOpe';
          errorDiv.innerHTML = errMsg;
          return false;
      } else {
          inputField.className = fieldClass;
          inputFieldLabel.className = fieldLableClass;
          errorDiv.innerHTML = '';
          return true;
      }
}
/*CR 22:Validate Forum Nickname.Start*/
function validateNickName(inputField, fieldClass, inputFieldLabel, fieldLableClass, errorDiv, errMsg,loginEmailId){
	var emailPattern = /@ubank/;
	var nickName = inputField.value.toLowerCase();
	var nickNamePattern = /ubank/;
	if(emailPattern.test(loginEmailId.innerHTML)!=true && nickNamePattern.test(nickName)){
		  inputField.className = 'errorInput '+ fieldClass;
          inputFieldLabel.className = 'errorLabel '+ fieldLableClass;
          errorDiv.className = 'clientValidationErrorAccOpe';
          errorDiv.innerHTML = errMsg;
          return false;
      } else {
          inputField.className = fieldClass;
          inputFieldLabel.className = fieldLableClass;
          errorDiv.innerHTML = '';
          return true;
	}

}
/*CR 22:Validate Forum Nickname.End*/
function crossSiteScriptingSafetyAllowQuote(inputField, fieldClass, inputFieldLabel, fieldLableClass, errorDiv, errMsg )
{
	  if(isSafeFromCrossSiteScriptingAllowQuote(inputField) == false){ 
          inputField.className = 'errorInput '+ fieldClass;
          inputFieldLabel.className = 'errorLabel '+ fieldLableClass;
          errorDiv.className = 'clientValidationErrorAccOpe';
          errorDiv.innerHTML = errMsg;
          return false;
      } else {
          inputField.className = fieldClass;
          inputFieldLabel.className = fieldLableClass;
          errorDiv.innerHTML = '';
          return true;
      }
}

function isSafeFromCrossSiteScriptingAllowQuote(inputFieldObj)
{
      var reg =  /^([^<>&"%()])*$/;
      var inputFieldValue = trim(inputFieldObj.value)
	  if(reg.test(inputFieldValue) == false){ 
inputFieldObj.value='';
          return false;
      }
      return true;
}

<!--Check if input is free from cross site input-->
function isSafeFromCrossSiteScripting(inputFieldObj)
{
      var reg =  /^([^<>&"'%()])*$/;
      var inputFieldValue = trim(inputFieldObj.value)
	  if(reg.test(inputFieldValue) == false){ 
inputFieldObj.value='';
          return false;
      }
      return true;
}

function crossSiteValidation(fldName, errordivId, errMsg, classNameError, classNameOK, okdiv)
{
      var reg =  /^([^<>?&"'%()])*$/;
      var address = document.getElementById(fldName).value.replace(/^\s+/g, '').replace(/\s+$/g, '');
      var inputField = document.getElementById(fldName);
      var errorDiv = document.getElementById(errordivId);
      
      if(reg.test(address) == false)
      { 	
            inputField.className = classNameError;
            errorDiv.className = 'clientValidationErrorAccOpe';
            errorDiv.innerHTML = errMsg;
            document.getElementById(fldName).value='';
            return false;
	   }
	   else
	   {
            inputField.className = classNameOK;
            errorDiv.innerHTML = '';
            return true;
   		}
}

function crossSiteValidationquote(fldName, errordivId, errMsg, classNameError, classNameOK, okdiv)
{
      var reg =  /^([^<>?&"%()])*$/;
      var address = document.getElementById(fldName).value.replace(/^\s+/g, '').replace(/\s+$/g, '');
      var inputField = document.getElementById(fldName);
      var errorDiv = document.getElementById(errordivId);
      
      if(reg.test(address) == false)
      { 	
            inputField.className = classNameError;
            errorDiv.className = 'clientValidationErrorAccOpe';
            errorDiv.innerHTML = errMsg;
            document.getElementById(fldName).value='';
            return false;
	   }
	   else
	   {
            inputField.className = classNameOK;
            errorDiv.innerHTML = '';
            return true;
   		}
}
function makeempty(okdiv)
	{
		var okDiv = document.getElementById(okdiv);						
		okDiv.innerHTML = '';
	}
   
   function licenceValidation(fldName, errordivId, errMsg, classNameError, classNameOK){
	  var reg =/^([\_a-zA-Z0-9]+)*$/;
	  var address = document.getElementById(fldName).value.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
	  var inputField = document.getElementById(fldName);
	  var errorDiv = document.getElementById(errordivId);
	//var okDiv = document.getElementById(okDivId);
		if(reg.test(address) == false) {
			inputField.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.innerHTML = errMsg;
		//	okDiv.innerHTML = '';
	      	return false;
	   }else{
	   		inputField.className = classNameOK;
			//okDiv.className = 'clientValidationOK';
	   		//okDiv.innerHTML = 'OK';
	   		errorDiv.innerHTML = '';
	   		return true;
	   }
	}
	   


	function licenceStateValidation(fldName, errordivId, errMsg, classNameError, classNameOK){
	var address = document.getElementById(fldName).value.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
	var inputField = document.getElementById(fldName);
	var errorDiv = document.getElementById(errordivId);
	//var okDiv = document.getElementById(okDivId);
		if(address=='0'){
		
			inputField.className = classNameError;
			errorDiv.className = 'clientValidationErrorAccOpe';
			errorDiv.innerHTML = errMsg;
			//okDiv.innerHTML = '';
	      	return false;
	   }else{
	   		inputField.className = classNameOK;
		//	okDiv.className = 'clientValidationOK';
	   	//	okDiv.innerHTML = 'OK';
	   		errorDiv.innerHTML = '';
	   		return true;
	   }
	}



/*check.js*/
//-------------------------------------------------------------
//         Date: 4/3/2009        Description of change: Release 1.2: //Reference No. 37, Radio button for Receive marketing information
//         Date: 5/3/2009        Description of change: Release 1.2: //Reference No. 5, Choose your term - 1,3,6,9,12
//         Date: 6/3/2009        Description of change: Release 1.2: //Reference No. 37, Radio button for Receive marketing information
//         Date: 10/03/2009      Description of change: Release 1.2: After login to the portal and opening on apply online, now user can select all options.
//         Date: 16/03/2009      Description of change: Release 1.2: Reference No. 5, Choose your term - 1,3,6,9,12
//         Date: 20/03/2009      Description of change: Release 1.2: 1)	Reference No. 27, Reverting back to the old Line 1, Line 1 format from Unit Number, Street Number // format for Postal and non australian previous address. 
//Date: 20/3/2009                                                  Description of change: For release 1.2(20th march release), UT Defect, When the validation message is displayed on //the Apply online screen for the captcha the entire screen is refreshed and the selection goes off
// 	31/03/2009		IFS1086T-4
//-------------------------------------------------------------


var productType=1;
var login=0;
var firstApp="text";
var firstApplicant="";
var secondApplicant="";
var globalTypeOfAccount="";


function blankDateFields()
{
document.getElementById('form1:dob').value='';
}

function prompt_opt_single(ob)
{
	var selectedProduct = document.getElementById('form1:inputHidden14').value;
	var hiosa=document.getElementById('form1:inputHidden11').value;
	var termDeposit=document.getElementById('form1:inputHidden10').value; 
	var elem = document.getElementsByName('form1:alreadyWithUBank');
	var secAppAvl = document.getElementsByName('form1:secondAppAvailable');
	var secAppAlreadyUbank = document.getElementsByName('form1:secondAppAlreadyUBank');
	var custGroup = document.getElementById("group").value;
	document.getElementById("form1:typeofAccount").className=''; //Added for CR 18
	if(ob.value == "0")
	{
		document.getElementById("alreadyUBankLabelSingleDiv").style.display = '';
		document.getElementById("alreadyUBankDiv").style.display = '';
		document.getElementById("capcha").style.display = 'none';
		document.getElementById("alreadyUBankLabelJointDiv").style.display = 'none';
		document.getElementById("secondAppAvailableDiv").style.display = 'none';
		document.getElementById("secondAppAlreadyUBankDiv").style.display = 'none';
		
		if(custGroup == "CUSTOMER"||custGroup == "MEMBER")
 		{
 			document.getElementById("alreadyUBankLabelSingleDiv").style.display = 'none';
 			document.getElementById("alreadyUBankDiv").style.display = 'none';
		}else{
		     checkradio(elem);
		}
  	 } else {
			document.getElementById("alreadyUBankLabelJointDiv").style.display = '';
			document.getElementById("alreadyUBankDiv").style.display = '';
			document.getElementById("secondAppAvailableDiv").style.display = '';
			document.getElementById("capcha").style.display = 'none';
			document.getElementById("alreadyUBankLabelSingleDiv").style.display = 'none';
			
			if(custGroup == "CUSTOMER" || custGroup == "MEMBER"){
			   document.getElementById("alreadyUBankLabelJointDiv").style.display = 'none';
			   document.getElementById("alreadyUBankDiv").style.display = 'none';          
			}else{
				checkradio(elem);
				checkradio(secAppAvl);
				checkradio(secAppAlreadyUbank);
			}
  	 }
					
	document.getElementById('form1:commandButton3').style.display = '';
	var bottomDevider = document.getElementById("bottomDeviderLine");
  	if(bottomDevider != null){
  		bottomDevider.style.display = '';
  	}
	setFocus(1);
}
   		 
  


function onBodyLoad(ob,initial)
{
if(initial==1){
    document.getElementById('form1:termsAndCond').checked=false;
    document.getElementById('form1:selectedProducts').value='0';
    document.getElementById('form1:captchaText').value='';
    initField();
	return;
}
		document.getElementById('form1:commandButton3').style.display = ''; 
		document.getElementById("alreadyUBankLabelSingleDiv").style.display = 'none';
		document.getElementById("alreadyUBankDiv").style.display = 'none';
		document.getElementById("capcha").style.display = 'none';
		document.getElementById("alreadyUBankLabelJointDiv").style.display = 'none';
		document.getElementById("secondAppAvailableDiv").style.display = 'none';
		document.getElementById("secondAppAlreadyUBankDiv").style.display = 'none';
		var elem1 = document.getElementById('form1:pagesource');
		var elem = document.getElementsByName(ob);
		var custGroup = document.getElementById("group").value;
		var elem9=document.getElementById('form1:hiddenCustSingle').value;
		var elem10=document.getElementById('form1:hiddenFirstApplicant').value;
		var elem11=document.getElementById('form1:hiddenSecondApplicant').value;
		var elem12=document.getElementById('form1:hiddenWhatthis').value;
		var selectedProduct = document.getElementById('form1:inputHidden14').value;
		var hiosa=document.getElementById('form1:inputHidden11').value;
		var termDeposit=document.getElementById('form1:inputHidden10').value; 
		var termConditionChecked=document.getElementById('form1:termsAndCond');
		var accValue=document.getElementById('form1:hiddenTypeAccountTraverse').value;
		var typeAccount=document.getElementsByName('form1:typeofAccount');
		var alreadyUbank=document.getElementsByName('form1:alreadyWithUBank');
		var secAppAvailable=document.getElementsByName('form1:secondAppAvailable');
		var secondAppAlreadyUbank=document.getElementsByName('form1:secondAppAlreadyUBank');
		           	 var index_0 = 0;
					   var index_1 = 1;
						if(alreadyUbank.length==3){
						index_0 = 1;
						index_1 = 2;
						}
       if(elem1.value == "")
		{
		
		    if(termConditionChecked.checked==true)
		    {
		    
		    	enableradio(elem);
		    
		    
		   if(typeAccount[index_0].checked==true)
           {
           if(custGroup == "CUSTOMER" || custGroup == "MEMBER"){
           document.getElementById("alreadyUBankLabelSingleDiv").style.display = 'none';
            document.getElementById("alreadyUBankLabelJointDiv").style.display = 'none';
            document.getElementById("alreadyUBankDiv").style.display = 'none';	
           }
           else
           {
            document.getElementById("alreadyUBankLabelSingleDiv").style.display = '';
            document.getElementById("alreadyUBankLabelJointDiv").style.display = 'none';
            document.getElementById("alreadyUBankDiv").style.display = '';	
            }
            }
            else if(typeAccount[index_1].checked==true)
            {
             if(custGroup == "CUSTOMER" || custGroup == "MEMBER"){
             document.getElementById("alreadyUBankLabelJointDiv").style.display = 'none';
            document.getElementById("alreadyUBankLabelSingleDiv").style.display = 'none';
            document.getElementById("alreadyUBankDiv").style.display = 'none';	
            document.getElementById("secondAppAvailableDiv").style.display = '';
             }
             else
             {
            document.getElementById("alreadyUBankLabelJointDiv").style.display = '';
            document.getElementById("alreadyUBankLabelSingleDiv").style.display = 'none';
            document.getElementById("alreadyUBankDiv").style.display = '';	
            document.getElementById("secondAppAvailableDiv").style.display = '';
            }
          }
           if(typeAccount[index_0].checked==true && alreadyUbank[index_1].checked==true)
          	 {
           		document.getElementById('form1:commandButton3').style.display = '';
           		document.getElementById("capcha").style.display = '';
            }
             
             if(typeAccount[index_1].checked==true && secAppAvailable[index_1].checked==true)
          	 {
          	 
           		document.getElementById('form1:commandButton3').style.display = '';
           		document.getElementById("capcha").style.display = '';
             }
             
             if(typeAccount[index_1].checked==true && secAppAvailable[index_0].checked==true)
             {
             document.getElementById("secondAppAlreadyUBankDiv").style.display = '';
             }
             
             if(typeAccount[index_1].checked==true && secAppAvailable[index_0].checked==true
              && secondAppAlreadyUbank[index_1].checked==true)
          	 {
          	     document.getElementById("secondAppAlreadyUBankDiv").style.display = '';
           		document.getElementById('form1:commandButton3').style.display = '';
            document.getElementById("capcha").style.display = '';
           }
             	
      		} 
    		 else {
        		  disableradio(elem);
	  			  if(selectedProduct==hiosa){
	    			if(elem9==2 || (elem10==2 && elem11==0)||(elem10==2 && elem11==1)|| (elem10==2 && elem11==2)) 
          			{
			            document.getElementById('form1:commandButton3').style.display = ''; 
						document.getElementById("alreadyUBankLabelSingleDiv").style.display = 'none';
						document.getElementById("alreadyUBankDiv").style.display = 'none';
			            document.getElementById("capcha").style.display='none';
						document.getElementById("alreadyUBankLabelJointDiv").style.display = 'none';
						document.getElementById("secondAppAvailableDiv").style.display = 'none';
						document.getElementById("secondAppAlreadyUBankDiv").style.display = 'none';
			        }
        
	     		}
	     		if(selectedProduct==termDeposit)
	     		{
	         		if(elem9==2 || (elem10==2 && elem11==0)||(elem10==2 && elem11==1)|| (elem10==2 && elem11==2))
          			{
			            document.getElementById('form1:commandButton3').style.display = ''; 
						document.getElementById("alreadyUBankLabelSingleDiv").style.display = 'none';
						document.getElementById("alreadyUBankDiv").style.display = 'none';
			            document.getElementById("capcha").style.display='none';
						document.getElementById("alreadyUBankLabelJointDiv").style.display = 'none';
						document.getElementById("secondAppAvailableDiv").style.display = 'none';
						document.getElementById("secondAppAlreadyUBankDiv").style.display = 'none';
              		}
        		}
          }
    
	   }else if(elem1.value == "GoBack"){
	   
			document.getElementById('form1:commandButton3').style.display = '';
			termConditionChecked.checked=false;
			disableradio(elem);
			checkradio(elem);
 
			}
  }

function checkSecondAppAvl(secAppAvl)
{
		document.getElementById("form1:secondAppAvailable").className='radioButtonSpacing marginBottomTen'; //Added for CR 18
	var custGroup = document.getElementById("group").value;
var secAppAlreadyUbank = document.getElementsByName('form1:secondAppAlreadyUBank');
	if(secAppAvl.value == "true")
	{
	     	document.getElementById("secondAppAlreadyUBankDiv").style.display='';
		document.getElementById("capcha").style.display='none';
	}else{
	    document.getElementById("secondAppAlreadyUBankDiv").style.display='none';
        checkradio(secAppAlreadyUbank);
		if(('MEMBER' == custGroup)||('CUSTOMER' == custGroup)){
			document.getElementById("capcha").style.display='none';
		}else{
			document.getElementById("capcha").style.display='';
		}

	}
setFocus(1);
}

function checkradio(tempvar){
for (i=0;i<tempvar.length;i++){
      tempvar[i].checked=false;
}
window.firstApplicant="";
window.secondApplicant="";
}

function disableradio(tempvar){
	for (i=0;i<tempvar.length;i++){
	      tempvar[i].disabled=true;
	}
	var bottomDeviderLine = document.getElementById("bottomDeviderLine");
	if(bottomDeviderLine != null){
	 	bottomDeviderLine.style.display = 'none';
	}
}
	
function enableradio(tempvar){
for (i=0;i<tempvar.length;i++){
      tempvar[i].disabled=false;
}
}
	
function confirmField(ob)
{
var elem = "";  
elem = document.getElementsByName('form1:typeofAccount');
if(ob.checked)
{
enableradio(elem);
}
else
{
disableradio(elem);
checkradio(elem);
document.getElementById("alreadyUBankLabelSingleDiv").style.display = 'none';
document.getElementById("alreadyUBankDiv").style.display = 'none';
document.getElementById("capcha").style.display = 'none';
document.getElementById("alreadyUBankLabelJointDiv").style.display = 'none';
document.getElementById("secondAppAvailableDiv").style.display = 'none';
document.getElementById("secondAppAlreadyUBankDiv").style.display = 'none';
}
setFocus(1);
} 


function initField()
{
var elem = "";  
elem = document.getElementsByName('form1:typeofAccount');
var termConditionChecked=document.getElementById('form1:termsAndCond');
if(termConditionChecked.checked==true)
{
enableradio(elem);
}
else
{
disableradio(elem);
checkradio(elem);
document.getElementById("alreadyUBankLabelSingleDiv").style.display = 'none';
document.getElementById("alreadyUBankDiv").style.display = 'none';
document.getElementById("capcha").style.display = 'none';
document.getElementById("alreadyUBankLabelJointDiv").style.display = 'none';
document.getElementById("secondAppAvailableDiv").style.display = 'none';
document.getElementById("secondAppAlreadyUBankDiv").style.display = 'none';
}
setFocus(1);
} 

function setFocus(index){

  		if(index == 1){
					 	var commandBtn = document.getElementById('form1:commandButton3');
						if(null != commandBtn){
							commandBtn.focus();
						}
					} 
				}

     /* Function On Body Load of PersonalDetails.jsp */
    
    
	function onPersonalDetailsLoad(ob,ob1,ob2,ob3,ob4,ob5)
		{
		document.getElementById('form1:securityQuestion').setAttribute( 'autocomplete', 'off' );
		document.getElementById('form1:otherSecurityQuestion').setAttribute( 'autocomplete', 'off' );
		document.getElementById('form1:securityAns').setAttribute( 'autocomplete', 'off' );
		var elem = ""; 
		var elem3= "";
		var elem4="";
		var elem5="";
		var elem6="";
		var elem7="";
		var elem8="";
		var country="";
		var previousState="";
	    var hiosa="";
	    var termDeposit="";
	    elem =document.getElementById(ob);
		elem3 =document.getElementById(ob1);
		elem4= document.getElementById(ob2);
	elem5= document.getElementById(ob3);
	elem6=document.getElementById(ob4)

	// Selected product	
	    elem7 =document.getElementById(ob5);
   hiosa=document.getElementById('form1:inputHidden11').value;
	    
		 termDeposit=document.getElementById('form1:inputHidden10').value;
	   	elem8= document.getElementById('form1:hiddenTitle').value;
		 document.getElementById('form1:subTitle').style.display = 'none';
		 document.getElementById('form1:outputLabel414').style.display = 'none'
		
	
         //JIRA ID :  	 9NT932IT-1017 Start 
		 country= document.getElementById('form1:hiddenCountry').value;
		
	         elem10=document.getElementById('form1:hiddenLongLived').value;
	     //JIRA ID :  	 9NT932IT-1017 END 
		if(elem.value == 0)
		{
		//Single Account
			
			if(elem3.value == 1)
			{
					document.getElementById("panelGrid21Div").style.display = '';
							document.getElementById("panelGrid3Div").style.display = '';
			
				document.getElementById("panelGrid36div").style.display = '';
				document.getElementById("dividerLineDiv1").style.display = '';
				document.getElementById("panelgrid25Div").style.display = 'none';
		     document.getElementById("panelGrid26Div").style.display = 'none';
			    
			     document.getElementById("panelGrid27Div").style.display = 'none';
				document.getElementById("panelGrid29Div").style.display = 'none';
				document.getElementById("panelGrid28Div").style.display = 'none';
				//changes for font-integration
				document.getElementById("dividerLineDiv2").style.display = 'none';
			 document.getElementById("panelgrid251Div").style.display = 'none';
			 document.getElementById("panelgrid255Div").style.display = 'none';
			 document.getElementById("panelgrid254Div").style.display = '';
			}
			else if(elem3.value == 2){
			
				document.getElementById("panelgrid25Div").style.display = '';
				document.getElementById("panelGrid26Div").style.display = '';
				document.getElementById("panelGrid27Div").style.display = '';
				document.getElementById("panelGrid29Div").style.display = '';
				//changes for font-integration
			   	document.getElementById("dividerLineDiv1").style.display = '';
				document.getElementById("panelGrid21Div").style.display = 'none';
				document.getElementById("panelGrid3Div").style.display = 'none';
				document.getElementById("panelGrid36div").style.display = 'none';
				document.getElementById("panelGrid33Div").style.display = 'none';
				//changes for font-integration
				document.getElementById("dividerLineDiv2").style.display = 'none';
				document.getElementById("panelgrid251Div").style.display = 'none';
			 	document.getElementById("panelgrid255Div").style.display = 'none';
			 	document.getElementById("panelgrid254Div").style.display = '';
			}
		}
		else
		{
		//joint account
		
			if(elem4.value == 0 || elem4.value == 1)
			{
			 //first applicant
			//changes for font-integration
			   document.getElementById("dividerLineDiv2").style.display = '';
				document.getElementById("panelGrid21Div").style.display = '';
				document.getElementById("panelGrid3Div").style.display = '';
			
				document.getElementById("panelGrid36div").style.display = '';
				
				document.getElementById("panelgrid251Div").style.display = 'none';
			 	document.getElementById("panelgrid255Div").style.display = '';
			 	document.getElementById("panelgrid254Div").style.display = 'none';
			 	
				document.getElementById("panelgrid25Div").style.display = 'none';
				
				document.getElementById("panelGrid26Div").style.display = 'none';
				document.getElementById("panelGrid27Div").style.display = 'none';
				document.getElementById("panelGrid29Div").style.display = 'none';
				//changes for font-integration
				document.getElementById("dividerLineDiv1").style.display = 'none';
				
			}
			
			if(elem4.value == 2)
			{
			 //first applicant  visitor
			if(elem5.value == 2)
				{
				//second applicant visitor
					if(elem6.value== "true")
					{
					
						document.getElementById("panelgrid25Div").style.display = 'none';
						document.getElementById("panelgrid251Div").style.display = '';
						document.getElementById("panelGrid26Div").style.display = '';
						document.getElementById("panelGrid27Div").style.display = '';
									        
						document.getElementById("panelGrid29Div").style.display = '';
					//changes for font-integration
						document.getElementById("dividerLineDiv2").style.display = '';
						
						document.getElementById("panelGrid21Div").style.display = 'none';
						document.getElementById("panelGrid3Div").style.display = 'none';
						
					
						document.getElementById("panelGrid36div").style.display = 'none';
					//changes for font-integration
						document.getElementById("dividerLineDiv1").style.display = 'none';
					    document.getElementById("panelgrid255Div").style.display = '';
					    document.getElementById("panelgrid254Div").style.display = 'none';
					}
				else
					{
					    document.getElementById("panelgrid25Div").style.display = 'none';
						document.getElementById("panelgrid251Div").style.display = '';
					   document.getElementById("panelGrid26Div").style.display = '';
						document.getElementById("panelGrid27Div").style.display = '';
						document.getElementById("panelGrid29Div").style.display = '';
						//changes for font-integration
						document.getElementById("dividerLineDiv2").style.display = '';
						document.getElementById("dividerLineDiv1").style.display = 'none';
						document.getElementById("panelgrid255Div").style.display = '';
					    document.getElementById("panelgrid254Div").style.display = 'none';
						document.getElementById("panelGrid21Div").style.display = 'none';
						document.getElementById("panelGrid3Div").style.display = 'none';
					
						document.getElementById("panelGrid36div").style.display = 'none';
					
						
		            }
		
		         }
				 if(elem5.value == 1 || elem5.value == 0)
				 { 
				        
						document.getElementById("panelgrid25Div").style.display = 'none';
						document.getElementById("panelgrid251Div").style.display = '';
						
						document.getElementById("panelGrid27Div").style.display = '';
						
						document.getElementById("panelGrid29Div").style.display = '';
						
					
						//changes for font-integration
						document.getElementById("dividerLineDiv2").style.display = '';
						
						document.getElementById("panelGrid26Div").style.display = '';
						
						//changes for font-integration
						document.getElementById("dividerLineDiv1").style.display = 'none';
						document.getElementById("panelgrid255Div").style.display = '';
					    document.getElementById("panelgrid254Div").style.display = 'none';
					    
						document.getElementById("panelGrid21Div").style.display = 'none';
						
						document.getElementById("panelGrid3Div").style.display = 'none';
						
					
						document.getElementById("panelGrid36div").style.display = 'none';
						
					}
			}
			
		
		}
		
		  if(elem8=="Other")
		  {
		  document.getElementById('form1:subTitle').style.display = '';
		  document.getElementById('form1:outputLabel414').style.display = ''
		  }
		  else
		  {
		  document.getElementById('form1:subTitle').style.display = 'none';
		  document.getElementById('form1:outputLabel414').style.display = 'none'
		  }
		  
		   }
		
	/* This is For Second PersonalDetails.jsp */
	
	function onSecondPersonalDetailsLoad(ob,ob1,ob2,ob3,ob4)
	{
	document.getElementById('form1:securityQuestion').setAttribute( 'autocomplete', 'off' );
	document.getElementById('form1:otherSecurityQuestion').setAttribute( 'autocomplete', 'off' );
	document.getElementById('form1:securityAns').setAttribute( 'autocomplete', 'off' );
	//added new change for font-integration 19-Jun-2009 second personal details
		document.getElementById("panelGrid53Div").style.display = 'none';
		document.getElementById("panelGrid50Div").style.display = 'none';
	 var elem=""
	 var elem2="";
	 var elem3="";
	 var elem4="";
	 var elem5="";
	 var elem8="";
	 var elem10="";
	 var country="";
	 elem= document.getElementById(ob);
	 elem2=document.getElementById(ob1);
	 elem3= document.getElementById(ob2);
	 elem4= document.getElementById(ob3);
	 elem5= document.getElementById(ob4);
	 var hiosa=document.getElementById('form1:inputHidden11').value;
	 var termDeposit=document.getElementById('form1:inputHidden10').value; 
	 document.getElementById('form1:subTitle').style.display = 'none';
	 document.getElementById('form1:outputLabel414').style.display = 'none' 
	 elem8= document.getElementById('form1:hiddenTitle').value;
	 //JIRA ID :  	 9NT932IT-1017 Start
	 elem10=document.getElementById('form1:hiddenLongLived').value;
	 country= document.getElementById('form1:hiddenCountry').value;
		//JIRA ID :  	 9NT932IT-1017 End 	  
	
	  if(elem.value == 1)
	  {
	  if(elem2.value == 1)
	  {
	  if(elem3.value == 2)
	  {
	  
	  if(elem4.value == "true" )
	  {
	  document.getElementById("panelGrid21Div").style.display = 'none';
	  document.getElementById("panelGrid3Div").style.display = 'none';
	
	  document.getElementById("panelGrid36Div").style.display = 'none';
	
	  document.getElementById("panelGrid50Div").style.display = '';
	  document.getElementById("panelGrid53Div").style.display = 'none';
	  }
	  else
	  {
	  document.getElementById("panelGrid21Div").style.display = '';
	  document.getElementById("panelGrid3Div").style.display = '';
	
	  document.getElementById("panelGrid36Div").style.display = '';
	
	  }
	  }
	  }
		
	 if(elem2.value == 0)
	  {  
	   if(elem3.value==2)
	      {
	     if(elem4.value == "false" || elem4.value == "true")
						  {
					document.getElementById("panelGrid53Div").style.display = '';
					document.getElementById("panelGrid50Div").style.display = '';
				
				
					document.getElementById("panelGrid21Div").style.display = 'none';
					document.getElementById("panelGrid3Div").style.display = 'none';
					
					document.getElementById("panelGrid36Div").style.display = 'none';
        }
			  }
	  }
		   if(elem2.value == 2)
		   {
		  
			   if(elem3.value == 2)
					 {
					   
			 if(elem4.value == "true")
						  {
				   
			     document.getElementById("panelGrid50Div").style.display = '';
			
			    document.getElementById("panelGrid53Div").style.display = 'none';
					   
					   }
				   }
	   
	      }
	   
	   }
	  
	 
	  
		  if(elem8=="Other")
		  {
		  document.getElementById('form1:subTitle').style.display = '';
		  document.getElementById('form1:outputLabel414').style.display = ''
		  }
		  else
		  {
		  document.getElementById('form1:subTitle').style.display = 'none';
		  document.getElementById('form1:outputLabel414').style.display = 'none'
		  }
	  
		}
		
	function isResAddressSameAsFirst()
	{
	var group = document.getElementById('form1:inputHidden4').value;
	var resiAddress;
	if(group == "0")
	{
	resiAddress=""
	}
	else
	{
	resiAddress = document.getElementsByName('form1:isSameAsFirst');
	var index_0 = 0;
	var index_1 = 1;
	if(resiAddress.length==3){
	index_0 = 1;
	index_1 = 2;
	}
	if(resiAddress[index_0].checked == true)
	{
	document.getElementById('form1:panelGrid16').style.display = 'none';
	}
	else if(resiAddress[index_1].checked == true)
	{
	document.getElementById('form1:panelGrid16').style.display = '';
	}
	} 
	}
	
	function hideLicenseNO(ob)
		{
		var elem="";
		 elem=document.getElementById('form1:hiddenFileNO').value;
		}
	function hidetitlecheck(ob)
		 {
		  var elem="";
		 elem=document.getElementById('form1:hiddenTitle').value;
	   	 }
		
		function hideTitle(ob)
		{
		if(ob.value=="Other")
		{
		document.getElementById('form1:subTitle').style.display = ''
		document.getElementById('form1:outputLabel414').style.display = ''
		
		}
		else
		{
		document.getElementById('form1:subTitle').style.display = 'none'
		document.getElementById('form1:outputLabel414').style.display = 'none'
		}
		}
		
			
	
		
/*   Function for hiding Security Question    */
		 function hideQuestion(ob)
		 {
		 
		 var elem="";
		 elem=document.getElementById(ob)
		 
		 if (elem.value == 37)
		 {
		 document.getElementById("panelGrid28Div").style.display = '';
		 }
		 else
		 {
		 document.getElementById("panelGrid28Div").style.display = 'none';
		 document.getElementById("form1:otherSecurityQuestion").value= '';
		 }
		 }
 
 
 /*   Function for hiding How u  hear   */
 
		 function hideHowHear(ob)
		 {
		 hiddenInfoSource =document.getElementById('form1:hiddenInfoSource').value;
		 
		 var elem="";
		 elem=document.getElementById(ob);
		if(elem.value != null) {
		hiddenInfoSource = elem.value;
		}
	
		 if(hiddenInfoSource == 1 || hiddenInfoSource == 3)
		 {
		  
		 document.getElementById("panelGrid10Div").style.display = '';
		 document.getElementById("panelGrid9Div").style.display = 'none';
		 }
		 else if(hiddenInfoSource == 4)
		 {
		
		  document.getElementById("panelGrid9Div").style.display = '';
		   document.getElementById("panelGrid10Div").style.display = 'none';
		 }
		 else
		 {
		  document.getElementById("panelGrid10Div").style.display = 'none';
		   document.getElementById("panelGrid9Div").style.display = 'none';
		 }
		 }
 
 
 /*   Function for hiding Scurity Question  */
		 
		 function hideActQuestion(ob)
		 {
		 var elem="";
		 elem=document.getElementById(ob)
		
		 if (elem.value == 37)
		 {
		 document.getElementById("panelGrid33Div").style.display = '';
		 }
		 else
		 {
		 document.getElementById("panelGrid33Div").style.display = 'none';
		 }
		 }
 
 
  /*   Function for showing the values when click on Go back button */
     function hideComChannelcheck(ob)
       {
       
       var obj=document.getElementById('form1:hiddenThanks').value;
       
            if(obj==1 ){
        
          	document.getElementById("panelGrid35Div").style.display = '';
	             
	               
	           }else{
            
             	document.getElementById("panelGrid35Div").style.display = 'none';
	               
         }
       }
  
 
 
  /*   Function for hiding No Thanks   */
	        function hideCommunicationChannel(ob){ 
	  
              if(ob.value==1 ){
        
	              	document.getElementById("panelGrid35Div").style.display = '';
	    
	        
	          }else{
	           
					document.getElementById("panelGrid35Div").style.display = 'none';
	               
	              }
	      }
 
 function hideCommunicationChannel()
 {
 	typeAcc=document.getElementsByName("form1:selectOneRadio3");
 	var index_0 = 0;
	var index_1 = 1;
	if(typeAcc.length==3){
	index_0 = 1;
	index_1 = 2;
	}
 	if(document.getElementsByName("form1:selectOneRadio3")[index_0].checked==false)
 	{
		document.getElementById("panelGrid35Div").style.display = '';
 	}
 	else
 	{
 		document.getElementById("panelGrid35Div").style.display = 'none';
 	}
 }
 

 /*   Function for showing the values when click on Go back button */
 
 function hidePostalAddresscheck(ob)
	 {
	  var elem="";
	     elem=document.getElementById('form1:hiddenAddress');
 
	      if(elem.value==1)
	      {
	      
	      document.getElementById("panelGrid20Div").style.display = '';
	      }
	      else
	      {
	      document.getElementById("panelGrid20Div").style.display = 'none';
	      }
	 }
 
 /*   Function for hiding Postal Address   */
 
		
 
	 function hidePostalAddressonLoad(ob)
		 {
		  
		 if(ob.value==1 ){
                    
                      document.getElementById("panelGrid20Div").style.display = '';
                        
                    }else{
				   		document.getElementById("panelGrid20Div").style.display = 'none';
                       
                    } 
					    
		
		 }
		 
	function hidePostalAddressonLoad()
		 {
		 	typeAcc=document.getElementsByName("form1:postalAddress");
		 		var index_0 = 0;
				var index_1 = 1;
				if(typeAcc.length==3){
				index_0 = 1;
				index_1 = 2;
				}
				if(document.getElementsByName("form1:postalAddress")[index_0].checked==false)
	            {
	            	document.getElementById("panelGrid20Div").style.display = '';
	            }
	            else
	            {
	               document.getElementById("panelGrid20Div").style.display = 'none';
				}
		
		 }
		 
 /*   Function for showing Exemeption Code when clicking on Go back button  */
 
	function hideExmeCodeCheck()
	  {
		       
		    var obj= document.getElementById('form1:hiddenExempt').value;
		  
		    if(obj == "true")
		    {
		   
		     document.getElementById("panelGrid45Div").style.display = '';
		     document.getElementById("form1:inputtaxFileNo").disabled = true;
		    }
		    else
		    {
		    
		     document.getElementById("panelGrid45Div").style.display = 'none';
		     document.getElementById("form1:inputtaxFileNo").disabled = false;
		    }
		    
	  }
		   
 /*   Function for hiding Exemeption Code   */
 
		 function hideExemCodeonLoad(ob)
		 {
		    var commonsourcereq=ob.checked;
              var licNoVal = document.getElementById('form1:inputtaxFileNo').value;
		       licNoVal = licNoVal.replace(/^\s+/, "").replace(/\s+$/, "");
               var msg ="Please be aware that you've indicated you don't have a TFN code. This will clear the information you've already entered"; 
                if(commonsourcereq == true)
		       {
		         if(""!=licNoVal ){
		       		if (confirm(msg)){
		       		document.getElementById("form1:inputtaxFileNo").value='';
		       		document.getElementById("form1:inputtaxFileNo").disabled = true;
		       		document.getElementById("form1:inputtaxFileNo").className = 'inputTextShortAppOnline';
					//document.getElementById("form1:taxFileNoOkDiv").className = 'clientValidationOK';
					document.getElementById("taxFileNoErrorDiv").innerHTML = '';
//					document.getElementById("taxFileNoOkDiv").innerHTML = "OK";
					
				     		 document.getElementById("panelGrid45Div").style.display = '';
					return true;
		       	                
		       		}
		       		else
		       		{
		       		ob.checked = false;
		       		document.getElementById("form1:inputtaxFileNo").disabled = false;
		       		}
		       	}
		          else
		       {
		        document.getElementById("form1:inputtaxFileNo").disabled = true;
		         document.getElementById("panelGrid45Div").style.display = '';
		         document.getElementById("form1:inputtaxFileNo").value='';
		         }
		       }
		       else
		       {
		        document.getElementById("form1:inputtaxFileNo").disabled = false;
		         document.getElementById("panelGrid45Div").style.display = 'none';
		         // added for incident 14257126
		         document.getElementById("form1:exemCodes").value ='0';
		         // added for incident 14257126
		       }
		   }
		   
		   
  	/*   Function for showing license when clicking on Go back button   */
		   
		function hideLicenseCheck(ob)
		{
		var obj = document.getElementById('form1:hiddenLicense').value;
		  if(obj == "true")
		  {
		  document.getElementById('form1:licenseNo').disabled=true;
		   document.getElementById('form1:licenseState').disabled=true;
		  }
		  else
		  {
	  document.getElementById('form1:licenseNo').disabled=false;
		   document.getElementById('form1:licenseState').disabled=false;
		  }
		}
		   
/*   Function for hiding license   */
   
		 function hideLicenseonLoad(ob)
		   {
             var commonsourcereq=ob.checked;
             var objLicenceNo=document.getElementById('form1:licenseNo');
             var objLicenceState=document.getElementById('form1:licenseState');
		     var licNoVal = document.getElementById('form1:licenseNo').value;
		     licNoVal = licNoVal.replace(/^\s+/, "").replace(/\s+$/, "");
		     var msg = "Please be aware that you've indicated you don't have a drivers licence. This will clear the information you've already entered";
                if(commonsourcereq == true)
		       {
		       	if(""!=licNoVal || document.getElementById('form1:licenseState').value!=0){
		       		if (confirm(msg)){
				        objLicenceNo.value='';
				        objLicenceState.value='';
		         		objLicenceNo.disabled=true;
		         		objLicenceState.disabled=true;
				        objLicenceState.value='0';
				       // document.getElementById("licenseStateOkDiv").innerHTML='';
				        document.getElementById("licenseStateErrorDiv").innerHTML='';
				       // document.getElementById("licenseNoOkDiv").innerHTML='';
				        document.getElementById("licenseNoErrorDiv").innerHTML='';
				        objLicenceNo.className='inputTextShortAppOnline';
				       	objLicenceState.className='inputComboBoxTitle';
		       
					}else{
						ob.checked = false;
						document.getElementById('form1:licenseNo').disabled=false;
						document.getElementById('form1:licenseState').disabled=false;
					}
		         }
		         else{
		         document.getElementById('form1:licenseNo').disabled=true;
		         document.getElementById('form1:licenseState').disabled=true;
		         objLicenceNo.className='inputTextShortAppOnline';
				 objLicenceState.className='inputComboBoxTitle';
				// document.getElementById("licenseStateOkDiv").innerHTML='';
				 document.getElementById("licenseStateErrorDiv").innerHTML='';
				// document.getElementById("licenseNoOkDiv").innerHTML='';
				 document.getElementById("licenseNoErrorDiv").innerHTML='';
		         }
		           
		       }
		       else
		       {
		      
		        document.getElementById('form1:licenseNo').disabled=false;
		        document.getElementById('form1:licenseState').disabled=false;
		       }
        		   }		   
	   

		   
/*   Function for hiding How Long Lived   */
 
		 function hidelongLived(ob)
		 {
		 
				 
		 var elem1="";
		 elem1=document.getElementById('form1:howLongLived');
		  elem3=document.getElementById('form1:hiddenPreviousAustralia').value;
		 
	   if(elem1.value == 1)
			{
			 document.getElementById("hiddenAddressDiv").style.display = '';
		      elem2=document.getElementById('form1:preAddInAus').value='0';
		       if(elem2==0)
		       {
		       document.getElementById("panelGrid518Div").style.display = '';
		       }
		       if(elem3==0)
		       {
		        document.getElementById("panelGrid520Div").style.display = 'none';
		        document.getElementById("panelGrid518Div").style.display = '';
		       }
		       else
		       {
		       document.getElementById("panelGrid520Div").style.display = '';
		        document.getElementById("panelGrid518Div").style.display = 'none';
		       }
		
			
			}
			else
			{
			  document.getElementById("hiddenAddressDiv").style.display = 'none';
			  document.getElementById("panelGrid520Div").style.display = 'none';
		        document.getElementById("panelGrid518Div").style.display = 'none';
			}		 	
          }	   
          
         function  displayOtherFields()
          {
          		typeAcc=document.getElementsByName("form1:preAddInAus");
         	 	var index_0 = 0;
				var index_1 = 1;
				if(typeAcc.length==3){
				index_0 = 1;
				index_1 = 2;
				}
          	var elem1="";
		 	elem1=document.getElementById('form1:howLongLived');
		 	
		 	if(elem1.value==1)
          {
	            if(document.getElementsByName("form1:preAddInAus")[index_0].checked==false)
            {
            document.getElementById("panelGrid518Div").style.display = 'none';
            document.getElementById("panelGrid520Div").style.display = '';
            }
            else
            {
               document.getElementById("panelGrid518Div").style.display = '';
               document.getElementById("panelGrid520Div").style.display = 'none';
			}		 	
			}		 	
          }	   
		   
          
           function hideAustraliacheck(ob)
           {
             var elem1=document.getElementById('form1:hiddenPreviousAustralia').value;
          }	   
		   
		   //JIRA ID :  	 9NT932IT-1017 Start
      	/*   Function for Disabling State  when click on Go Button  */  
       function   hideCountrycheck(ob)
         {
           document.getElementById('form1:hiddenCountry').value;
           
         }
          //JIRA ID :  	 9NT932IT-1017 End
         
		   
         //JIRA ID :  	 9NT932IT-1017 Start 
		 /*   Function for Disabling Sate    */   
      	
		  function disableStateOther(ob)
		   {
		   
		   if(ob.value=="Australia")
		   {
		   
		    document.getElementById('form1:previousState').disabled=false;
		    document.getElementById('form1:otherPreviousStateValue').value='';
		    document.getElementById('form1:otherPreviousStateValue').disabled=true;
		   }
		   else
		   {
		     document.getElementById('form1:previousState').disabled=true;
		     document.getElementById('form1:previousState').value='Other';
 			 document.getElementById('form1:otherPreviousStateValue').disabled=false;
		   }
		   
		   }   
      	
		   //JIRA ID :  	 9NT932IT-1017 End
	   
 /*  For termDeposit.jsp */
	
 
 /*   Function for showing license when clicking on Go back button   */
 function hideTermcheck(ob)
	 {
	 var term = document.getElementsByName('form1:term');
	 		var index_4 = 4;
				if(term.length==6){
				index_4 = 5;
				}
	  if(term[index_4].checked==true)
	   {
	   	document.getElementById("panelGrid6Div").style.display = '';
	   }
	   else
	   {
	   document.getElementById("panelGrid6Div").style.display = 'none';
	   }
	  
	 }
 
 /* Function for hiding Interest Paid */
 
  function hideTermOnLoad(ob){
        document.getElementById("form1:term").className='radioButtonSpacingTD'; //Added for CR 18
  var matInsValue = document.getElementsByName('form1:atMaturity');
	 var index_0 = 0;
	 var index_1 = 1;
	 if(matInsValue.length==3)
	 {
	  index_0 = 1;
	  index_1 = 2;
	 }
                 if(ob.value==4 ){
                    
                	document.getElementById("panelGrid6Div").style.display = '';
                	document.getElementById("bankAccDetails").style.display = '';
					document.getElementById('form1:pgTdDetails').style.display = '';
					  
                 
	                      }else{
						if(matInsValue[index_1].checked==true)
						{
							document.getElementById("bankAccDetails").style.display = '';
							document.getElementById('form1:pgTdDetails').style.display = '';
						}
						else
						{
							document.getElementById("bankAccDetails").style.display = 'none';
							document.getElementById('form1:pgTdDetails').style.display = 'none';
						}	                      
							document.getElementById("panelGrid6Div").style.display = 'none';
                       
                    }
                    
                    
                    
                }
		 
	/*   Function for Instruction when clicking on Go back button   */
	
	function hidematInstructioncheck(ob)
	 {
	  var elem1="";
	   elem1= document.getElementById('form1:hiddenMatIns');
	
	   if(elem1.value==1)
	   {
	   	  document.getElementById("matInsDiv").style.display = '';
	    }
	   else
	   {
		      document.getElementById("matInsDiv").style.display = 'none';
	   }
	 }
	
	/* Function for hiding 	 Happen at Maturity */
	
	function hidematInstructiononLoad(ob)
	{
	var term = document.getElementsByName('form1:term');
	 		var index_4 = 4;
				if(term.length==6){
				index_4 = 5;
				}
		//changed on 19-Jun-2009 for font-integration
		document.getElementById("bankAccDetails").style.display = 'none';
		 document.getElementById('form1:pgTdDetails').style.display = 'none';
			   if(ob.value==1 ){
if(term[index_4].checked==true)
	                 {
	                 	document.getElementById("bankAccDetails").style.display = '';
						document.getElementById('form1:pgTdDetails').style.display = '';
	                 }
                                	document.getElementById("matInsDiv").style.display = '';
                                     	 }
                    	 else
                    	 {
						   		document.getElementById("matInsDiv").style.display = 'none';
                 var matInsValue = document.getElementsByName('form1:atMaturity');
                 checkradio(matInsValue);
                 if(term[index_4].checked==true)
	                 {
	                 	document.getElementById("bankAccDetails").style.display = '';
						 document.getElementById('form1:pgTdDetails').style.display = '';
	                 }
	                 else
	                 {
	                 	document.getElementById("bankAccDetails").style.display = 'none';
						document.getElementById('form1:pgTdDetails').style.display = 'none';
	                 }
                
                 }		
	}

	/* Function for hide Bank details*/
	
	function disableBankDetails(ob)
	{
			document.getElementById('form1:atMaturity').className='radioButtonSpacing';	//Added for CR 18
var term = document.getElementsByName('form1:term');
	 		var index_4 = 4;
				if(term.length==6){
				index_4 = 5;
				}
	 if(ob.value==1 && term[index_4].checked==false)
		  {
		  document.getElementById("bankAccDetails").style.display = 'none';
		  document.getElementById('form1:pgTdDetails').style.display = 'none';
	}
		else if(ob.value==2 || term[index_4].checked==true)
	{
		  	document.getElementById('form1:pgTdDetails').style.display = '';
		  document.getElementById("bankAccDetails").style.display = '';
		    document.getElementById('form1:acctName').value='';
		    document.getElementById('form1:nameOfBank').value='';
		    document.getElementById('form1:bsb').value='';
		    document.getElementById('form1:acctNumber').value='';
		  }
	
	}
	
	/* Function for remain hide Bank details*/
	
	function remainBankDetails()
	{
var term = document.getElementsByName('form1:term');
	 		var index_4 = 4;
				if(term.length==6){
				index_4 = 5;
				}
	//changed on 19-Jun-2009 for font-integration
	document.getElementById("bankAccDetails").style.display = 'none';
	document.getElementById("form1:pgTdDetails").style.display = 'none';
	var matInsValue = document.getElementsByName('form1:atMaturity');
	 var index_0 = 0;
	 var index_1 = 1;
	 if(matInsValue.length==3)
	 {
	  index_0 = 1;
	  index_1 = 2;
	 }
			if(matInsValue[index_0].checked==true && term[index_4].checked==false)
		{
		document.getElementById("bankAccDetails").style.display = 'none';
		document.getElementById('form1:pgTdDetails').style.display = 'none';
		}
		else if(matInsValue[index_1].checked==true || term[index_4].checked==true)
		  {
		 document.getElementById("bankAccDetails").style.display = '';
		 document.getElementById('form1:pgTdDetails').style.display = '';
		  }
	}
	
	function onLoadAccNickname(ob,ob1,ob2)
	{
		var term = document.getElementsByName('form1:term');
	 		var index_4 = 4;
				if(term.length==6){
				index_4 = 5;
				}
	var selectedProduct = "";
	selectedProduct =document.getElementById(ob).value;
	var hiosa=document.getElementById('form1:inputHidden11').value;
	var termDeposit=document.getElementById('form1:inputHidden10').value;
	var atMaturityValue= document.getElementsByName(ob1);
	var maturityInsValue= document.getElementsByName(ob2);
	   var index_0 = 0;
	   var index_1 = 1;
		if(atMaturityValue.length==3){
		index_0 = 1;
		index_1 = 2;
		}
	
    if(selectedProduct == hiosa)
	{
	document.getElementById('form1:detailsDiv1').style.display = '';
	document.getElementById('form1:detailsDiv2').style.display = '';
	document.getElementById('form1:detailsDiv').style.display = 'none';
	document.getElementById("tdDetail1").style.display = 'none';
	document.getElementById("bankAccDetails").style.display = 'none';
	document.getElementById('form1:pgTdDetails').style.display = 'none';
	}
	else if(selectedProduct == termDeposit)
	{
	document.getElementById('form1:detailsDiv1').style.display = 'none';
	document.getElementById('form1:detailsDiv2').style.display = 'none';
	document.getElementById('form1:detailsDiv').style.display = '';
	document.getElementById("tdDetail1").style.display = '';
	document.getElementById("form1:footNote").style.display = '';
	document.getElementById("bankAccDetails").style.display = 'none';
	
	 var matInstruction=document.getElementsByName('form1:matInst');	
	if(matInstruction[index_1].checked == true && term[index_4].checked==false)
	{
	document.getElementById("bankAccDetails").style.display = 'none';
	document.getElementById('form1:pgTdDetails').style.display = 'none';
	}
	else if(matInstruction[index_0].checked == true || term[index_4].checked==true)
	{
	document.getElementById("bankAccDetails").style.display = '';
	document.getElementById('form1:pgTdDetails').style.display = '';
	} 
	
	}
    }
	

	
	/*   Function for hidning bank Details when clicking on Go back button   */
	
		function hideEndofTermCheck(ob)
			{
			 
			  var elem1="";
			  elem1= document.getElementById('form1:hiddenEndOfTerm');
			 
			  elem2= document.getElementById('form1:hiddenMatIns');
			  
			  
			 if(elem2.value==0)
			 {
			if(elem1.value==1)
			{
			 document.getElementById('form1:acctName').disabled=true;
		     document.getElementById('form1:nameOfBank').disabled=true;
		     document.getElementById('form1:bsb').disabled=true;
		     document.getElementById('form1:acctNumber').disabled=true;
		     document.getElementById('form1:acctName').value='';
		     document.getElementById('form1:nameOfBank').value='';
		     document.getElementById('form1:bsb').value='';
		     document.getElementById('form1:acctNumber').value='';
			}
			}
			else
			{
			
			 document.getElementById('form1:acctName').disabled=false;
		     document.getElementById('form1:nameOfBank').disabled=false;
		     document.getElementById('form1:bsb').disabled=false;
		     document.getElementById('form1:acctNumber').disabled=false;
			
			}
		}


	
	
	
	
	
	/*** Date             Jira Id          DescriptionofChange 
	____________________________________________________________
	12 feb2009            9NT932IT-634       Disaplying Other Security Question */
	                                                                         
	
	
  /* Jira Id Start 9NT932IT-634 */
  
/* Function security Question for Memebr */
  function securityQuestionDisplay()
  {
  
   var elem9=document.getElementById('form1:inputHidden22').value;
    
    document.getElementById("panelGrid917Div").style.display = '';
    /*Start Incident 14506572 - SECURITY QUESTION NOT UPDATED*/ 
    document.getElementById("emailpanelgrid").style.display = 'none';
    /*End Incident 14506572 - SECURITY QUESTION NOT UPDATED*/
    if(elem9==37)
    {
   
      document.getElementById("panelGrid16Div").style.display = 'none';
       document.getElementById("panelGrid916Div").style.display = '';
    }
    else
    {
    
    document.getElementById("panelGrid16Div").style.display = '';
    document.getElementById("panelGrid916Div").style.display = 'none';
    }
  }
  /* Function security question for Visitor */
  function visitorsecurityQuestionDisplay()
	  {
	   var elem10="";
	    elem10=document.getElementById('form1:inputHidden23').value;
	    
	     document.getElementById("panelGrid920Div").style.display = '';
	     
	      if(elem10==37)
	      {
	        
	      document.getElementById("panelGrid19Div").style.display = 'none';
          document.getElementById("panelGrid919Div").style.display = '';
	      }
	       else
	       {
	       
	       document.getElementById("panelGrid19Div").style.display = '';
           document.getElementById("panelGrid919Div").style.display = 'none';
	       }
	  }


   /* Function security question for SecondPersonalDetails */
   
     function secondSecurityQuestionDiaplay()
     {
     
       var elem11="";
        elem11=document.getElementById('form1:inputHidden24').value;
    
   }

	 function setFocusField()
          {
              var fieldtofocus = document.getElementById('form1:focusFlag').value;
              if(fieldtofocus != ''){
                  
                  document.getElementById(fieldtofocus).focus();
              }
              
          }

   /* Jira Id End 9NT932IT-634 */

 /* Function for Hiding ReviewSubmit.jsp */
 
 	
 function hideReviewSubmit(ob,ob1,ob2,ob3,ob5)
		{
		
		var elem="";
			var elem1="";
			var elem2="";
			var elem3="";
			var elem4="";
			var elem5="";
			var hiosa="";
			var termDeposit="";
			var howlongLived="";
			var previousState="";
			var postalAddress="";
			var secondHowlongLived="";
			var secondPreviousState="";
			var secondPostalAddress="";
			var securityQuestion="";
		    var secondPersonalSecurityQuesion="";
		    var country="";
		    var secondCountry="";
		     //changed for Font-Integration 20-Jun-2009
		     document.getElementById("panelGrid52Div").style.display = 'none';
		     document.getElementById("secondApplicantDiv").style.display = 'none';
		    			elem=document.getElementById('form1:inputHidden1');
					elem1= document.getElementById('form1:inputHidden2');
					elem2=document.getElementById('form1:inputHidden3');
					elem3=document.getElementById('form1:inputHidden4');
					elem4=document.getElementById('form1:inputHidden6');
					elem5= document.getElementById('form1:inputHidden8');
			hiosa=document.getElementById('form1:inputHidden11').value;
			termDeposit=document.getElementById('form1:inputHidden10').value;
			howlongLived=document.getElementById('form1:inputHidden16').value;
		previousState=document.getElementById('form1:inputHidden17').value;
			postalAddress=document.getElementById('form1:inputHidden18').value;
		 secondHowlongLived=document.getElementById('form1:inputHidden19').value;
			  secondPreviousState=document.getElementById('form1:inputHidden20').value;
				  secondPostalAddress=document.getElementById('form1:inputHidden21').value;
				securityQuestion=document.getElementById('form1:inputHidden22').value;
			visitorsecurityQuestion=document.getElementById('form1:inputHidden23').value;
	 secondPersonalSecurityQuesion=document.getElementById('form1:inputHidden24').value;
			 country=document.getElementById('form1:inputHidden25').value;
		secondCountry=document.getElementById('form1:inputHidden26').value;
		if(elem.value == 0 )
				 {
		     if(elem1.value == 0)
						 {
			      document.getElementById("panelGrid9Div").style.display = 'none';
						      document.getElementById("panelGrid15Div").style.display = 'none';
						      document.getElementById("panelGrid16Div").style.display = 'none';
						      document.getElementById("panelGrid19Div").style.display = 'none';
						      document.getElementById("panelGrid17Div").style.display = 'none';
						      document.getElementById("panelGrid10Div").style.display = 'none';
						            document.getElementById("panelGrid52Div").style.display = '';
						      //    document.getElementById("panelGrid8Div").style.display = ''; 
						 }
						 if(elem1.value == 1)
						 {
						 
						   if(elem5.value== hiosa)
						   {
						   
						  document.getElementById("panelGrid9Div").style.display = '';
						  document.getElementById("panelGrid15Div").style.display = '';
									  securityQuestionDisplay();
						  document.getElementById("panelGrid17Div").style.display = '';
						  document.getElementById("panelGrid10Div").style.display = '';
						  document.getElementById("panelGrid511Div").style.display = '';
						    if(postalAddress==0)
							    {
							
							    document.getElementById("panelGrid536Div").style.display = 'none';
							    }
							    else
							    {
							 
							    document.getElementById("panelGrid536Div").style.display = '';
							    }
							    if(howlongLived ==1)
							  {
							    
							    document.getElementById("panelGrid526Div").style.display = '';
							    //document.getElementById("panelGrid530Div").style.display = '';
							    }
							  else
							  {
							
							    document.getElementById("panelGrid526Div").style.display = 'none';
							 	//document.getElementById("panelGrid530Div").style.display = 'none';
								  }
							    
							    
						   }
						   else
						   {
						   document.getElementById("panelGrid9Div").style.display = '';
						  document.getElementById("panelGrid15Div").style.display = '';
						
						 securityQuestionDisplay();
						  document.getElementById("panelGrid17Div").style.display = '';
						  document.getElementById("panelGrid10Div").style.display = '';
						  document.getElementById("panelGrid52Div").style.display = '';
						//  document.getElementById("panelGrid8Div").style.display = ''; 
						 
						  document.getElementById("panelGrid511Div").style.display = ''; 
						  if(postalAddress==0)
							    {
							  
							    document.getElementById("panelGrid536Div").style.display = 'none';
							    }
							    else
							    {
							 
							    document.getElementById("panelGrid536Div").style.display = '';
							    }
							    if(howlongLived ==1)
							  {
							    
							    document.getElementById("panelGrid526Div").style.display = '';
							    //document.getElementById("panelGrid530Div").style.display = '';
							     }
							  else
							  {
							
							    document.getElementById("panelGrid526Div").style.display = 'none';
							 	//document.getElementById("panelGrid530Div").style.display = 'none';
											   
							   
							  }
							     
							  
						   }
						 
						 }
						 
					    if(elem1.value == 2)
						   {
						       if(elem5.value== hiosa)
							   {
						      
						      document.getElementById("panelGrid9Div").style.display = '';
							  document.getElementById("panelGrid15Div").style.display = '';
							
							  visitorsecurityQuestionDisplay();
							  document.getElementById("panelGrid17Div").style.display = '';
							  document.getElementById("panelGrid10Div").style.display = '';
							 
							  document.getElementById("panelGrid511Div").style.display = '';
							
							    if(postalAddress==0)
							    {
							
							    document.getElementById("panelGrid536Div").style.display = 'none';
							    }
							    else
							    {
							  
							    document.getElementById("panelGrid536Div").style.display = '';
							    }
							  
							  if(howlongLived ==1)
							  {
							    
							    document.getElementById("panelGrid526Div").style.display = '';
							    //document.getElementById("panelGrid530Div").style.display = '';
							 
							    
							  }
							  else
							  {
							
							    document.getElementById("panelGrid526Div").style.display = 'none';
							 	//document.getElementById("panelGrid530Div").style.display = 'none';
							 
							   
							   
							  }
							
							  
						   }
							    else
							    {
							    document.getElementById("panelGrid9Div").style.display = '';
							    document.getElementById("panelGrid15Div").style.display = '';
							   
							   
							   visitorsecurityQuestionDisplay();
							    document.getElementById("panelGrid17Div").style.display = '';
							    document.getElementById("panelGrid10Div").style.display = '';
							 
							   document.getElementById("panelGrid511Div").style.display = '';
							   
							   document.getElementById("panelGrid52Div").style.display = '';
						   //     document.getElementById("panelGrid8Div").style.display = '';
						       
						        if(postalAddress==0)
							    {
							
							    document.getElementById("panelGrid536Div").style.display = 'none';
							    }
							    else
							    {
							
							    document.getElementById("panelGrid536Div").style.display = '';
							    }
						         
						         if(howlongLived ==1)
							  {
							  
							    document.getElementById("panelGrid526Div").style.display = '';
							    //document.getElementById("panelGrid530Div").style.display = '';
							  
							    
							  }
							  else
								    {
								 
								    
								     document.getElementById("panelGrid526Div").style.display = 'none';
								     //document.getElementById("panelGrid530Div").style.display = 'none';
								
								   
								     }
						         
							    }
						      
							  
						   }
						
						 
						 
				}
				
		/*  Joint Account  */		
				else if(elem.value == 1)
				 {
				 document.getElementById("secondApplicantDiv").style.display = '';	
					 /* Start term depsoit  */
					   if(elem5.value == termDeposit)
					   {
					  
							/* First Applicant Member, second Applicant Customer,Mmeber,Visitor,Avaliable  */			
						if(elem2.value == 1)
						  { 
						 
						     if(elem3.value == 0)
						     {
						  
							          document.getElementById("panelGrid52Div").style.display = '';
						        //      document.getElementById("panelGrid8Div").style.display = '';
						              document.getElementById("panelGrid9Div").style.display = '';
								      document.getElementById("panelGrid15Div").style.display = '';
									
									
									securityQuestionDisplay();
									  document.getElementById("panelGrid17Div").style.display = '';
									  document.getElementById("panelGrid10Div").style.display = '';
									
									   document.getElementById("panelGrid511Div").style.display = '';
									 if(postalAddress==0)
									    {
								
									    document.getElementById("panelGrid536Div").style.display = 'none';
									    }
									    else
									    {
									  
									    document.getElementById("panelGrid536Div").style.display = '';
									    }
								    
								   if(howlongLived ==1)
								  {
							    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
								
								    
								  }
									  else
									  {
									  document.getElementById("panelGrid526Div").style.display = 'none';
								 	  //document.getElementById("panelGrid530Div").style.display = 'none';
								  
								   
								   
								      }
									   
									  
						     }
						     
						     if(elem3.value == 1)
						     {
						     
						             document.getElementById("panelGrid52Div").style.display = '';
						         //    document.getElementById("panelGrid8Div").style.display = '';
						              document.getElementById("panelGrid9Div").style.display = '';
								      document.getElementById("panelGrid15Div").style.display = '';
									
									
									  securityQuestionDisplay();
									  document.getElementById("panelGrid17Div").style.display = '';
									  document.getElementById("panelGrid10Div").style.display = '';
									
									  document.getElementById("panelGrid511Div").style.display = '';
									  if(postalAddress==0)
									    {
									
									    document.getElementById("panelGrid536Div").style.display = 'none';
									    }
								    else
									    {
								
									    document.getElementById("panelGrid536Div").style.display = '';
									    }
								     if(howlongLived ==1)
								      {
							    
									    document.getElementById("panelGrid526Div").style.display = '';
									    //document.getElementById("panelGrid530Div").style.display = '';
									 
								    
								  }
								else
									  {
									 document.getElementById("panelGrid526Div").style.display = 'none';
								 	 //document.getElementById("panelGrid530Div").style.display = 'none';
								 
								   
								   
								     }
									   
						     
						     }
							  if(elem3.value == 2)
							  {
							     
								  if(elem4.value == "true")
								     {
								   
								      document.getElementById("panelGrid52Div").style.display = '';
						         //     document.getElementById("panelGrid8Div").style.display = '';
								      document.getElementById("panelGrid9Div").style.display = '';
								      document.getElementById("panelGrid15Div").style.display = '';
									
									   securityQuestionDisplay();
									   secondSecurityQuestionDiaplay();
									  document.getElementById("panelGrid17Div").style.display = '';
									  document.getElementById("panelGrid10Div").style.display = '';
									
									  document.getElementById("panelGrid511Div").style.display = '';
							if(postalAddress==0)
									    {
									
									    document.getElementById("panelGrid536Div").style.display = 'none';
									    }
									    else
									    {
								
									    document.getElementById("panelGrid536Div").style.display = '';
									    }
									if(howlongLived ==1)
								  {
								    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
								 
								    
								  }
								  else
								  {
								
								    document.getElementById("panelGrid526Div").style.display = 'none';
								 	//document.getElementById("panelGrid530Div").style.display = 'none';
								 
								   
								   
								  }
								    
	                
										 
						  }
								  else
									  {
									
										 document.getElementById("panelGrid52Div").style.display = '';
							        //     document.getElementById("panelGrid8Div").style.display = '';
										     document.getElementById("panelGrid9Div").style.display = '';
									      document.getElementById("panelGrid15Div").style.display = '';
										
										securityQuestionDisplay();
										  document.getElementById("panelGrid17Div").style.display = '';
										  document.getElementById("panelGrid10Div").style.display = '';
										
										  document.getElementById("panelGrid511Div").style.display = '';
								  if(postalAddress==0)
										    {
									
										    document.getElementById("panelGrid536Div").style.display = 'none';
										    }
										    else
										    {
										
										    document.getElementById("panelGrid536Div").style.display = '';
										    }
										    
									if(howlongLived ==1)
								  {
								    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
								     
                        						    
								  }
								  else
								  {
								
								    document.getElementById("panelGrid526Div").style.display = 'none';
								 	//document.getElementById("panelGrid530Div").style.display = 'none';
								
								   
								   
								  }		    
										    
										    
							 }
							      
							  }
						      
						  }
						  
	/* First Applicant Member, second Applicant Customer,Mmeber,Visitor,Avaliable  */
						  
	/*  First Applicant Customer and second Applicant Customer,Member, ,Visitor,Avaliable */					  
			 if(elem2.value == 0)
						  {
						  
						 
							  if(elem3.value == 0)
							  {
							  
							   
								   document.getElementById("panelGrid52Div").style.display = '';
								//   document.getElementById("panelGrid8Div").style.display = '';
								   
								  }
							  if(elem3.value == 1)
							  {
								     document.getElementById("panelGrid52Div").style.display = '';
							//	     document.getElementById("panelGrid8Div").style.display = '';
							
							  }
						  if(elem3.value == 2)
						  {
						  
						  if(elem4.value == "true")
						  {
						   
							    document.getElementById("panelGrid52Div").style.display = '';
						//	    document.getElementById("panelGrid8Div").style.display = '';
							
							   
							     secondSecurityQuestionDiaplay();
						
							     }
							  else
							  {
							     
								     document.getElementById("panelGrid52Div").style.display = '';
							//	     document.getElementById("panelGrid8Div").style.display = '';
							   
							  }
						  }
						  
						  }
		  /*  First Applicant Customer and second Applicant Customer,Member ,Visitor,Avaliable */	
		 
		 /*  First Applicant Visitor and second Applicant Customer.Member ,Visitor,Avaliable */				  
				 if(elem2.value == 2)
						  {
						   
						   if(elem3.value == 0 || elem3.value == 1)
						   {
						 
						      document.getElementById("panelGrid52Div").style.display = '';
						//      document.getElementById("panelGrid8Div").style.display = '';
						   document.getElementById("panelGrid9Div").style.display = '';
						    document.getElementById("panelGrid15Div").style.display = '';
						
					
						    visitorsecurityQuestionDisplay();
						    document.getElementById("panelGrid17Div").style.display = '';
						 
						      document.getElementById("panelGrid10Div").style.display = '';
						      document.getElementById("panelGrid511Div").style.display = '';
					 if(postalAddress==0)
							    {
							
							    document.getElementById("panelGrid536Div").style.display = 'none';
							    }
							    else
							    {
							
							    document.getElementById("panelGrid536Div").style.display = '';
							    }
							    
					if(howlongLived ==1)
							  {
							    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
					           							    
							  }
							  else
							  {
							
							    document.getElementById("panelGrid526Div").style.display = 'none';
							 	//document.getElementById("panelGrid530Div").style.display = 'none';
						
							   
							   
							  } 
							    
						      
						      

						   }
						   if(elem3.value == 2)
						   {
							    if(elem4.value == "true")
								  {
									document.getElementById("panelGrid52Div").style.display = '';
							    //    document.getElementById("panelGrid8Div").style.display = '';
							       document.getElementById("panelGrid9Div").style.display = '';
							       document.getElementById("panelGrid15Div").style.display = '';
							       
							  
							           visitorsecurityQuestionDisplay();
							           
							           secondSecurityQuestionDiaplay();
							           
							       document.getElementById("panelGrid17Div").style.display = '';
							       document.getElementById("panelGrid10Div").style.display = '';
							       
							   
							        document.getElementById("panelGrid511Div").style.display = '';
							  
							  if(postalAddress==0)
								    {
								
								    document.getElementById("panelGrid536Div").style.display = 'none';
								    }
								    else
								    {
							
								    document.getElementById("panelGrid536Div").style.display = '';
								    }
								       
							 if(howlongLived ==1)
								  {
								    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
								   	  }
								  else
								  {
							        document.getElementById("panelGrid526Div").style.display = 'none';
								 	//document.getElementById("panelGrid530Div").style.display = 'none';
							
								   
								    }     
							       
						 
									       
							 		  }
							  else
								  {
									  
									document.getElementById("panelGrid52Div").style.display = '';
							 //       document.getElementById("panelGrid8Div").style.display = '';
								    document.getElementById("panelGrid9Div").style.display = '';
							        document.getElementById("panelGrid15Div").style.display = '';
							       
							        visitorsecurityQuestionDisplay();
							        document.getElementById("panelGrid17Div").style.display = '';
							        document.getElementById("panelGrid10Div").style.display = ''
							     
							        document.getElementById("panelGrid511Div").style.display = '';
							 if(postalAddress==0)
								    {
								
								    document.getElementById("panelGrid536Div").style.display = 'none';
								    }
								    else
								    {
								
								    document.getElementById("panelGrid536Div").style.display = '';
								    } 
						if(howlongLived ==1)
								  {
								    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
								    
                        				    
								  }
								  else
								  {
								
								    document.getElementById("panelGrid526Div").style.display = 'none';
								 	//document.getElementById("panelGrid530Div").style.display = 'none';
								
								   
								  }        
							        
							     
								  }
							   }
						   
						  }
						  
						 /*  First Applicant Visitor and second Applicant Customer.Member ,Visitor,Avaliable */		  
					 }
				/*  Finish  term deposit    */
				
				/* Start Hiosa */	 
					 if(elem5.value == hiosa)
					 {
					 
	  /*  Fisrt Applicant Member, second Applicant Customer, Memebr,Visitor,Avaliable */		
					if(elem2.value == 1)
						  { 
						
						     if(elem3.value == 0)
						     {
						        	
							          document.getElementById("panelGrid52Div").style.display = 'none';
						           //   document.getElementById("panelGrid8Div").style.display = 'none';
						              document.getElementById("panelGrid9Div").style.display = '';
								      document.getElementById("panelGrid15Div").style.display = '';
									
									securityQuestionDisplay();
									  document.getElementById("panelGrid17Div").style.display = '';
									  document.getElementById("panelGrid10Div").style.display = '';
								
									  document.getElementById("panelGrid511Div").style.display = '';
							if(postalAddress==0)
								    {
								
								    document.getElementById("panelGrid536Div").style.display = 'none';
								    }
								    else
								    {
							
								    document.getElementById("panelGrid536Div").style.display = '';
								    }
								    
								    
								 if(howlongLived ==1)
								  {
								    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
								    
                      			  }
								  else
								  {
								
								    document.getElementById("panelGrid526Div").style.display = 'none';
								 	//document.getElementById("panelGrid530Div").style.display = 'none';
								  }   
								    
								    
									  
									  
						     }
						     
						     if(elem3.value == 1)
						     {
						     
						              document.getElementById("panelGrid52Div").style.display = 'none';
						     //         document.getElementById("panelGrid8Div").style.display = 'none';
						              document.getElementById("panelGrid9Div").style.display = '';
								      document.getElementById("panelGrid15Div").style.display = '';
									
									   securityQuestionDisplay();
									  document.getElementById("panelGrid17Div").style.display = '';
									  document.getElementById("panelGrid10Div").style.display = '';
								
									   document.getElementById("panelGrid511Div").style.display = '';
							if(postalAddress==0)
									    {
								
									    document.getElementById("panelGrid536Div").style.display = 'none';
									    }
									    else
									    {
								
									    document.getElementById("panelGrid536Div").style.display = '';
									    }
							 if(howlongLived ==1)
							  {
							    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
								     
                              }
								  else
								  {
								
								    document.getElementById("panelGrid526Div").style.display = 'none';
								 	//document.getElementById("panelGrid530Div").style.display = 'none';
										   
								   
								  }			  
									  
									  
						}
							  if(elem3.value == 2)
							  {
							     
								  if(elem4.value == "true")
								     {
								     
								     document.getElementById("panelGrid52Div").style.display = 'none';
						      //        document.getElementById("panelGrid8Div").style.display = 'none';
								      document.getElementById("panelGrid9Div").style.display = '';
								      document.getElementById("panelGrid15Div").style.display = '';
									 
									 securityQuestionDisplay();
									 secondSecurityQuestionDiaplay();
									  document.getElementById("panelGrid17Div").style.display = '';
									  document.getElementById("panelGrid10Div").style.display = '';
									
									  document.getElementById("panelGrid511Div").style.display = '';
									
							if(postalAddress==0)
									    {
									
									    document.getElementById("panelGrid536Div").style.display = 'none';
									    }
									    else
									    {
									
									    document.getElementById("panelGrid536Div").style.display = '';
									    }
						       if(howlongLived ==1)
									  {
									    
									    document.getElementById("panelGrid526Div").style.display = '';
									    //document.getElementById("panelGrid530Div").style.display = '';
									     
                        								    
									  }
									  else
									  {
									
									    document.getElementById("panelGrid526Div").style.display = 'none';
									 	//document.getElementById("panelGrid530Div").style.display = 'none';
								
									   
									   
									  }
									  
																  
														  
									  
							}
								  else
									  {
									
									 document.getElementById("panelGrid52Div").style.display = 'none';
						        //      document.getElementById("panelGrid8Div").style.display = 'none';
									     document.getElementById("panelGrid9Div").style.display = '';
								      document.getElementById("panelGrid15Div").style.display = '';
									
									  securityQuestionDisplay();
									  document.getElementById("panelGrid17Div").style.display = '';
									  document.getElementById("panelGrid10Div").style.display = '';
									
									   document.getElementById("panelGrid511Div").style.display = '';
									 if(postalAddress==0)
									    {
									  
									    document.getElementById("panelGrid536Div").style.display = 'none';
									    }
									    else
									    {
									
									    document.getElementById("panelGrid536Div").style.display = '';
									    } 
						if(howlongLived ==1)
									  {
									    
									    document.getElementById("panelGrid526Div").style.display = '';
									    //document.getElementById("panelGrid530Div").style.display = '';
									     
                          			  }
									  else
									  {
									
									    document.getElementById("panelGrid526Div").style.display = 'none';
									 	//document.getElementById("panelGrid530Div").style.display = 'none';
								
									   
									   
									  }	  
									  
									  
									  
									  
									  
									  
									  
									  
									  }
							      
							  }
						      
						  }
						  
/*  Fisrt Applicant Member, second Applicant Customer, emebr,Visitor,Avaliable */

	  /*  First Applicant Customer, second Applicant Customer, Memebr,Visitor,Avaliable */
						  
			  if(elem2.value == 0)
						  {
						  
						
						  if(elem3.value == 0)
						  {
						 
						    
							   document.getElementById("panelGrid52Div").style.display = 'none';
						//	   document.getElementById("panelGrid8Div").style.display = 'none';
							   
						  }
						  if(elem3.value == 1)
						  {
						 
							     document.getElementById("panelGrid52Div").style.display = 'none';
							//     document.getElementById("panelGrid8Div").style.display = 'none';
						     
						  }
						  if(elem3.value == 2)
						  {
						  
								  if(elem4.value == "true")
								  {
								   document.getElementById("panelGrid52Div").style.display = 'none';
							//	   document.getElementById("panelGrid8Div").style.display = 'none';
								
								   secondSecurityQuestionDiaplay();
								   
							
                  							   
										  }
						  else
								 {
										     document.getElementById("panelGrid52Div").style.display = 'none';
									//	     document.getElementById("panelGrid8Div").style.display = 'none';
									      
									          
							    }
						  }
						  
					}
						  
						  
	/*  First Applicant Customer, second Applicant Customer, Memebr,Visitor,Avaliable */
	
	
		/*  First Applicant Vistor, second Applicant Customer, Member,Visitor,Avaliable */		
					
						  if(elem2.value == 2)
						  {
						   
						   if(elem3.value == 0 || elem3.value == 1)
						   {
						   
						      document.getElementById("panelGrid52Div").style.display = 'none';
						  //     document.getElementById("panelGrid8Div").style.display = 'none';
						      document.getElementById("panelGrid9Div").style.display = '';
						      document.getElementById("panelGrid15Div").style.display = '';
						   
						       visitorsecurityQuestionDisplay();
						      document.getElementById("panelGrid17Div").style.display = '';
						  
						      document.getElementById("panelGrid10Div").style.display = '';
						      document.getElementById("panelGrid511Div").style.display = '';
						   if(postalAddress==0)
							    {
						
							    document.getElementById("panelGrid536Div").style.display = 'none';
							    }
							    else
							    {
							
							    document.getElementById("panelGrid536Div").style.display = '';
							    }
						      
					if(howlongLived ==1)
							  {
							    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
								  						    
							  }
								  else
								  {
								
								    document.getElementById("panelGrid526Div").style.display = 'none';
								 	//document.getElementById("panelGrid530Div").style.display = 'none';
							
								   
								   
								  }
						      
						      
					 }
						   if(elem3.value == 2)
						   {
							    if(elem4.value == "true")
								  {
								  
								document.getElementById("panelGrid52Div").style.display = 'none';
						//	       document.getElementById("panelGrid8Div").style.display = 'none';
							       document.getElementById("panelGrid9Div").style.display = '';
							       document.getElementById("panelGrid15Div").style.display = '';
							    
							     visitorsecurityQuestionDisplay();
							     secondSecurityQuestionDiaplay();
							       document.getElementById("panelGrid17Div").style.display = '';
							       document.getElementById("panelGrid10Div").style.display = '';
							  
							       document.getElementById("panelGrid511Div").style.display = '';
							  
							   if(postalAddress==0)
								    {
								
								    document.getElementById("panelGrid536Div").style.display = 'none';
								    }
								    else
								    {
								
								    document.getElementById("panelGrid536Div").style.display = '';
								    }
							if(howlongLived ==1)
								  {
								    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
													    
								  }
							  else
								  {
								
								    document.getElementById("panelGrid526Div").style.display = 'none';
								 	//document.getElementById("panelGrid530Div").style.display = 'none';
							
								   
								   
								  }       
							       
							    
              
											       
							 }
							  else
								  {
									 
									document.getElementById("panelGrid52Div").style.display = 'none';
							  //      document.getElementById("panelGrid8Div").style.display = 'none';
								    document.getElementById("panelGrid9Div").style.display = '';
							        document.getElementById("panelGrid15Div").style.display = '';
							      
							      visitorsecurityQuestionDisplay();
							        document.getElementById("panelGrid17Div").style.display = '';
							        document.getElementById("panelGrid10Div").style.display = ''
							  
							        document.getElementById("panelGrid511Div").style.display = '';
							 if(postalAddress==0)
								    {
								
								    document.getElementById("panelGrid536Div").style.display = 'none';
								    }
								    else
								    {
								
								    document.getElementById("panelGrid536Div").style.display = '';
								    }
						   if(howlongLived ==1)
								  {
								    
								    document.getElementById("panelGrid526Div").style.display = '';
								    //document.getElementById("panelGrid530Div").style.display = '';
								    
                             							    
								  }
								  else
								  {
								
								    document.getElementById("panelGrid526Div").style.display = 'none';
								 	//document.getElementById("panelGrid530Div").style.display = 'none';
							
								   
								   
								  }
								    
								    
								    
								    
							        
								  }
							   }
						   
						  }
						  
								  
					 }
					
					     
				}
				
			   /* Finish Joint Account */
		
					     
				
				
			
		
		}
		
		
/* Function On Body Load of singleMemberTwo.jsp */
 
        function onSingleMemberTwoLoad(ob,ob2,ob3,ob4)
 {
    var elem="";
    var elem1="";
    var elem3="";
		    var elem4="";
    var elem8="";
       elem=document.getElementById(ob);
	      
       elem1=document.getElementById(ob2);
				
	   elem3=document.getElementById(ob3);
		   elem4=document.getElementById(ob4);
		elem8= document.getElementById('form1:hiddenTitle').value;  
		   hiosa=document.getElementById('form1:inputHidden11').value;
		 termDeposit=document.getElementById('form1:inputHidden10').value;
		 document.getElementById('form1:subTitle').style.display = 'none';
		 document.getElementById('form1:outputLabel414').style.display = 'none'
		 //changed for Font-Integration 19-Jun-2009 singleMember2
		 document.getElementById("panelGrid11Div").style.display = 'none';
		 document.getElementById("panelGrid14Div").style.display = 'none';
		 
               if(elem.value = 1)
		        {
		        if(elem1.value == 0)
			        {
			        				       
					        document.getElementById("panelGrid11Div").style.display = '';
			        document.getElementById("panelGrid13Div").style.display = '';
			        document.getElementById("panelGrid14Div").style.display = '';
			        
			          }
		        else
		        {
		           document.getElementById("panelGrid14Div").style.display = '';
		     
		        }
		        
	        }
	
	
	   
	   if(elem8=="Other")
		  {
		  document.getElementById('form1:subTitle').style.display = '';
		  document.getElementById('form1:outputLabel414').style.display = ''
		  }
		  else
		  {
		  document.getElementById('form1:subTitle').style.display = 'none';
		  document.getElementById('form1:outputLabel414').style.display = 'none'
		  } 
	    
	    
 
   
 
		}
 
 
   /* Function On Body Load of AllDone.jsp */
    function hideAllDone(ob,ob1,ob2)
    {
         var elem=document.getElementById('form1:inputHidden1').value;
         var hiosa=document.getElementById('form1:inputHidden11').value;
         var termDeposit=document.getElementById('form1:inputHidden10').value;
		var  bsb=document.getElementById('form1:inputHidden15').value;
	var accountNumber=document.getElementById('form1:inputHidden16').value;
		 
		 if(elem==termDeposit)
			 {
			 document.getElementById("termDepositAppDiv").style.display = '';
			 document.getElementById("hiosaAppDiv").style.display = 'none';
			   document.getElementById("panelGrid6Div").style.display = '';
	         }
                  else
                  {
				document.getElementById("hiosaAppDiv").style.display = '';
			    document.getElementById("termDepositAppDiv").style.display = 'none';
			   document.getElementById("panelGrid6Div").style.display = 'none';
			  }
				
	}
	


		<!--For displaying the messages -->
	
	function showMessage()
	{
		var isSecondAppAvailable=document.getElementById('form1:inputHidden6');
		var isSecondAppCustomer=document.getElementById('form1:isSecondAppCust');
		
		if(isSecondAppAvailable.value == 'false')
		{
			document.getElementById("messageID").style.display = '';
		}
		else if(isSecondAppCustomer.value =='0')
		{
			document.getElementById("custMessageID").style.display = '';
		}
	}
	
	
	
   

   /*fixedToolTip.js*/
   /***********************************************
* Fixed ToolTip script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
		
var tipwidth='250px' //default tooltip width
var tipbgcolor='white'  //tooltip bgcolor
var disappeardelay=250  //tooltip disappear speed onMouseout (in miliseconds)
var vertical_offset="-25px" //horizontal offset of tooltip from anchor link
var horizontal_offset="25px" //horizontal offset of tooltip from anchor link

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="fixedtipdiv" style="visibility:hidden;width:'+tipwidth+';background-color:'+tipbgcolor+'" ></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, tipwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (tipwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=tipwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge, functionname){
if(functionname=="fixedtooltipRight"){
horizontal_offset="150px";
}else{
horizontal_offset="25px";
}
var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function fixedtooltip(menucontents, obj, e, tipwidth){
var strContent = menucontents.replace("\\\'","'");
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidetip()
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
dropmenuobj.innerHTML=strContent

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge", "")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge", "")+obj.offsetHeight+"px"
}
}

function hidetip(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidetip(){
if (ie4||ns6)
delayhide=setTimeout("hidetip()",disappeardelay)
}

function clearhidetip(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

function modalFixedToolTipVarVoffset(menucontents, obj, e, tipwidth,ver_offset){
	vertical_offset=ver_offset; 
	if (window.event) event.cancelBubble=true
	else if (e.stopPropagation) e.stopPropagation()
	clearhidetip()
	dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
	var strContent = menucontents.replace("\\\'","'");
	dropmenuobj.innerHTML=strContent
	
	if (ie4||ns6){
		showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
		dropmenuobj.x=getposOffset(obj, "left")
		dropmenuobj.y=getposOffset(obj, "top")
		dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge", "")+"px"
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge", "")+obj.offsetHeight+"px"
	}
}


function fixedtooltipRight(menucontents, obj, e, tipwidth){

var strContent = menucontents.replace("\\\'","'");
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidetip()
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
dropmenuobj.innerHTML=strContent

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge", "fixedtooltipRight")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge", "fixedtooltipRight")+obj.offsetHeight+"px"
}
}

//04-NOV-2010 Defect 143 START
function xssValidationDBC(fldName){
   	var reg =  /^([^\&\(\)<>"'+%])*$/;
	var address = fldName.value;	
	if(null!=address){
		address.replace(/^\s+/g, '').replace(/\s+$/g, '');
	}
 
   	if(null!=address && reg.test(address) == false){ 	
           return false;
   	}else{
           return true;
	}
}
//04-NOV-2010 Defect 143 END

