
var billerCode=null;var industryCode=null;var toCountryFlag=false;var toCountryIndex=null;var fromCountryIndex=null;var currencyRecievedFlag=true;var sourceCurrencyFlag=true;var destinationCurrencyFlag=true;var SEND_OPTION="toSend";var RECEIVE_OPTION="toReceive";var ENABLED_BOX_COLOR="#fdf2ac";var DISABLED_BOX_COLOR="#e3e3e3";var browserName=navigator.appName;function validateSearchPage(){var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;var zipCodeValue=document.getElementById("zip").value;document.getElementById("zip").value=removeSpaces(zipCodeValue);refreshScreen();setOmnitureParameters();if(validateFeeInquiryActionForm(document.feeInquiryActionForm))
{if(((null!=document.getElementById("recieverCurrencyCodeId").value&&""!=document.getElementById("recieverCurrencyCodeId").value)||(null!=document.getElementById("destCurrencyListId").value&&""!=document.getElementById("destCurrencyListId").value))&&currencyRecievedFlag==true){if(isZipCodeValid==false&&isCorrectLocation==false){showData('selectCorrectAddressBoxId');}
else if(isZipCodeValid==false){hideData('selectCorrectAddressBoxId');callInfoNowService(countryCode,languageCode);}
else if(isZipCodeValid==true){submitPriceShopper();}}
else{showData("recieverCurrencyErrorId");}}}
function setOmnitureParameters(){var senderZipCode=document.getElementById('zip').value;if(null!=senderZipCode&&""!=senderZipCode){document.feeInquiryActionForm["feeInquiryVO.userZipCodeEntered"].value="true";}
else{document.feeInquiryActionForm["feeInquiryVO.userZipCodeEntered"].value="false";}}
function submitPriceShopper(){var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;if(isZipCodeValid&&isCorrectLocation){var senderCountryObject=document.getElementById("fromCountry");var senderStateObject=document.getElementById("stateListId");var recieverCountryObject=document.getElementById("destCountryListId");countryCode=countryCode.toUpperCase();if(null!=senderCountryObject.value&&""!=senderCountryObject.value){document.getElementById("countrySenderNameId").value=senderCountryObject[senderCountryObject.selectedIndex].text;}
if(null!=senderStateObject.value&&""!=senderStateObject.value){document.getElementById("stateSenderNameId").value=senderStateObject[senderStateObject.selectedIndex].text;}
if(null!=recieverCountryObject.value&&""!=recieverCountryObject.value){document.getElementById("countryReceiverNameId").value=recieverCountryObject[recieverCountryObject.selectedIndex].text;}
document.feeInquiryActionForm.action="feeInquirySearch.do?method=save&countryCode="+countryCode+"&languageCode="+languageCode+"&nextSecurePage=Y";document.feeInquiryActionForm.submit();}}
function resetZipCodeFlag(){isZipCodeValid=false;isCorrectLocation=true;}
function showCorrectionList(){var val=document.getElementById("industryListId").value;if(val=="PRISON")
{document.getElementById("correctionListId").selectedIndex='0';document.getElementById("selectBillerId").style.display='block';}
else{document.getElementById("correctionListId").selectedIndex='0';document.getElementById("selectBillerId").style.display='none';}}
function resetDestCountryList(){document.getElementById("destCountryListId").selectedIndex='0';}
function toggleBox(szDivID,iState)
{if(document.layers)
{document.layers[szDivID].visibility=iState?"show":"hide";}
else if(document.getElementById)
{var obj=document.getElementById(szDivID);if(document.getElementById(szDivID)!=null)
obj.style.visibility=iState?"visible":"hidden";}
else if(document.all)
{document.all[szDivID].style.visibility=iState?"visible":"hidden";}}
function showData(boxid){if(null!=document.getElementById(boxid)){document.getElementById(boxid).style.display="block";}}
function hideData(boxid){if(null!=document.getElementById(boxid)){document.getElementById(boxid).style.display="none";}}
function show(section,whichTab){document.body.className='Tab'+section;}
function clearCurrencyDiv(){if(null!=document.getElementById("defaultCurrency")){document.getElementById("defaultCurrency").innerHTML="";}
if(null!=document.getElementById("destCurrencyCellId")){document.getElementById("destCurrencyCellId").innerHTML="";}
if(null!=document.getElementById("destCurrencyId")){document.getElementById("destCurrencyId").style.display='none';}
if(null!=document.getElementById("sourceCurrencyId")){document.getElementById("sourceCurrencyId").style.display='none';}}
function alertOnFromPanel(){var sendToCountry;var industryType;var city;var zipCode;var stateSender;var amount;var receiveAmount;var qcIndustry=null;;sendToCountry=document.feeInquiryActionForm["feeInquiryVO.countryReceiverCode"].value;industryType=document.feeInquiryActionForm["feeInquiryVO.billerCodeIndustryType"].value;city=document.feeInquiryActionForm["feeInquiryVO.cityStateCode"].value;zipCode=document.feeInquiryActionForm["feeInquiryVO.zipPostal"].value;stateSender=document.feeInquiryActionForm["feeInquiryVO.stateSenderCode"].value;amount=getAmountField();receiveAmount=getReceiveAmountField();if(sendToCountry!=""||industryType!=""||city!=""||zipCode!=""||stateSender!=""||amount!=""||receiveAmount!=""){confirmPromptFromPanel();}
else{var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;getCurrencyState(countryCode,languageCode,'yes');}}
function alertOnToPanel(){var amount;var receiveAmount;amount=getAmountField();receiveAmount=getReceiveAmountField();var toCountry=getToCountry();var country=document.feeInquiryActionForm["feeInquiryVO.countryReceiverCode"].value;document.getElementById("recieverCurrencyCodeId").value=null;document.getElementById("destCurrencyListId").value="";hideDestinationInfo();currencyRecievedFlag=false;if((amount!=""||receiveAmount!="")&&(toCountry!=""&&null!=toCountry||toCountryFlag==true)){toCountryFlag=false;confirmPromptToPanel();}
else{var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;getDestCurrencyList(countryCode,languageCode,'yes');}}
function getBillerCode(){var amount;refreshScreen();industryCode=getIndustryCode();var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;getCountryBillersList(countryCode,languageCode,'yes');}
function alertSelectBiller(){refreshScreen();hideData("helpTextTab2");showData("helpTextTab1");var amount;var receiveAmount;var sendToCountry;var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;amount=getAmountField();receiveAmount=getReceiveAmountField();sendToCountry=document.feeInquiryActionForm["feeInquiryVO.countryReceiverCode"].value;showData('destCurrencyId');if(amount!=""||receiveAmount!=""){if(document.feeInquiryActionForm.quickCollectExists.value=="false"){confirmToCountryChange();}
else{show(1);document.feeInquiryActionForm.quickCollectExists.value="true";getBillersList(countryCode,languageCode,'yes');}}
else{show(1);document.feeInquiryActionForm.quickCollectExists.value="true";getBillersList(countryCode,languageCode,'yes');}}
function alertSelectToRadio(){refreshScreen();var amount;var receiveAmount;var industryType;var qcIndustry;var sendToIndustryIdRadioId;var countryCode;var languageCode;amount=getAmountField();receiveAmount=getReceiveAmountField();industryType=document.feeInquiryActionForm["feeInquiryVO.billerCodeIndustryType"].value;languageCode=document.getElementById("languageCodeId").value;countryCode=document.getElementById("countryCodeId").value;if(amount!=""||receiveAmount!=""){if(document.feeInquiryActionForm.quickCollectExists.value=="true"){toCountryFlag=false;confirmBillerChange();}
else{showData("destCountryListId");getSenderCurrencyList(countryCode,languageCode,'yes');document.feeInquiryActionForm.quickCollectExists.value="false";if(null==document.feeInquiryActionForm["feeInquiryVO.countryReceiverCode"].value){clearCurrencyDiv();}
hideData("quickColectContainer");showData('toCountryListId');}}
else{showData("destCountryListId");getSenderCurrencyList(countryCode,languageCode,'yes');document.feeInquiryActionForm.quickCollectExists.value="false";hideData("quickColectContainer");if(industryType!=""){document.feeInquiryActionForm["feeInquiryVO.billerCodeIndustryType"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.QCCodeCity"].value){document.feeInquiryActionForm["feeInquiryVO.QCCodeCity"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.QCStateCode"].value){document.feeInquiryActionForm["feeInquiryVO.QCStateCode"].value="";}
var sendToIndustryIdRadioId=document.getElementById("sendToIndustryId");if(null!=sendToIndustryIdRadioId){sendToIndustryIdRadioId.checked=false;}
if(document.getElementById("amountPanelId").style.display=='none'){document.getElementById("amountPanelId").style.display='block';}
showData('toCountryListId');}}
function showBillerPanel(){var sendToPersonRadioId=document.getElementById("sendToPersonId");if(null!=sendToPersonRadioId){sendToPersonRadioId.checked=false;}
var sendToIndustryIdRadioId=document.getElementById("sendToIndustryId");if(null!=sendToIndustryIdRadioId){sendToIndustryIdRadioId.checked=true;}}
function showToPanel(){var industryType;var qcIndustry;industryType=document.feeInquiryActionForm["feeInquiryVO.billerCodeIndustryType"].value;document.feeInquiryActionForm.quickCollectExists.value="false";if(null!=document.feeInquiryActionForm["feeInquiryVO.amountToSend"].value){document.feeInquiryActionForm["feeInquiryVO.amountToSend"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.amountToReceive"].value){document.feeInquiryActionForm["feeInquiryVO.amountToReceive"].value="";}
if(industryType!=""||qcIndustry!=""){document.feeInquiryActionForm["feeInquiryVO.billerCodeIndustryType"].value="";clearCurrencyDiv();}
if(null!=document.feeInquiryActionForm["feeInquiryVO.QCCodeCity"].value){document.feeInquiryActionForm["feeInquiryVO.QCCodeCity"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.QCStateCode"].value){document.feeInquiryActionForm["feeInquiryVO.QCStateCode"].value="";}
var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;getSenderCurrencyList(countryCode,languageCode,'yes');clearCurrencyDiv();showData("destCountryListId");hideData("quickColectContainer");showData('toCountryListId');}
var tab2Selected=false;function showTab1(){tab2Selected=false;document.feeInquiryActionForm["feeInquiryVO.correctionalBillerSelected"].value="false";document.getElementById("correctionListId").selectedIndex='0';show(1);hideData("helpTextTab2");showData("helpTextTab1");billerCode=null;var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;getBillersList(countryCode,languageCode,'yes');}
function showTab2(){tab2Selected=true;hideData("helpTextTab1");showData("helpTextTab2");document.feeInquiryActionForm["feeInquiryVO.correctionalBillerSelected"].value="true";document.getElementById("industryListId").selectedIndex='0';show(2);hideData("helpTextTab1");showData("helpTextTab2");refreshScreen();document.feeInquiryActionForm["feeInquiryVO.QCCodeCity"].value="";document.feeInquiryActionForm["feeInquiryVO.QCStateCode"].value="";document.getElementById("industryListId").value="";var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;getBillersList(countryCode,languageCode,'yes');industryCode=null;}
function getBillerName(){billerCode=getBillerCode();var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;getCountryBillersList(countryCode,languageCode,'yes');}
function clearAmount(){if(null!=document.feeInquiryActionForm["feeInquiryVO.amountToSend"].value){document.feeInquiryActionForm["feeInquiryVO.amountToSend"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.amountToReceive"].value){document.feeInquiryActionForm["feeInquiryVO.amountToReceive"].value="";}}
function getBillerType(){var senderCountry=document.feeInquiryActionForm["feeInquiryVO.countrySenderCode"].value;if(senderCountry!=""){toCountryFlag=true;toCountryIndex=document.feeInquiryActionForm["feeInquiryVO.countryReceiverCode"].selectedIndex;fromCountryIndex=document.feeInquiryActionForm["feeInquiryVO.countrySenderCode"].selectedIndex;if(senderCountry=="US"||senderCountry=="CA"){document.getElementById("sendToBiller").style.display='block';}}}
function getThisKeyCode(evt)
{if(browserName=="Netscape")
{return evt.which;}else{return window.event.keyCode;}}
function imposeMaxLength(Object,evt)
{keyNum=getThisKeyCode(evt);if(keyNum=='0'||keyNum=='8'){return true;}else{var MaxLen;if(document.getElementById("fromCountry").value=='US'){MaxLen=4;}
else if(document.getElementById("fromCountry").value=='CA'){MaxLen=6;}
return(Object.value.length<=MaxLen);}}
function removeSpaces(string){var tstring="";var finalString="";string=''+string;splitstring=string.split(" ");for(i=0;i<splitstring.length;i++)
tstring+=splitstring[i];splitstring=tstring.split("-");for(i=0;i<splitstring.length;i++)
finalString+=splitstring[i];return finalString.toUpperCase();}
function addEnableDisableLogicToContinueButtons(){allContinueButtons=getElementsByClass('btnContinueFX',null,'span');allContinueDisabledButtons=getElementsByClass('btnContinueFXDisabled',null,'span');if(allContinueButtons!=null){for(i=0;i<allContinueButtons.length;i++){var firstLink=allContinueButtons[i].getElementsByTagName("a")[0];firstLink.onclick=function(){disableDiv(this);return false;};}}
if(allContinueDisabledButtons!=null){for(i=0;i<allContinueDisabledButtons.length;i++){var firstLink=allContinueDisabledButtons[i].getElementsByTagName("a")[0];firstLink.onclick=function(){disableDiv(this);return false;};}}}
var automobileBillersList=null;var correctionalFacilityList=null;var mortgageBillersList=null;var completeBillersList=null;var codeCityState=null;var agentLocatorFlagParam=null;var fromCountry=null;var index=null;var fromCountryName=null;var amount;var toCountrySelectedName=null;var toCountryName=null;var industryCode=null;var sourceDefaultCurrency=null;var sourceCurrencyList=null;var selectedCountry=null;var billerCode=null;var toIndex=null;var fromCountrySelectedFlag=null;var helpTextTab1=null;var helpTextTab2=null;var quickCollectLabel=null;function getCurrencyState(countryCode,languageCode,buttonValue)
{if(buttonValue=='yes'){clearCurrencyDiv();hideData("sourceCurrencyListId");hideData("destCurrencyListId");hideData("sourceCurrencyTextId");hideData("destCurrencyTextId");hideData("addressTableId");fromCountrySelectedFlag='true';DWRUtil.removeAllOptions('correctionListId');agentLocatorFlagParam=new ParameterBean('agentLocatorFlag',document.feeInquiryActionForm["agentLocatorFlag"].value);clearPanel();hideData('ajaxErrorBlock');if(document.getElementById("stateBoxDisplay").style.display=='block'){document.getElementById("stateBoxDisplay").style.display='none';}
if(document.getElementById("cityId").style.display=='block'){document.getElementById("cityId").style.display='none';}
if(document.getElementById("zipCodeTableId").style.display=='block'){document.getElementById("zipCodeTableId").style.display='none';}
if(document.getElementById("sendToPanelId").style.display=='block'){document.getElementById("sendToPanelId").style.display='none';}
var srcCountryErrorId=document.getElementById("destCountryErrorID");if(null!=srcCountryErrorId){srcCountryErrorId.style.display='none';}
var sessionID=document.getElementById("appSessionId").value;var countryCode=new ParameterBean('countryCode',countryCode);var languageCode=new ParameterBean('languageCode',languageCode);fromCountry=document.getElementById('fromCountry');var fromCountrySelected=new ParameterBean('fromCountrySelected',fromCountry.value);index=document.getElementById('fromCountry').selectedIndex;fromCountryName=document.getElementById('fromCountry').options[index].text;var fromCountrySelectedName=new ParameterBean('fromCountrySelectedName',fromCountry.options[index].text);var sessionString=new ParameterBean('sessionString',sessionID);if(null!=fromCountry.value&&""!=fromCountry.value){var functionBean=new FunctionBean('getCurrencyStateListAJAX',countryCode,languageCode,fromCountrySelected,fromCountrySelectedName,sessionString,agentLocatorFlagParam);var functionList=new Array();functionList[0]=functionBean;showData("loadingImgId");SpiderLiteManager.spiderLiteCall(functionList,{callback:populateCurrencyStateList,errorHandler:errPolling});}
else{hideData("cityId");hideData("stateBoxDisplay");hideData("zipCodeTableId");hideData("sendToPanelId");}}
else{if(null!=fromCountryName){document.getElementById('fromCountry').value=fromCountry;document.getElementById('fromCountry').selectedIndex=index;document.getElementById('fromCountry').options[index].text=fromCountryName;}
else{fromCountryName=document.feeInquiryActionForm["feeInquiryVO.countrySenderName"].value;document.getElementById('fromCountry').selectedIndex=fromCountryIndex;document.getElementById('fromCountry').options[fromCountryIndex].text=fromCountryName;}}}
function errPolling(){}
function populateCurrencyStateList(data)
{hideData("loadingImgId");var errorMessage=data.getCurrencyStateListAJAX.errorMessage;helpTextTab1=data.getCurrencyStateListAJAX.helpTextTab1;helpTextTab2=data.getCurrencyStateListAJAX.helpTextTab2;if(false==data.getCurrencyStateListAJAX.flagSuccess){document.getElementById("ajaxErrorBlock").style.display='block';}
else{if(errorMessage!=null&&errorMessage!=""){document.getElementById("errorBlock").style.display='block';DWRUtil.setValue(document.getElementById("errorActionMsg"),errorMessage);}else{document.getElementById("errorBlock").style.display='none';}
document.getElementById("sendToPanelId").style.display='block';var stateArrayList=data.getCurrencyStateListAJAX.stateList;var receiverCountryList=data.getCurrencyStateListAJAX.receiverCountryList;var stateLabel=data.getCurrencyStateListAJAX.stateLabel;var cityLabel=data.getCurrencyStateListAJAX.cityLabel;var zipCodeLabel=data.getCurrencyStateListAJAX.zipCodeLabel;var defaultSelectCountry=data.getCurrencyStateListAJAX.defaultSelectCountry;var defaultSelectState=data.getCurrencyStateListAJAX.defaultSelectState;quickCollectLabel=data.getCurrencyStateListAJAX.quickCollectLabel;if(receiverCountryList!=null){DWRUtil.removeAllOptions('destCountryListId');DWRUtil.addOptions('destCountryListId',[{name:defaultSelectCountry,value:""}],'value','name');DWRUtil.addOptions('destCountryListId',receiverCountryList,'ISOCountryCode','nameLong');}
if(receiverCountryList==null){DWRUtil.removeAllOptions('destCountryListId');}
if(stateLabel!=null)
{DWRUtil.setValue('feeInquiryVO.stateSenderCode_col',stateLabel);if(stateArrayList!=null){DWRUtil.removeAllOptions('stateListId');DWRUtil.addOptions('stateListId',[{name:defaultSelectState,value:""}],'value','name');DWRUtil.addOptions('stateListId',stateArrayList,'stateCode','stateName');DWRUtil.removeAllOptions('BillerStateListId');DWRUtil.addOptions('BillerStateListId',[{name:defaultSelectState,value:""}],'value','name');DWRUtil.addOptions('BillerStateListId',stateArrayList,'stateCode','stateName');}
document.getElementById("stateBoxDisplay").style.display='block';}else{document.getElementById("stateBoxDisplay").style.display='none';}
if(cityLabel!=null)
{DWRUtil.setValue('feeInquiryVO.cityStateCode_col',cityLabel);document.getElementById("cityId").style.display='block';}else{if(cityLabel==null||cityLabel==""){document.getElementById("cityId").style.display='none';}}
if(zipCodeLabel!=null)
{DWRUtil.setValue('feeInquiryVO.zipPostal_col',zipCodeLabel);document.getElementById("zipCodeTableId").style.display='block';}else{document.getElementById("zipCodeTableId").style.display='none';}
if(quickCollectLabel!=null&&(quickCollectLabel=="true"||quickCollectLabel=="TRUE")){document.getElementById("sendToBiller").style.display='block';}else if(quickCollectLabel==null||quickCollectLabel==""){document.getElementById("sendToBiller").style.display='none';document.getElementById("quickColectContainer").style.display='none';document.getElementById("industryListId").style.display='none';}else{document.getElementById("sendToBiller").style.display='none';}}}
function getDestCurrencyList(countryCode,languageCode,buttonValue)
{if(buttonValue=='yes'){var destCountryValue=document.getElementById("destCountryListId").value;hideData("destCurrencyTextId");hideData("destCurrencyDataId");if(null!=destCountryValue&&destCountryValue!=""){document.getElementById("sendAmountPanel").style.background=ENABLED_BOX_COLOR;cleanAmountField("amount");showData("receiveAmountImgId");destinationCurrencyFlag=false;if(document.getElementById("sysPlatformID").value=="CSC"){disableContinueButtonsCSC();}else{disableContinueButtonsBeforeAJAXCall();}
var sessionID=document.getElementById("appSessionId").value;var countryCode=new ParameterBean('countryCode',countryCode);var languageCode=new ParameterBean('languageCode',languageCode);var fromCountrySelected=new ParameterBean('fromCountrySelected',document.getElementById('fromCountry').value);toIndex=document.getElementById('destCountryListId').selectedIndex;toCountryName=document.getElementById('destCountryListId').options[toIndex].text;toCountrySelectedName=new ParameterBean('toCountrySelectedName',document.getElementById('destCountryListId').options[toIndex].text);selectedCountry=document.getElementById('destCountryListId').value;var sessionString=new ParameterBean('sessionString',sessionID);var destCountryValue=new ParameterBean('destCountryValue',destCountryValue);var functionBean=new FunctionBean('getDestinationCurrencyListAJAX',countryCode,languageCode,fromCountrySelected,toCountrySelectedName,sessionString,destCountryValue);var functionList=new Array();functionList[0]=functionBean;SpiderLiteManager.spiderLiteCall(functionList,{callback:populateDestinationCurrencyList,errorHandler:errPolling});}
else{selectedCountry=document.getElementById('destCountryListId').value;}}
else{if(null!=toCountryName){document.getElementById('destCountryListId').selectedIndex=toIndex;document.getElementById('destCountryListId').options[toIndex].text=toCountryName;}
else{toCountryName=document.feeInquiryActionForm["feeInquiryVO.countryReceiverName"].value;document.getElementById('destCountryListId').selectedIndex=toCountryIndex;document.getElementById('destCountryListId').options[toCountryIndex].text=toCountryName;}}}
function populateDestinationCurrencyList(data)
{hideData("receiveAmountImgId");var errorMessage=data.getDestinationCurrencyListAJAX.errorMessage;document.getElementById("errorBlock").style.display='none';if(false==data.getDestinationCurrencyListAJAX.flagSuccess){document.getElementById("ajaxErrorBlock").style.display='block';}
else{if(errorMessage!=null&&errorMessage!=""){document.getElementById("errorBlock").style.display='block';DWRUtil.setValue(document.getElementById("errorActionMsg"),errorMessage);}
else{currencyRecievedFlag=true;destinationCurrencyFlag=true;if(document.getElementById("sysPlatformID").value=="CSC"){enableContinueButtonsCSC();}else{enableContinueButtonsAfterAJAXCall();}
var destCurrencyList=data.getDestinationCurrencyListAJAX.currencyList;var defaultToCurrency=data.getDestinationCurrencyListAJAX.defaultToCurrency;var sameCurrencySelected=data.getDestinationCurrencyListAJAX.sameCurrencySelected;if(null!=document.getElementById("destCurrencyListId")){DWRUtil.removeAllOptions('destCurrencyListId');}
if(destCurrencyList.length==1&&document.getElementById("senderCurrencyCodeId")!=null&&document.getElementById("senderCurrencyCodeId").value==destCurrencyList[0].ISOCurrencyCode){hideDestinationInfo();}
else{showDestinationInfo();}
if(destCurrencyList.length>1){document.getElementById("destCurrencyTextId").style.display='none';showData("destCurrencyDataId");document.getElementById("destCurrencyListId").style.display='block';DWRUtil.addOptions('destCurrencyListId',destCurrencyList,'ISOCurrencyCode','currencyName');hideData("recieverCurrencyErrorId");}
else{document.getElementById("destCurrencyListId").style.display='none';hideData("destCurrencyDataId");document.getElementById("destCurrencyTextId").style.display='block';document.getElementById("destCurrencyTextId").innerHTML=destCurrencyList[0].currencyName;document.getElementById("recieverCurrencyCodeId").value=destCurrencyList[0].ISOCurrencyCode;hideData("recieverCurrencyErrorId");}
if(document.feeInquiryActionForm.quickCollectExists.value=="true"){setQCTransfer('sendAmountPanel','receiveAmountPanel','amount','receiveAmount')}
else{setTransferType('sendAmountPanel','receiveAmountPanel','amount','receiveAmount');}}}}
function disableContinueButtonsBeforeAJAXCall(){var allContinueButtons=getElementsByClass('btnContinueFX',null,'span');if(allContinueButtons!=null&&allContinueButtons.length>0){for(i=0;i<allContinueButtons.length;i++){var firstLink=allContinueButtons[i].getElementsByTagName("a")[0];disableDivforAjax(firstLink);}
if(null!=document.getElementById("calculateLinkId")){document.getElementById("calculateLinkId").href="#";}}}
function enableContinueButtonsAfterAJAXCall(){if(sourceCurrencyFlag&&destinationCurrencyFlag){var allContinueButtons=getElementsByClass('btnContinueFXDisabled',null,'span');if(allContinueButtons!=null&&allContinueButtons.length>0){for(i=0;i<allContinueButtons.length;i++){var firstLink=allContinueButtons[i].getElementsByTagName("a")[0];enableDivForAJAX(firstLink);}
if(null!=document.getElementById("calculateLinkId")){document.getElementById("calculateLinkId").href="javascript:validateSearchPage()";}}}}
function enableContinueButtonsCSC(){if(sourceCurrencyFlag&&destinationCurrencyFlag){if(null!=document.getElementById("calculateLinkCSCId")){document.getElementById("calculateLinkCSCId").style.color="#000000";document.getElementById("calculateLinkCSCId").href="javascript:validateSearchPage()";}}}
function disableContinueButtonsCSC(){if(null!=document.getElementById("calculateLinkCSCId")){document.getElementById("calculateLinkCSCId").href="#";document.getElementById("calculateLinkCSCId").style.color="#999999";}}
function getElementsByClass(searchClass,node,tag){var classElements=new Array();if(node==null)
node=document;if(tag==null)
tag='*';var els=node.getElementsByTagName(tag);var elsLen=els.length;for(i=0,j=0;i<elsLen;i++){if(els[i].className==searchClass){classElements[j]=els[i];j++;}}
return classElements;}
function enableDivForAJAX(obj){obj.parentNode.className="btnContinueFX";return true;}
function disableDivforAjax(obj){obj.parentNode.className="btnContinueFXDisabled";return true;}
function resetIndustryBillersTab(){document.getElementById("industryListId").selectedIndex='0';document.getElementById("correctionListId").selectedIndex='0';}
function getBillersList(countryCode,languageCode,buttonValue)
{if(buttonValue=='yes'){document.feeInquiryActionForm.quickCollectExists.value="true";var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;var fromCountry=document.getElementById('fromCountry').value;resetDestCountryList();showData('quickColectContainer');hideData('toCountryListId');showData('destCurrencyCellId');showData('destCurrencyId');hideData('sourceCurrencyId');if(document.getElementById("amountPanelId").style.display=='none'){document.getElementById("amountPanelId").style.display='block';}
if(fromCountry=="US"){showData('priceTab_2');}
else{hideData('priceTab_2');}
if(null!=toCountryName){toCountryName=null;}
document.getElementById("quickColectContainer").style.display='block';document.getElementById("industryListId").style.display='block';getSenderCurrencyList(countryCode,languageCode,'yes');hideData('ajaxErrorBlock');}
else{var sendToPersonRadioId=document.getElementById("sendToPersonId");if(null!=sendToPersonRadioId){sendToPersonRadioId.checked=true;}
var sendToIndustryIdRadioId=document.getElementById("sendToIndustryId");if(null!=sendToIndustryIdRadioId){sendToIndustryIdRadioId.checked=false;}
if(null!=toCountryName){document.getElementById('destCountryListId').selectedIndex=toIndex;document.getElementById('destCountryListId').options[index].text=toCountryName;}
showData("destCountryListId");hideData("quickColectContainer");showData('toCountryListId');}}
function getCountryBillersList(countryCode,languageCode,buttonValue)
{if(buttonValue=='yes'){showData('destCurrencyId');industryCode=document.feeInquiryActionForm["feeInquiryVO.billerCodeIndustryType"].value;}
else{document.feeInquiryActionForm["feeInquiryVO.billerCodeIndustryType"].value=industryCode;}}
function populateCountryBillersList(data)
{var errorMessage=data.getCountryBillersListAJAX.errorMessage;var defaultLabel=data.getCountryBillersListAJAX.defaultLabel;if(false==data.getCountryBillersListAJAX.flagSuccess){document.getElementById("ajaxErrorBlock").style.display='block';}
else
{if(errorMessage!=null&&errorMessage!=""){document.getElementById("errorBlock").style.display='block';DWRUtil.setValue(document.getElementById("errorActionMsg"),errorMessage);}
else{document.getElementById("errorBlock").style.display='none';}
countrySpecificBillersList=data.getCountryBillersListAJAX.countryBillerList;DWRUtil.setValue(document.getElementById("errorActionMsg"),errorMessage);document.getElementById("selectBillerId").style.display='block';DWRUtil.removeAllOptions('correctionListId');DWRUtil.addOptions('correctionListId',[{name:defaultLabel,value:""}],'value','name');DWRUtil.addOptions('correctionListId',countrySpecificBillersList,'clientId','client_name');if(null!=document.getElementById("correctionBillersListId").value&&""!=document.getElementById("correctionBillersListId").value){document.getElementById("correctionListId").value=document.getElementById("correctionBillersListId").value}}}
function displaySendFromPanel(agentLocatorFlag,countryCode,languageCode){if(agentLocatorFlag){document.getElementById("sendFromPanelID").style.display="none";if(document.getElementById("agentLocatorBoxid").style.display=='none'){document.getElementById("agentLocatorBoxid").style.display="block";}
fromCountrySelectedFlag='true';isZipCodeValid=true;getAgentSpecificData(countryCode,languageCode);}else{document.getElementById("sendFromPanelID").style.display="block";document.getElementById("agentLocatorBoxid").style.display="none";}}
function changeLocation(){document.feeInquiryActionForm["feeInquiryVO.countrySenderCode"].value="";document.feeInquiryActionForm["feeInquiryVO.zipPostal"].value="";document.feeInquiryActionForm["feeInquiryVO.stateSenderCode"].value="";document.feeInquiryActionForm["feeInquiryVO.cityStateCode"].value="";document.feeInquiryActionForm["agentLocatorFlag"].value=false;document.getElementById("sendToBiller").style.display='none';document.getElementById("sendToBiller").checked=false;hideData("quickColectContainer");DWRUtil.removeAllOptions('destCountryListId');document.getElementById("destCountryListId").style.display='none';document.getElementById("sendToPersonId").checked=false;document.getElementById("sendFromPanelID").style.display="block";document.getElementById("agentLocatorBoxid").style.display="none";document.getElementById("sendToPanelId").style.display="none";document.getElementById("amountPanelId").style.display="none";}
function getAgentSpecificData(countryCode,languageCode)
{var sessionID=document.getElementById("appSessionId").value;var countryCodeParam=new ParameterBean('countryCode',countryCode);var languageCodeParam=new ParameterBean('languageCode',languageCode);var agentCountrySelectedParam=new ParameterBean('fromCountrySelected',document.feeInquiryActionForm["feeInquiryVO.agentCountryCode"].value);agentLocatorFlagParam=new ParameterBean('agentLocatorFlag',document.feeInquiryActionForm["agentLocatorFlag"].value);var sessionStringParam=new ParameterBean('sessionString',sessionID);var functionBean=new FunctionBean('getCurrencyStateListAJAX',countryCodeParam,languageCodeParam,agentCountrySelectedParam,sessionStringParam,agentLocatorFlagParam);var functionList=new Array();functionList[0]=functionBean;if(null!=document.getElementById("sendToPanelId")){showData("loadingImgId");}
SpiderLiteManager.spiderLiteCall(functionList,populateAgentSpecificData);}
function populateAgentSpecificData(data)
{var errorMessage=data.getCurrencyStateListAJAX.errorMessage;hideData("loadingImgId");if(errorMessage!=null&&errorMessage!=""){document.getElementById("errorBlock").style.display='block';DWRUtil.setValue(document.getElementById("errorActionMsg"),errorMessage);}else{document.getElementById("errorBlock").style.display='none';}
var receiverCountryList=data.getCurrencyStateListAJAX.receiverCountryList;var senderStateList=data.getCurrencyStateListAJAX.stateList;var defaultSelectState=data.getCurrencyStateListAJAX.defaultSelectState;var quickCollectLabel=data.getCurrencyStateListAJAX.quickCollectLabel;var defaultSelectCountry=data.getCurrencyStateListAJAX.defaultSelectCountry;document.getElementById("sendToPanelId").style.display='block';if(receiverCountryList!=null){DWRUtil.removeAllOptions('destCountryListId');DWRUtil.addOptions('destCountryListId',[{name:defaultSelectCountry,value:""}],'value','name');DWRUtil.addOptions('destCountryListId',receiverCountryList,'ISOCountryCode','nameLong');}
if(receiverCountryList==null){DWRUtil.removeAllOptions('destCountryListId');}
if(senderStateList!=null){DWRUtil.removeAllOptions('BillerStateListId');DWRUtil.addOptions('BillerStateListId',[{name:defaultSelectState,value:""}],'value','name');DWRUtil.addOptions('BillerStateListId',senderStateList,'stateCode','stateName');}
if(quickCollectLabel!=null&&(quickCollectLabel=="true"||quickCollectLabel=="TRUE"))
{document.getElementById("sendToBiller").style.display='block';}else{document.getElementById("sendToBiller").style.display='none';}}
function callInfoNowService(countryCode,languageCode){var senderCountry=document.getElementById('fromCountry').value;var senderState=document.getElementById('stateListId').value;var senderCity=document.getElementById('senderCityId').value;var senderZipCode=document.getElementById('zip').value;var sessionID=document.getElementById("appSessionId").value;var countryCode=new ParameterBean('countryCode',countryCode);var languageCode=new ParameterBean('languageCode',languageCode);var senderCountryBean=new ParameterBean('countrySenderCode',senderCountry);var senderStateBean=new ParameterBean('State',senderState);var senderCityBean=new ParameterBean('City',senderCity);var senderZipCodeBean=new ParameterBean('Zip',senderZipCode);var sessionString=new ParameterBean('sessionString',sessionID);if(null!=document.getElementById('errorMessageId')){document.getElementById('errorMessageId').innerHTML="";}
hideData("addressTableId");if(null!=senderCountry&&""!=senderCountry&&(null==senderState||""==senderState)&&(null==senderCity||""==senderCity)&&(null==senderZipCode||""==senderZipCode)){isZipCodeValid=true;submitPriceShopper();}
if(null!=senderCountry&&""!=senderCountry&&(null==senderState||""==senderState)&&(null==senderCity||""==senderCity)&&(null!=senderZipCode&&""!=senderZipCode)){isZipCodeValid=true;submitPriceShopper();}
else
if(null!=senderCountry&&""!=senderCountry&&(senderCountry=="US"||senderCountry=="CA")&&null!=senderState&&""!=senderState&&(null==senderCity||""==senderCity)&&(null==senderZipCode||""==senderZipCode)){isZipCodeValid=true;submitPriceShopper();}
else if(null!=senderCountry&&""!=senderCountry&&(senderCountry=="US"||senderCountry=="CA")&&(null==senderState||""==senderState)&&(null!=senderCity&&""!=senderCity)&&(null!=senderZipCode&&""!=senderZipCode)){isZipCodeValid=true;submitPriceShopper();}
else
if(null!=senderCountry&&""!=senderCountry&&(senderCountry=="US"||senderCountry=="CA")&&null!=senderState&&""!=senderState&&((null!=senderZipCode&&""!=senderZipCode)||(null!=senderCity&&""!=senderCity))){var functionBean=new FunctionBean('getInfoNowAJAX',countryCode,languageCode,senderCountryBean,senderStateBean,senderCityBean,senderZipCodeBean,sessionString);var functionList=new Array();functionList[0]=functionBean;showData("addressImageId");SpiderLiteManager.spiderLiteCall(functionList,{callback:populateInfoNowData,errorHandler:errPolling});}}
var isCorrectLocation=true;var isZipCodeValid=false;function populateInfoNowData(data){hideData("addressImageId");s_prop14=null;var infoNowResult=data.getInfoNowAJAX.infoNowResultVO;var candidateList=infoNowResult.candidateAddressVOList;DWRUtil.removeAllRows("candidateAddressid");if(infoNowResult.matchedAddress==true){var candidateAddressVO=candidateList[0];document.getElementById('stateListId').value=candidateAddressVO.state;document.getElementById('senderCityId').value=candidateAddressVO.city;document.getElementById('zip').value=candidateAddressVO.zip;isZipCodeValid=true;submitPriceShopper();}
else if(infoNowResult.candidateAddress==true){s_omniturePageName="Price It Candidate";isCorrectLocation=false;hideData("infoNowMessageId");showData("addressTableId");showData("infoNowCandidateMessageId");table=document.getElementById('candidateAddressid');var data;var city,state,zip,hrefVal,tempCity;isZipCodeValid=false;for(var i=0;i<candidateList.length;i++){row=table.insertRow(-1);cell=row.insertCell(-1);cell.width="28px";cell.innerHTML=" ";city=candidateList[i].city;tempCity=city.replace(/ /g,'#');state=candidateList[i].state;zip=candidateList[i].zip;cell=row.insertCell(-1);if(null!=zip&&""!=zip){hrefVal="javascript:populateAddressZip('"+tempCity+"','"+state+"','"+zip+"');";data="<a class='blueLink fontSize7' href="+hrefVal+">"+city+",  "+state+",  "+zip+"</a>";}
else{hrefVal="javascript:populateAddressNoZip('"+tempCity+"','"+state+"');";data="<a class='blueLink fontSize7' href="+hrefVal+">"+city+",  "+state+"</a>";}
cell.innerHTML=data;cell.className="fontSize8";}}
else if(infoNowResult.error==true){s_omniturePageName="Price It Error";s_prop14=infoNowResult.errorCode;showData("addressTableId");hideData("infoNowCandidateMessageId");showData("infoNowMessageId");document.getElementById('errorMessageId').innerHTML=infoNowResult.errorMessage;isZipCodeValid=false;}
else if(infoNowResult.zipStateMatched==true){isZipCodeValid=true;submitPriceShopper();}
else if(infoNowResult.infonowConnected==false){isZipCodeValid=true;submitPriceShopper();}
reportToOmniture();}
function populateAddressZip(tempCity,state,zip){var city=tempCity.replace(/#/g," ");document.getElementById('stateListId').value=state;document.getElementById('senderCityId').value=toTitleCase(city);document.getElementById('zip').value=zip;hideData('addressTableId');isZipCodeValid=true;isCorrectLocation=true;submitPriceShopper();}
function populateAddressNoZip(tempCity,state){var city=tempCity.replace(/#/g," ");document.getElementById('stateListId').value=state;document.getElementById('senderCityId').value=toTitleCase(city);document.getElementById('zip').value="";hideData('addressTableId');isZipCodeValid=true;isCorrectLocation=true;submitPriceShopper();}
function toTitleCase(str)
{return str.replace(/\w\S*/g,function(txt){return txt.charAt(0).toUpperCase()+txt.substr(1).toLowerCase();});}
function getCountryBillersList(countryCode,languageCode,buttonValue)
{var fromCountry=document.getElementById('fromCountry').value;if(buttonValue=='yes'){showData('destCurrencyId');if(fromCountry=="US"){billerCode="PRISON";if(billerCode=="PRISON"){var sessionID=document.getElementById("appSessionId").value;var countryCodeParam=new ParameterBean('countryCode',countryCode);var languageCodeParam=new ParameterBean('languageCode',languageCode);var sessionStringParam=new ParameterBean('sessionString',sessionID);var billerCodeParam=new ParameterBean('billerCode',billerCode);var fromCountryParam=new ParameterBean('fromCountrySelected',fromCountry);var functionBean=new FunctionBean('getCountryBillersListAJAX',countryCodeParam,languageCodeParam,billerCodeParam,sessionStringParam,fromCountryParam);var functionList=new Array();functionList[0]=functionBean;SpiderLiteManager.spiderLiteCall(functionList,populateCountryBillersList);}else{if(document.getElementById("errorBlock").style.display=='block'){document.getElementById("errorBlock").style.display='none';}}}}
else{}}
function getQCIndustryList(countryCode,languageCode){var sessionID=document.getElementById("appSessionId").value;var countryCode=new ParameterBean('countryCode',document.getElementById('countryCodeId').value);var languageCode=new ParameterBean('languageCode',document.getElementById('languageCodeId').value);var fromCountrySelected=new ParameterBean('fromCountrySelected',document.getElementById('fromCountry').value);var sessionString=new ParameterBean('sessionString',sessionID);var functionBean=new FunctionBean('getQCIndustryListAJAX',countryCode,languageCode,fromCountrySelected,sessionString);var functionList=new Array();functionList[0]=functionBean;SpiderLiteManager.spiderLiteCall(functionList,{callback:populateQCIndustryList,errorHandler:errPolling});}
function populateQCIndustryList(data){if(null!=data&&null!=data.getQCIndustryListAJAX&&null!=data.getQCIndustryListAJAX.qcIndustryListMap){if(null!=document.getElementById("appSessionId")){DWRUtil.removeAllOptions("industryListId");DWRUtil.addOptions("industryListId",data.getQCIndustryListAJAX.qcIndustryListMap);}}}
function getCurrencyListForChangeMgr(){var languageCode=document.getElementById("languageCodeId").value;var countryCode=document.getElementById("countryCodeId").value;fromCountrySelectedFlag='true';getSenderCurrencyList(countryCode,languageCode,'yes');}
function getSenderCurrencyList(countryCode,languageCode,buttonValue){var sessionID=document.getElementById("appSessionId").value;var countryCode=new ParameterBean('countryCode',countryCode);var languageCode=new ParameterBean('languageCode',languageCode);fromCountry=document.getElementById('fromCountry');var fromCountrySelected=new ParameterBean('fromCountrySelected',document.getElementById('fromCountry').value);index=document.getElementById('fromCountry').selectedIndex;fromCountryName=document.getElementById('fromCountry').options[index].text;var fromCountrySelectedName=new ParameterBean('fromCountrySelectedName',fromCountry.options[index].text);var sessionString=new ParameterBean('sessionString',sessionID);var functionBean=new FunctionBean('getSenderCurrencyListAJAX',countryCode,languageCode,fromCountrySelected,fromCountrySelectedName,sessionString);var functionList=new Array();functionList[0]=functionBean;if(buttonValue=='yes'&&fromCountrySelectedFlag=='true'){fromCountrySelectedFlag='false';showData('sourceCurrencyDataImgId');hideDestinationInfo();document.getElementById("sendAmountPanel").style.background=ENABLED_BOX_COLOR;cleanAmountField("amount");sourceCurrencyFlag=false;if(document.getElementById("sysPlatformID").value=="CSC"){disableContinueButtonsCSC();}else{disableContinueButtonsBeforeAJAXCall();}
SpiderLiteManager.spiderLiteCall(functionList,{callback:populateSenderCurrencyList,errorHandler:errPolling});}else
{if(document.feeInquiryActionForm.quickCollectExists.value=="true"){if(null!=document.getElementById("destCurrencyListId")){DWRUtil.removeAllOptions("destCurrencyListId");}
hideDestinationInfo();document.getElementById("sendAmountPanel").style.background=ENABLED_BOX_COLOR;cleanAmountField("amount");if(null!=sourceCurrencyList){sourceCurrencyFlag=true;if(document.getElementById("sysPlatformID").value=="CSC"){enableContinueButtonsCSC();}else{enableContinueButtonsAfterAJAXCall();}
if(sourceCurrencyList.length>1){document.getElementById("destCurrencyTextId").style.display='none';showData("destCurrencyDataId");document.getElementById("destCurrencyListId").style.display='block';DWRUtil.addOptions('destCurrencyListId',sourceCurrencyList,'ISOCurrencyCode','currencyName');}
else{document.getElementById("destCurrencyListId").style.display='none';hideData("destCurrencyDataId");document.getElementById("destCurrencyTextId").style.display='block';document.getElementById("destCurrencyTextId").innerHTML=sourceCurrencyList[0].currencyName;document.getElementById("recieverCurrencyCodeId").value=sourceCurrencyList[0].ISOCurrencyCode;}
if(document.getElementById("sendToPersonId")==null||!document.getElementById("sendToPersonId").checked){setQCTransfer('sendAmountPanel','receiveAmountPanel','amount','receiveAmount');}}
else{SpiderLiteManager.spiderLiteCall(functionList,{callback:populateQCCurrency,errorHandler:errPolling});}}}}
function populateSenderCurrencyList(data)
{var errorMessage=data.getSenderCurrencyListAJAX.errorMessage;document.getElementById("errorBlock").style.display='none';hideData('sourceCurrencyDataImgId');if(false==data.getSenderCurrencyListAJAX.flagSuccess){document.getElementById("ajaxErrorBlock").style.display='block';}
else{if(errorMessage!=null&&errorMessage!=""){document.getElementById("errorBlock").style.display='block';DWRUtil.setValue(document.getElementById("errorActionMsg"),errorMessage);}
else{sourceCurrencyList=data.getSenderCurrencyListAJAX.currencyList;sourceCurrencyFlag=true;if(document.getElementById("sysPlatformID").value=="CSC"){enableContinueButtonsCSC();}else{enableContinueButtonsAfterAJAXCall();}
if(null!=document.getElementById("sourceCurrencyListId")){DWRUtil.removeAllOptions('sourceCurrencyListId');}
if(sourceCurrencyList.length>1){hideData("sourceCurrencyTextId");showData("sourceCurrencyDataId");showData("sourceCurrencyListId");DWRUtil.addOptions('sourceCurrencyListId',sourceCurrencyList,'ISOCurrencyCode','currencyName');}
else{hideData("sourceCurrencyListId");hideData("sourceCurrencyDataId");showData("sourceCurrencyTextId");document.getElementById("sourceCurrencyTextId").innerHTML=sourceCurrencyList[0].currencyName;document.getElementById("senderCurrencyCodeId").value=sourceCurrencyList[0].ISOCurrencyCode;}
if(document.feeInquiryActionForm.quickCollectExists.value=="true"){destinationCurrencyFlag=true;if(document.getElementById("sysPlatformID").value=="CSC"){enableContinueButtonsCSC();}else{enableContinueButtonsAfterAJAXCall();}
if(null!=document.getElementById("destCurrencyListId")){DWRUtil.removeAllOptions("destCurrencyListId");}
if(sourceCurrencyList.length>1){document.getElementById("destCurrencyTextId").style.display='none';showData("destCurrencyDataId");document.getElementById("destCurrencyListId").style.display='block';DWRUtil.addOptions('destCurrencyListId',sourceCurrencyList,'ISOCurrencyCode','currencyName');}
else{document.getElementById("destCurrencyListId").style.display='none';hideData("destCurrencyDataId");document.getElementById("destCurrencyTextId").style.display='block';document.getElementById("destCurrencyTextId").innerHTML=sourceCurrencyList[0].currencyName+" ("+sourceCurrencyList[0].ISOCurrencyCode+")";document.getElementById("recieverCurrencyCodeId").value=sourceCurrencyList[0].ISOCurrencyCode;}
setQCTransfer('sendAmountPanel','receiveAmountPanel','amount','receiveAmount');}}}}
function populateQCCurrency(data){if(false==data.getSenderCurrencyListAJAX.flagSuccess){document.getElementById("ajaxErrorBlock").style.display='block';}
else{destinationCurrencyFlag=true;sourceCurrencyFlag=true;if(document.getElementById("sysPlatformID").value=="CSC"){enableContinueButtonsCSC();}else{enableContinueButtonsAfterAJAXCall();}
qcCurrencyList=data.getSenderCurrencyListAJAX.currencyList;if(null!=document.getElementById("destCurrencyListId")){DWRUtil.removeAllOptions("destCurrencyListId");}
if(qcCurrencyList.length>1){document.getElementById("destCurrencyTextId").style.display='none';showData("destCurrencyDataId");document.getElementById("destCurrencyListId").style.display='block';DWRUtil.addOptions('destCurrencyListId',qcCurrencyList,'ISOCurrencyCode','currencyName');}
else{document.getElementById("destCurrencyListId").style.display='none';hideData("destCurrencyDataId");document.getElementById("destCurrencyTextId").style.display='block';document.getElementById("destCurrencyTextId").innerHTML=qcCurrencyList[0].currencyName+" ("+qcCurrencyList[0].ISOCurrencyCode+")";document.getElementById("recieverCurrencyCodeId").value=qcCurrencyList[0].ISOCurrencyCode;}
setQCTransfer('sendAmountPanel','receiveAmountPanel','amount','receiveAmount');}}
function getToCountry(){return selectedCountry;}
function getIndustryCode(){return industryCode;}
function getBillerCode(){return billerCode;}
function clearPanel(){if(null!=toCountryName){document.feeInquiryActionForm["feeInquiryVO.countryReceiverCode"].value="";}
if(document.getElementById("selectBillerId").style.display=='block'){document.getElementById("selectBillerId").style.display='none'}
if(document.getElementById("amountPanelId").style.display=='block'){document.getElementById("amountPanelId").style.display='none';}
if(document.feeInquiryActionForm["feeInquiryVO.billerCodeIndustryType"].value){document.feeInquiryActionForm["feeInquiryVO.billerCodeIndustryType"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.amountToSend"].value){document.feeInquiryActionForm["feeInquiryVO.amountToSend"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.amountToReceive"].value){document.feeInquiryActionForm["feeInquiryVO.amountToReceive"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.zipPostal"].value){document.feeInquiryActionForm["feeInquiryVO.zipPostal"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.stateSenderCode"].value){document.feeInquiryActionForm["feeInquiryVO.stateSenderCode"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.cityStateCode"].value){document.feeInquiryActionForm["feeInquiryVO.cityStateCode"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.QCCodeCity"].value){document.feeInquiryActionForm["feeInquiryVO.QCCodeCity"].value="";}
if(null!=document.feeInquiryActionForm["feeInquiryVO.QCStateCode"].value){document.feeInquiryActionForm["feeInquiryVO.QCStateCode"].value="";}
var destCountryListId=document.getElementById("destCountryListId");if(null!=destCountryListId){destCountryListId.style.display='none';}
var sendToPersonRadioId=document.getElementById("sendToPersonId");if(null!=sendToPersonRadioId){sendToPersonRadioId.checked=false;}
var sendToIndustryIdRadioId=document.getElementById("sendToIndustryId");if(null!=sendToIndustryIdRadioId){sendToIndustryIdRadioId.checked=false;}
var quickColectContainer=document.getElementById("quickColectContainer");if(null!=quickColectContainer){document.getElementById("quickColectContainer").style.display='none';}}
function FunctionBean(functionName,parameterBeanList){this.functionName=functionName;this.parameterList=new Array(arguments.length-1);for(i=0;i<arguments.length-1;i++){this.parameterList[i]=arguments[i+1];}}
function ParameterBean(parameterName,parameterValue){this.parameterName=parameterName;this.parameterValue=parameterValue;}
function showLoadingMessage(id,msg){if(document.getElementById(id)!=null)
{document.getElementById(id).innerHTML='';document.getElementById(id).innerHTML='&nbsp;<span id="loadMsg" class="error" style="display:none;"></span>';document.getElementById("loadMsg").innerHTML=msg;document.getElementById("loadMsg").style.display="";}}
function hideLoadingMessage(ids){var argv=hideLoadingMessage.arguments;var argc=argv.length;for(var i=0;i<argc;i++){if(document.getElementById(argv[i])!=null){document.getElementById(argv[i]).innerHTML='';}}}
function refreshScreen(){var fields=new Array();fields=document.getElementsByTagName("span");labels=document.getElementsByTagName("td");for(x in fields){if(fields[x].className=="spanerror"){fields[x].className="text";fields[x].innerHTML="";}
if(fields[x].className=="error"){fields[x].className="text";}}
for(x in labels){if(labels[x]){if(labels[x].className=="error"){labels[x].className="text";}}}}
function onTabPress(evt,amount){if(evt.keyCode==9)
{amountValue(amount);}}
function onTabPressReceive(evt,amount){if(evt.keyCode==9)
{amountReceiveValue(amount);}}
function onKeyPressAllow(e)
{var keynum;var keychar;var numcheck;var dotcheck;var commacheck;if(window.event)
{keynum=e.keyCode;}
else if(e.which)
{keynum=e.which;}
keychar=String.fromCharCode(keynum);numcheck=/\d/;dotcheck=/\./;commacheck=/\,/;function backcheck()
{if((typeof(keynum)=="undefined")||(keynum==8)||(keynum==48)||(keynum==46)||(keynum==40)||(keynum==9))
{return true;}
else
{return false;}}
return(numcheck.test(keychar)||dotcheck.test(keychar)||commacheck.test(keychar)||backcheck());}
function amountValue(amount_toTrim)
{if(document.getElementById(SEND_OPTION)==null||!document.getElementById(SEND_OPTION).checked)
{return true;}
if(""!=document.feeInquiryActionForm["feeInquiryVO.amountToSend"].value)
{refreshScreen();}
var invalidAmount=new String(amount_toTrim.value);var amount=new String(amount_toTrim.value);var checkN=new String("1234567890");var newvalue=(amount.length-1);var newval=0;for(newval=newvalue;newval>=0;newval--)
{trans_new=""+amount.charAt(newval);if((checkN.indexOf(trans_new)>=0))
{break;}
else
{amount=amount.substr(0,newval);}
if(newval==0)
{document.getElementById("amount").value=invalidAmount;showData("showError");return false;}}
while((amount.substring(0,1)==','||amount.substring(0,1)=='.')&&(amount.substring(1,2)==','||amount.substring(1,2)=='.'))
{amount=amount.substring(1,amount.length);}
var amount_final=new String();var first_integer=new Boolean(false);var trail_alphabet=new Boolean(false);var last_period=new Boolean(false);var pos_lastperiod=-1;var min=-1;var max=-1;var trans=new String();var check=new String("1234567890,.");var checkp=new String(",.");var val=0;for(val=0;val<amount.length;val++){trans=""+amount.charAt(val);trans1=""+amount.charAt(val+1);if((check.indexOf(trans)>=0)&&min<0)
{first_integer=true;min=val;}
if(((checkp.indexOf(trans))>=0))
{if((checkp.indexOf(trans1))>=0)
{document.getElementById("amount").value=invalidAmount;document.getElementById("showError").style.display='block';return false;}
last_period=true;pos_lastperiod=val;amount=amount.substr(0,pos_lastperiod)+amount.substr(pos_lastperiod+1,amount.length);}
if(first_integer==true&&(trail_alphabet==false))
{if((val+1<=amount.length)&&!(check.indexOf(trans)>=0))
{trail_alphabet=true;max=val;}
else
{max=amount.length;}}
if(trail_alphabet==true&&(check.indexOf(trans)>=0))
{return false;}
if(last_period==true)
{amount_final=amount.substr(min,pos_lastperiod)+"."+amount.substr(pos_lastperiod,max);}
else
{amount_final=amount.substr(min,max);}}
var validAmountFlag=false;var decimalIndex=amount_final.indexOf(".");if(decimalIndex<=8){if(decimalIndex!=-1){var amountArr=amount_final.split(".");amount_final=amountArr[0]+"."+amountArr[1].substr(0,2);validAmountFlag=true;}else if(amount_final.length<=8){validAmountFlag=true;}
if(validAmountFlag==true){document.getElementById("amount").value=amount_final;document.getElementById("showError").style.display='none';if(null!=document.getElementById("radi")){document.getElementById("radi").focus();}}}
if(validAmountFlag==false){document.getElementById("showError").style.display='block';}
return validAmountFlag;}
function amountReceiveValue(amount_toTrim)
{if(document.getElementById(RECEIVE_OPTION)==null||!document.getElementById(RECEIVE_OPTION).checked)
{return true;}
if(""!=document.feeInquiryActionForm["feeInquiryVO.amountToReceive"].value)
{refreshScreen();}
var invalidAmount=new String(amount_toTrim.value);var amount=new String(amount_toTrim.value);var checkN=new String("1234567890");var newvalue=(amount.length-1);var newval=0;for(newval=newvalue;newval>=0;newval--)
{trans_new=""+amount.charAt(newval);if((checkN.indexOf(trans_new)>=0))
{break;}
else
{amount=amount.substr(0,newval);}
if(newval==0)
{document.getElementById("receiveAmount").value=invalidAmount;showData("showReceiveError");return false;}}
while((amount.substring(0,1)==','||amount.substring(0,1)=='.')&&(amount.substring(1,2)==','||amount.substring(1,2)=='.'))
{amount=amount.substring(1,amount.length);}
var amount_final=new String();var first_integer=new Boolean(false);var trail_alphabet=new Boolean(false);var last_period=new Boolean(false);var pos_lastperiod=-1;var min=-1;var max=-1;var trans=new String();var check=new String("1234567890,.");var checkp=new String(",.");var val=0;for(val=0;val<amount.length;val++)
{trans=""+amount.charAt(val);trans1=""+amount.charAt(val+1);if((check.indexOf(trans)>=0)&&min<0)
{first_integer=true;min=val;}
if(((checkp.indexOf(trans))>=0))
{if((checkp.indexOf(trans1))>=0)
{document.getElementById("receiveAmount").value=invalidAmount;document.getElementById("showReceiveError").style.display='block';return false;}
last_period=true;pos_lastperiod=val;amount=amount.substr(0,pos_lastperiod)+amount.substr(pos_lastperiod+1,amount.length);}
if(first_integer==true&&(trail_alphabet==false))
{if((val+1<=amount.length)&&!(check.indexOf(trans)>=0))
{trail_alphabet=true;max=val;}
else
{max=amount.length;}}
if(trail_alphabet==true&&(check.indexOf(trans)>=0))
{return false;}
if(last_period==true)
{amount_final=amount.substr(min,pos_lastperiod)+"."+amount.substr(pos_lastperiod,max);}
else
{amount_final=amount.substr(min,max);}}
var validAmountFlag=false;var decimalIndex=amount_final.indexOf(".");if(decimalIndex<=8)
{if(decimalIndex!=-1)
{var amountArr=amount_final.split(".");amount_final=amountArr[0]+"."+amountArr[1].substr(0,2);validAmountFlag=true;}
else if(amount_final.length<=8)
{validAmountFlag=true;}
if(validAmountFlag==true)
{document.getElementById("receiveAmount").value=amount_final;document.getElementById("showReceiveError").style.display='none';if(null!=document.getElementById("radi"))
{document.getElementById("radi").focus();}}}
if(validAmountFlag==false)
{document.getElementById("showReceiveError").style.display='block';}
return validAmountFlag;}
var bgsleight=function(){function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}
func();}}}
function fnLoadPngs(){var rslt=navigator.appVersion.match(/MSIE (\d+\.\d+)/,'');var itsAllGood=(rslt!=null&&Number(rslt[1])>=5.5);for(var i=document.all.length-1,obj=null;(obj=document.all[i]);i--){if(itsAllGood&&obj.currentStyle.backgroundImage.match(/\.png/i)!=null){fnFixPng(obj);obj.attachEvent("onpropertychange",fnPropertyChanged);}}}
function fnPropertyChanged(){if(window.event.propertyName=="style.backgroundImage"){var el=window.event.srcElement;if(!el.currentStyle.backgroundImage.match(/x\.gif/i)){var bg=el.currentStyle.backgroundImage;var src=bg.substring(5,bg.length-2);el.filters.item(0).src=src;el.style.backgroundImage="url(x.gif)";}}}
function fnFixPng(obj){var bg=obj.currentStyle.backgroundImage;var src=bg.substring(5,bg.length-2);obj.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')";obj.style.backgroundImage="url(x.gif)";}
return{init:function(){if(navigator.platform=="Win32"&&navigator.appName=="Microsoft Internet Explorer"&&window.attachEvent){addLoadEvent(fnLoadPngs);}}}}();bgsleight.init();function toggleBox(szDivID,iState)
{if(document.layers)
{document.layers[szDivID].visibility=iState?"show":"hide";}
else if(document.getElementById)
{var obj=document.getElementById(szDivID);obj.style.visibility=iState?"visible":"hidden";}
else if(document.all)
{document.all[szDivID].style.visibility=iState?"visible":"hidden";}}
var dhtmlwindow={imagefiles:['../background-images/min.gif','../background-images/close.gif','../background-images/restore.gif','../background-images/resize.gif'],ajaxbustcache:true,ajaxloadinghtml:'<b>Loading Page. Please wait...</b>',minimizeorder:0,zIndexvalue:100,tobjects:[],lastactivet:{},init:function(t){var domwindow=document.createElement("div")
domwindow.id=t
domwindow.className="dhtmlwindow"
var domwindowdata=''
domwindowdata='<div class="drag-handle">'
domwindowdata+='DHTML Window <div class="drag-controls"><img src="'+this.imagefiles[0]+'" title="Minimize" /><img src="'+this.imagefiles[1]+'" title="Close" /></div>'
domwindowdata+='</div>'
domwindowdata+='<div class="drag-contentarea"></div>'
domwindowdata+='<div class="drag-statusarea"><div class="drag-resizearea" style="background: transparent url('+this.imagefiles[3]+') top right no-repeat;">&nbsp;</div></div>'
domwindowdata+='</div>'
domwindow.innerHTML=domwindowdata
document.getElementById("dhtmlwindowholder").appendChild(domwindow)
var t=document.getElementById(t)
var divs=t.getElementsByTagName("div")
for(var i=0;i<divs.length;i++){if(/drag-/.test(divs[i].className))
t[divs[i].className.replace(/drag-/,"")]=divs[i]}
t.handle._parent=t
t.resizearea._parent=t
t.controls._parent=t
t.onclose=function(){return true}
t.onmousedown=function(){dhtmlwindow.setfocus(this)}
t.handle.onmousedown=dhtmlwindow.setupdrag
t.resizearea.onmousedown=dhtmlwindow.setupdrag
t.controls.onclick=dhtmlwindow.enablecontrols
t.show=function(){dhtmlwindow.show(this)}
t.hide=function(){dhtmlwindow.hide(this)}
t.close=function(){dhtmlwindow.close(this)}
t.setSize=function(w,h){dhtmlwindow.setSize(this,w,h)}
t.moveTo=function(x,y){dhtmlwindow.moveTo(this,x,y)}
t.isResize=function(bol){dhtmlwindow.isResize(this,bol)}
t.isScrolling=function(bol){dhtmlwindow.isScrolling(this,bol)}
t.load=function(contenttype,contentsource,title){dhtmlwindow.load(this,contenttype,contentsource,title)}
this.tobjects[this.tobjects.length]=t
return t},open:function(t,contenttype,contentsource,title,attr,recalonload){var d=dhtmlwindow
function getValue(Name){var config=new RegExp(Name+"=([^,]+)","i")
return(config.test(attr))?parseInt(RegExp.$1):0}
if(document.getElementById(t)==null)
t=this.init(t)
else
t=document.getElementById(t)
this.setfocus(t)
t.setSize(getValue(("width")),(getValue("height")))
var xpos=getValue("center")?"middle":getValue("left")
var ypos=getValue("center")?"middle":getValue("top")
if(typeof recalonload!="undefined"&&recalonload=="recal"&&this.scroll_top==0){if(window.attachEvent&&!window.opera)
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"))
t.isScrolling(getValue("scrolling"))
t.style.visibility="visible"
t.style.display="block"
t.contentarea.style.display="block"
t.moveTo(xpos,ypos)
t.load(contenttype,contentsource,title)
if(t.state=="minimized"&&t.controls.firstChild.title=="Restore"){t.controls.firstChild.setAttribute("src",dhtmlwindow.imagefiles[0])
t.controls.firstChild.setAttribute("title","Minimize")
t.state="fullview"}
return t},setSize:function(t,w,h){t.style.width=Math.max(parseInt(w),150)+"px"
t.contentarea.style.height=Math.max(parseInt(h),100)+"px"},moveTo:function(t,x,y){this.getviewpoint()
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){t.statusarea.style.display=(bol)?"block":"none"
t.resizeBool=(bol)?1:0},isScrolling:function(t,bol){t.contentarea.style.overflow=(bol)?"auto":"hidden"},load:function(t,contenttype,contentsource,title){if(t.isClosed){return}
var contenttype=contenttype.toLowerCase()
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)
if(null!=inlinedivref){t.contentarea.innerHTML=(inlinedivref.defaultHTML||inlinedivref.innerHTML)
if(!inlinedivref.defaultHTML)
inlinedivref.defaultHTML=inlinedivref.innerHTML
inlinedivref.innerHTML=""
inlinedivref.style.display="none"}}
else if(contenttype=="iframe"){t.contentarea.style.overflow="hidden"
if(!t.contentarea.firstChild||t.contentarea.firstChild.tagName!="IFRAME")
t.contentarea.innerHTML='<iframe src="" style="margin:0; padding:0; width:100%; height: 100%" name="_iframe-'+t.id+'"></iframe>'
window.frames["_iframe-"+t.id].location.replace(contentsource)}
else if(contenttype=="ajax"){this.ajax_connect(contentsource,t)}
t.contentarea.datatype=contenttype},setupdrag:function(e){var d=dhtmlwindow
var t=this._parent
d.etarget=this
var e=window.event||e
d.initmousex=e.clientX
d.initmousey=e.clientY
d.initx=parseInt(t.offsetLeft)
d.inity=parseInt(t.offsetTop)
d.width=parseInt(t.offsetWidth)
d.contentheight=parseInt(t.contentarea.offsetHeight)
if(t.contentarea.datatype=="iframe"){t.style.backgroundColor="#F8F8F8"
t.contentarea.style.visibility="hidden"}
document.onmousemove=d.getdistance
document.onmouseup=function(){if(t.contentarea.datatype=="iframe"){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
d.distancey=e.clientY-d.initmousey
if(etarget.className=="drag-handle")
d.move(etarget._parent,e)
else if(etarget.className=="drag-resizearea")
d.resize(etarget._parent,e)
return false},getviewpoint:function(){var ie=document.all&&!window.opera
var domclientWidth=document.documentElement&&parseInt(document.documentElement.clientWidth)||100000
this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body
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){this.getviewpoint()
t.lastx=parseInt((t.style.left||t.offsetLeft))-dhtmlwindow.scroll_left
t.lasty=parseInt((t.style.top||t.offsetTop))-dhtmlwindow.scroll_top
t.lastwidth=parseInt(t.style.width)},move:function(t,e){t.style.left=dhtmlwindow.distancex+dhtmlwindow.initx+"px"
t.style.top=dhtmlwindow.distancey+dhtmlwindow.inity+"px"},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
if(/Minimize/i.test(sourceobj.getAttribute("title")))
d.minimize(sourceobj,this._parent)
else if(/Restore/i.test(sourceobj.getAttribute("title")))
d.restore(sourceobj,this._parent)
else if(/Close/i.test(sourceobj.getAttribute("title")))
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"
t.contentarea.style.display="none"
t.statusarea.style.display="none"
if(typeof t.minimizeorder=="undefined"){dhtmlwindow.minimizeorder++
t.minimizeorder=dhtmlwindow.minimizeorder}
t.style.left="10px"
t.style.width="200px"
var windowspacing=t.minimizeorder*10
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"
t.style.display="block"
t.contentarea.style.display="block"
if(t.resizeBool)
t.statusarea.style.display="block"
t.style.left=parseInt(t.lastx)+dhtmlwindow.scroll_left+"px"
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){var closewinbol=true}
finally{if(typeof closewinbol=="undefined"){var closewinbol=true}}
if(closewinbol){if(t.state!="minimized")
dhtmlwindow.rememberattrs(t)
if(window.frames["_iframe-"+t.id])
window.frames["_iframe-"+t.id].location.replace("about:blank")
else
t.contentarea.innerHTML=""
t.style.display="none"
t.isClosed=true}
return closewinbol},setopacity:function(targetobject,value){if(!targetobject)
return
if(targetobject.filters&&targetobject.filters[0]){if(typeof targetobject.filters[0].opacity=="number")
targetobject.filters[0].opacity=value*100
else
targetobject.style.filter="alpha(opacity="+value*100+")"}
else if(typeof targetobject.style.MozOpacity!="undefined")
targetobject.style.MozOpacity=value
else if(typeof targetobject.style.opacity!="undefined")
targetobject.style.opacity=value},setfocus:function(t){this.zIndexvalue++
t.style.zIndex=this.zIndexvalue
t.isClosed=false
this.setopacity(this.lastactivet.handle,0.5)
this.setopacity(t.handle,1)
this.lastactivet=t},show:function(t){if(t.isClosed){return}
if(t.lastx)
dhtmlwindow.restore(t.controls.firstChild,t)
else
t.style.display="block"
this.setfocus(t)
t.state="fullview"},hide:function(t){t.style.display="none"},ajax_connect:function(url,t){var page_request=false
var bustcacheparameter=""
if(window.XMLHttpRequest)
page_request=new XMLHttpRequest()
else if(window.ActiveXObject){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)
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
document.onmousemove=null
document.onmouseup=null},addEvent:function(target,functionref,tasktype){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}}
document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>')
window.onunload=dhtmlwindow.cleanup
if(typeof dhtmlwindow=="undefined")
alert('Modal Window not supported in this browser')
var dhtmlmodal={veilstack:0,open:function(t,contenttype,contentsource,title,attr,recalonload){var d=dhtmlwindow
this.interVeil=document.getElementById("interVeil")
this.veilstack++
this.loadveil()
if(typeof recalonload!="undefined"&&recalonload=="recal"&&d.scroll_top==0)
d.addEvent(window,function(){dhtmlmodal.loadveil()},"load")
var t=d.open(t,contenttype,contentsource,title,attr,recalonload)
t.controls.firstChild.style.display="none"
t.controls.onclick=function(){dhtmlmodal.forceclose(this._parent)}
t.show=function(){dhtmlmodal.show(this)}
t.hide=function(){dhtmlmodal.close(this)}
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"
this.interVeil.style.height=this.docheightcomplete+"px"
this.interVeil.style.left=0
this.interVeil.style.top=0
this.interVeil.style.visibility="visible"
this.interVeil.style.display="block"},adjustveil:function(){if(this.interVeil&&this.interVeil.style.display=="block")
this.loadveil()},close:function(t){t.contentDoc=(t.contentarea.datatype=="iframe")?window.frames["_iframe-"+t.id].document:t.contentarea
var closewinbol=dhtmlwindow.close(t)
if(closewinbol){this.veilstack--
if(this.veilstack==0)
this.interVeil.style.display="none"}},forceclose:function(t){dhtmlwindow.rememberattrs(t)
t.style.display="none"
this.veilstack--
if(this.veilstack==0)
this.interVeil.style.display="none"},show:function(t){dhtmlmodal.veilstack++
dhtmlmodal.loadveil()
dhtmlwindow.show(t)}}
document.write('<div id="interVeil"></div>')
dhtmlwindow.addEvent(window,function(){if(typeof dhtmlmodal!="undefined")dhtmlmodal.adjustveil()},"resize")
function confirmPromptFromPanel(){setDisabled('selectDis',true);promptWindow=dhtmlmodal.open('agebox','div','changeFromCountry','','width=550px,height=150px,left=85px,top=180px,resize=0,scrolling=0')}
function confirmPromptToPanel(){setDisabled('selectDis',true);promptWindow=dhtmlmodal.open('agebox','div','changeToPanel','','width=550px,height=150px,left=85px,top=360px,resize=0,scrolling=0')}
function confirmToCountryChange(){setDisabled('selectDis',true);promptWindow=dhtmlmodal.open('agebox','div','changeCountryToBiller','','width=550px,height=150px,left=85px,top=360px,resize=0,scrolling=0')}
function confirmBillerChange(){setDisabled('selectDis',true);promptWindow=dhtmlmodal.open('agebox','div','changeBillerToCountry','','width=550px,height=150px,left=85px,top=360px,resize=0,scrolling=0')}
function changeSenderCountry(){setDisabled('selectDis',true);promptWindow=dhtmlmodal.open('agebox','div','changeCountry','','width=550px,height=150px,left=85px,top=180px,resize=0,scrolling=0')}
function process_age(whichbutton){if(whichbutton=="no"){promptWindow.hide()}
if(whichbutton=="yes"){promptWindow.hide()}}
function setAmountPanel(selectedOption,unselectedOption,selectedAmount,unselectedAmount,toCountryFlag){hideData("showError");hideData("showReceiveError");if(document.getElementById(selectedOption)!=null){document.getElementById(selectedOption).style.background=ENABLED_BOX_COLOR;}
if(document.getElementById(unselectedOption)!=null){document.getElementById(unselectedOption).style.background=DISABLED_BOX_COLOR;}
if(document.getElementById(unselectedAmount)!=null&&document.getElementById("calculatePrice")!=null){document.getElementById(unselectedAmount).value=document.getElementById("calculatePrice").value;document.getElementById(unselectedAmount).style.fontStyle="italic";document.getElementById(unselectedAmount).style.color="gray";}
if(document.getElementById(selectedAmount)!=null&&document.getElementById("calculatePrice")!=null){if(document.getElementById(selectedAmount).value.indexOf(document.getElementById("calculatePrice").value)>=0){document.getElementById(selectedAmount).value="";}
document.getElementById(selectedAmount).style.color="black";document.getElementById(selectedAmount).style.fontStyle="normal";}}
function setTransferType(selectedOption,unselectedOption,selectedAmount,unselectedAmount){setAmountPanel(selectedOption,unselectedOption,selectedAmount,unselectedAmount,true);}
function setQCTransfer(selectedOption,unselectedOption,selectedAmount,unselectedAmount){setAmountPanel(selectedOption,unselectedOption,selectedAmount,unselectedAmount,false);}
function setSendFocus(changeSendFocus){if(changeSendFocus||(document.getElementById(SEND_OPTION)!=null&&!document.getElementById(SEND_OPTION).checked)){document.getElementById(SEND_OPTION).checked=true;setTransferType('sendAmountPanel','receiveAmountPanel','amount','receiveAmount');if(document.getElementById('amount')!=null){document.getElementById('amount').value="";document.getElementById('amount').focus();}}}
function setReceiveFocus(changeReceiveFocus){if(changeReceiveFocus||(document.getElementById(RECEIVE_OPTION)!=null&&!document.getElementById(RECEIVE_OPTION).checked)){document.getElementById(RECEIVE_OPTION).checked=true;setTransferType('receiveAmountPanel','sendAmountPanel','receiveAmount','amount');if(document.getElementById('receiveAmount')!=null){document.getElementById('receiveAmount').value="";document.getElementById('receiveAmount').focus();}}}
function hideDestinationInfo(){showData("amountMessageSend");hideData("amountMessageReceived");showData("sendCurrencyBlank");hideData("sendCurrencyLabel");hideData("receiveAmountImgId");hideData("receiveAmountEqualsImg");hideData("receiveAmountPanel");document.getElementById("receiveAmount").value="";document.getElementById(SEND_OPTION).checked=true;}
function showDestinationInfo(){hideData("amountMessageSend");showData("amountMessageReceived");hideData("sendCurrencyBlank");showData("sendCurrencyLabel");hideData("receiveAmountImgId");showData("receiveAmountEqualsImg");showData("receiveAmountPanel");}
function getAmountField(){var amount="";if(document.getElementById(SEND_OPTION)!=null&&document.getElementById(SEND_OPTION).checked){if(null!=document.feeInquiryActionForm["feeInquiryVO.amountToSend"]){amount=document.feeInquiryActionForm["feeInquiryVO.amountToSend"].value;}}
return amount;}
function getReceiveAmountField(){var receiveAmount="";if(document.getElementById(RECEIVE_OPTION)!=null&&document.getElementById(RECEIVE_OPTION).checked){if(null!=document.feeInquiryActionForm["feeInquiryVO.amountToReceive"]){receiveAmount=document.feeInquiryActionForm["feeInquiryVO.amountToReceive"].value;}}
return receiveAmount;}
function cleanAmountField(amountField){if(document.getElementById(amountField)!=null){document.getElementById(amountField).style.color="black";document.getElementById(amountField).style.fontStyle="normal";if(document.getElementById("calculatePrice")!=null&&document.getElementById(amountField).value.indexOf(document.getElementById("calculatePrice").value)>=0){document.getElementById(amountField).value="";}}}
function populateAmountPanel(feeInquiryType,amountToSend,amountToReceive){var enablePanel="sendAmountPanel";var enableAmount="amount";var disablePanel="receiveAmountPanel";var disableAmount="receiveAmount";if(document.getElementById(SEND_OPTION)!=null&&document.getElementById(RECEIVE_OPTION)!=null){document.getElementById(feeInquiryType).checked=true;if(document.getElementById(RECEIVE_OPTION).checked){enablePanel="receiveAmountPanel";enableAmount="receiveAmount";disablePanel="sendAmountPanel";disableAmount="amount";}
if(document.getElementById(enablePanel)!=null){document.getElementById(enablePanel).style.background=ENABLED_BOX_COLOR;}
if(document.getElementById(disablePanel)!=null){document.getElementById(disablePanel).style.background=DISABLED_BOX_COLOR;}
if(document.getElementById(enableAmount)!=null){document.getElementById(enableAmount).style.color="black";document.getElementById(enableAmount).style.fontStyle="normal";}
if(document.getElementById(disableAmount)!=null){document.getElementById(disableAmount).style.color="gray";document.getElementById(disableAmount).style.fontStyle="italic";}
if(document.getElementById("amount")!=null){document.getElementById("amount").value=amountToSend;}
if(document.getElementById("receiveAmount")!=null){document.getElementById("receiveAmount").value=amountToReceive;}}}
function getTextByBrowser(fxText,ieText,othersText){if(window.getComputedStyle)
{return fxText;}
else if(document.all)
{return ieText;}
return othersText;}
function setDisabled(id,disabled)
{if(!document.getElementById||!document.getElementsByTagName)return;var nodesToDisable={select:'',textarea:''};var node,nodes;var div=document.getElementById(id);if(!div)return;nodes=div.getElementsByTagName('*');if(!nodes)return;var i=nodes.length;while(i--){node=nodes[i];if(node.nodeName&&node.nodeName.toLowerCase()in nodesToDisable){node.disabled=disabled;}}}
