



	HS_Form.prototype=new HS_Object();HS_Form.prototype.constructor=HS_Form;function HS_Form(_1,_2,_3,_4){if(arguments.length>0){this.init(_1,_2,_3,_4);}this.className="HS_Form";}HS_Form.prototype.init=function(_5,_6,_7,_8){var _9="";this.baseInit=HS_Object.prototype.init;this.baseInit(_5);var id="";if(typeof _6!="undefined"&&_6!=null){id=_6;}var _b=null;if(id.length>0){_b=document.getElementById(id);}if(_b!=null){_b.name=_b.id;}this.formName="";this.updateFormName=function(){var _c=_9.lastIndexOf("/");if(_c>=0){this.formName=_9.substring(_c+1);}else{this.formName="";}if(this.formName.length>0&&_b!=null){_b.name=this.formName;}};if(typeof _7!="undefined"&&_7!=null){_9=_7;this.updateFormName();}var _d=null;var _e=new Array();var _f=true;var _10=false;var _11=null;if(typeof _8!="undefined"&&_8!=null){_11=_8;}var _12=new Array();var _13=true;this.enableErrorOutput=function(){_13=true;};this.disableErrorOutput=function(){_13=false;};this.getErrors=function(){return _12;};this.clearErrors=function(){_12=new Array();if(_13){var _14=document.getElementById("hsidHSErrorMessages");if(_14!=null){_14.innerHTML="";}var _15=document.getElementById("hsidHSErrorDialog");if(_15!=null){_15.style.display="none";}}};this.reportError=function(key){if(_13){var str="";if(typeof HS_ErrorDisplayHandler!="undefined"){str=HS_ErrorDisplayHandler(key);}if(str.length>0){var _18=document.getElementById("hsidHSErrorDialog");if(_18!=null){_18.style.display="block";var _19=document.getElementById("hsidHSErrorMessages");if(_19!=null){var _1a=document.createElement("div");_19.appendChild(_1a);_1a.innerHTML=str;}}}}this.log("report error: "+key);_12.push(key);};this.getServiceData=function(_1b){if(_d==null){return null;}if(typeof _1b=="undefined"||_1b==null||_1b.length<=0){return _d;}var _1c=_d[HS_HASHKEY_SUBARRAY+"2"];if(typeof _1c!="undefined"&&_1c!=null&&_1c.length>0){for(var i=0;i<_1c.length;i++){var _1e=_1c[i];if(_1b==_1e["stFieldName"]){return _1e;}}}return null;};this.getDisplayData=function(key){if(_d==null){return "";}var _20="";var _21=_d[HS_HASHKEY_SUBARRAY+"1"];if(typeof _21!="undefined"&&_21!=null&&_21.length>0){_20=_21[0][key];if(typeof _20=="undefined"||_20==null){_20="";}}return _20;};this.getForward=function(_22){if(typeof _22=="undefined"||_22==null||_22.trim().length<=0){return null;}for(var i=0;i<_e.length;i++){var _24=_e[i];if(_24[0].trim()==_22.trim()){return _24[1];}}return null;};this.setForward=function(_25,_26){if(typeof _25=="undefined"||_25==null||_25.trim().length<=0){return;}if(typeof _26=="undefined"||_26==null||_26.trim().length<=0){return;}for(var i=0;i<_e.length;i++){var _28=_e[i];if(_28[0].trim()==_25.trim()){return;}}_e.push(new Array(_25.trim(),_26.trim()));};this.setURL=function(_29){if(typeof _29!="undefined"&&_29!=null){_9=_29;this.updateFormName();}};this.modifyForward=function(_2a,_2b){if(typeof _2a=="undefined"||_2a==null||_2a.trim().length<=0){return;}if(typeof _2b=="undefined"||_2b==null||_2b.trim().length<=0){return;}for(var i=0;i<_e.length;i++){var _2d=_e[i];if(_2d[0].trim()==_2a.trim()){_2d[1]=_2b;return;}}_e.push(new Array(_2a.trim(),_2b.trim()));};this.run=function(_2e,_2f){if(_9.trim().length<=0){return;}_d=null;this.clearErrors();var _30=false;var _31=_9+"?out=arrFormData";if(typeof _2f!="undefined"&&_2f!=null){if(_2f){_30=true;}}if(!_30){var _32="";if(typeof _2e!="undefined"&&_2e!=null){_32=_2e;}if(_32.length<=0){_32=HS_GetQueryString("formid").trim();}if(_32.length>0){this.log("existing formid: "+_32);_f=false;_31+="&formid="+_32;}}_XMLHTTP.request(_31,HS_Form_DataService_Callback,eval(this.name));};this.run2=function(_33,_34,_35){if(_9.trim().length<=0){return;}_d=null;this.clearErrors();var _36=false;var _37=_9+"?out=arrFormData";if(typeof _35!="undefined"&&_35!=null){if(_35){_36=true;}}if(!_36){var _38="";if(typeof _34!="undefined"&&_34!=null){_38=_34;}if(_38.length<=0){_38=HS_GetQueryString("formid").trim();}if(_38.length>0){this.log("existing formid: "+_38);_f=false;_37+="&formid="+_38;}}_XMLHTTP.request2(_33,_37,eval(this.name));};this.buildOutputs=function(){if(_d==null){return;}var _39=_d[HS_HASHKEY_SUBARRAY+"1"];if(typeof _39!="undefined"&&_39!=null&&_39.length>0){for(var key in _39[0]){if(key!="size"){var obj=document.getElementById("hsid"+key);if(obj==null){obj=document.getElementById(key);}if(obj!=null){var _3c=_39[0][key];if(typeof _3c=="undefined"||_3c==null){_3c="";}var _3d=key.substring(0,2);if(_3d=="cy"){_3c=HS_Form_DisplayHandler_Currency(_3c);}else{if(_3d=="da"){_3c=HS_Form_DisplayHandler_Date(_3c);}else{if(_3d=="tm"){_3c=HS_Form_DisplayHandler_Time(_3c);}else{if(_3d=="dt"){_3c=HS_Form_DisplayHandler_DateTime(_3c);}}}}if(obj.tagName.toLowerCase()=="input"&&(obj.type.toLowerCase()=="hidden"||obj.type.toLowerCase()=="text")){obj.value=_3c;}else{obj.innerHTML=_3c;}}else{this.log("no element with id="+key);}}}}this.log("Build Form Outputs");};this.buildInputs=function(){var _3e=0;if(_d==null){return;}if(_b==null){return;}var _3f=_d[HS_HASHKEY_SUBARRAY+"2"];this.log(_3f.length+" inputs");if(typeof _3f!="undefined"&&_3f!=null&&_3f.length>0){for(var i=0;i<_3f.length;i++){var _41=_3f[i];var _42=_41["stFieldName"];var _43=_41["stObjectType"];var _44=_41["obInitialDataObject"];var _45=_41["obRawStringData"];var _46=_41["obValidatDataObject"];var _47=_41["ecFieldErrorValue"];var _48=_41[HS_HASHKEY_SUBARRAY];if(typeof _47!="undefined"&&_47!=null&&_47>0){this.reportError(_42+"::"+_47);}var _49=_46;if(typeof _49=="undefined"||_49==null){_49=_45;if(typeof _49=="undefined"||_49==null){_49=_44;if(typeof _49=="undefined"||_49==null){_49="";}}}if(_43.trim().toLowerCase()=="cy"){if(_49!=null&&_49.length>0){_49=HS_Form_DisplayHandler_Currency(_49);}}if(_43.trim().toLowerCase()=="da"){if(_45!=null){_49=_45;}}this.log("input data: "+_42+" - "+_49);var _4a=eval("document.getElementById( \""+id+"\" )."+_42);if(_4a!=null){if(typeof _48!="undefined"&&_48!=null&&_48.length>0){var _4b=new Array();if(_49!=null){if(IsArray(_49)){_4b=_49;}else{_4b.push(_49);}}if(_4a.tagName.toLowerCase()=="select"){for(var j=0;j<_48.length;j++){var _4d=_48[j];if(typeof _4d!="undefined"&&_4d!=null&&_4d.size()>1){var _4e="";if((_42.match("month")||_42.match("Month"))&&typeof monthMap!="undefined"&&monthMap!=null&&monthMap instanceof Array){_4e=monthMap[_4d["stKey"]];}else{if(typeof valueAndLabelMap!="undefined"&&valueAndLabelMap!=null&&valueAndLabelMap instanceof Array){_4e=valueAndLabelMap[_4d["stKey"]];if(typeof _4e=="undefined"&&_4e==null){_4e=_4d["stKey"].replace(_4d["stKey"].substring(0,1),_4d["stKey"].substring(0,1).toUpperCase());}}else{_4e=_4d["stKey"].replace(_4d["stKey"].substring(0,1),_4d["stKey"].substring(0,1).toUpperCase());}}var obj=document.createElement("option");try{_4a.add(obj);}catch(e){_4a.add(obj,null);}obj.text=_4e;obj.value=_4d["stValue"];if(_4b.length>0){for(var k=0;k<_4b.length;k++){if(_4b[k]==obj.value){obj.selected=true;break;}}}}}}if(_4a.tagName.toLowerCase()=="input"&&(_4a.type.toLowerCase()=="checkbox"||_4a.type.toLowerCase()=="radio")){if(typeof valueOrderMap!="undefined"&&valueOrderMap instanceof Array&&_4a.type.toLowerCase()=="radio"){var _51=new Array();if(valueOrderMap[0]!=_48[0]["stValue"]){_51[0]=_48[1];_51[1]=_48[0];}for(var j=0;j<_51.length;j++){_48[j]=_51[j];}}var _52=_4a.parentNode;var _53=null;if(typeof _52!="undefined"&&_52!=null){_53=_52.parentNode;}if(typeof _52!="undefined"&&_52!=null&&typeof _53!="undefined"&&_53!=null){var _54=_53.getElementsByTagName("td");if(_52.tagName.toLowerCase()=="td"&&typeof _54!="undefined"&&_54!=null){if(typeof numCellsToKeep=="undefined"||numCellsToKeep==null){numCellsToKeep=0;}for(var x=(_54.length-1);x>=numCellsToKeep;x--){_53.removeChild(_54[x]);}}else{_53.removeChild(_52);}for(var j=0;j<_48.length;j++){var _4d=_48[j];if(typeof valueAndLabelMap!="undefined"&&valueAndLabelMap instanceof Array){var _4e=valueAndLabelMap[_4d["stValue"]];}if(typeof _4e=="undefined"||_4e==null){var _4e=_4d["stValue"];}var _56=document.createElement("td");if(typeof labelClass!="undefined"||labelClass!=null){_56.className=labelClass;}var _57=document.createElement("span");_57.setAttribute("id",_4e+_3e);_3e++;_56.appendChild(_57);_57.innerHTML=_4e;var _58=_52.cloneNode(true);_53.appendChild(_58);_53.appendChild(_56);var _59=_42+j;var obj=getElementByName(_58,"input",_42);if(obj!=null&&(obj.type.toLowerCase()=="checkbox"||obj.type.toLowerCase()=="radio")){obj.id=_59;obj.value=_4d["stValue"];if(_4b.length>0){for(var k=0;k<_4b.length;k++){if(_4b[k]==obj.value){obj.checked=true;break;}}}}obj=getElementByName(_58,"div","display");if(obj==null){obj=getElementByName(_58,"span","display");if(obj==null){obj=getElementByName(_58,"a","display");if(obj==null){obj=getElementByName(_58,"label","display");}}}if(obj!=null){var tag=obj.tagName.toLowerCase();if(tag=="label"){try{obj.htmlFor=_59;}catch(e){}}obj.innerHTML=_4d["stKey"];}}}}if(_4a.tagName.toLowerCase()=="input"&&_4a.type.toLowerCase()=="radio"){}}else{if(_4a.tagName.toLowerCase()=="input"||_4a.tagName.toLowerCase()=="textarea"){_4a.value=_49;}if(_4a.tagName.toLowerCase()=="input"&&_4a.type.toLowerCase()=="checkbox"){_4a.value=true;if(_4a.value=="true"&&_49==true){_4a.checked=true;}else{_4a.checked=false;}}}}else{this.error(""+id+" has no child node named "+_42);}}}this.log("Build Form Inputs");};this.build=function(_5b,_5c){if(typeof _5b=="undefined"||_5b==null||_5b.size()<=0){this.log("Error: cannot build form - arrFormData is invalid or empty");if(typeof _5c=="undefined"||_5c==null||_5c){if(typeof HS_Form_Finalize!="undefined"&&HS_Form_Finalize!=null){HS_Form_Finalize(null);}}return;}_d=_5b;if(typeof HS_Form_PreProcess!="undefined"&&HS_Form_PreProcess!=null){HS_Form_PreProcess(_d);}var _5d=_d["ecFormErrorValue"];if(typeof _5d!="undefined"&&_5d!=null&&_5d>0){this.reportError(id+"::"+_5d);}var _5e=_d["ecProcessErrorValue"];if(typeof _5e!="undefined"&&_5e!=null&&_5e>0){this.reportError(id+"::"+_5e);}try{this.buildOutputs();this.buildInputs();}catch(e){}if(typeof _5c=="undefined"||_5c==null||_5c){HS_Form_Finalize(_d);}};this.submit=function(_5f){if(_b==null){this.log("Error: cannot submit form - form object is null");return false;}if(_10){this.log("Error: cannot submit form - form has already been submitted");return false;}if(typeof _5f=="undefined"||_5f==null||!_5f){if(this.getFormID().length<=0){this.log("Error: cannot submit form - no valid formid");return false;}}if(_9.length<=0){this.log("Error: cannot submit form - no target form service");return false;}_10=true;var obj=document.createElement("input");obj.type="hidden";obj.name="formid";obj.value=this.getFormID();_b.appendChild(obj);for(var i=0;i<_e.length;i++){var _62=_e[i];if(_62[0].trim().length>0){obj=document.createElement("input");obj.type="hidden";obj.name=_62[0];obj.value=_62[1];_b.appendChild(obj);}}_b.method="post";_b.action=_9;var _63=true;if(_11!=null){_63=_11();}if(_63){_b.submit();}else{this.log("Error: cannot submit form - onsubmit handler returned false");return;}this.log("Submit Form: "+this.getFormID());};this.submitDirect=function(_64,_65){if(_b==null){return false;}if(_9.length<=0){return false;}_10=true;var _66=(_e==null)?[]:_e;_66.push(["formid",this.getFormID()]);_66.push(["response","direct"]);for(var i=0;i<_66.length;i++){var f=_66[i];if(f[0].trim().length>0){obj=this.getField(f[0]);if(obj==null){obj=document.createElement("input");obj.name=f[0];obj.type="hidden";_b.appendChild(obj);}obj.value=f[1];}}_b.action=_9;var _69=true;if(_11!=null){_69=_11();}if(_69){_XMLHTTP.post(_b,_64,_65);}return true;};this.getFormID=function(){if(_d==null){return "";}var _6a=_d["stFormid"];if(typeof _6a=="undefined"||_6a==null){_6a="";}return _6a;};this.getForm=function(){return _b;};this.updateField=function(_6b,_6c){var _6d=this.getField(_6b);if(_6d!=null){_6d.value=_6c;}};this.getFieldValue=function(_6e){var _6f=this.getField(_6e);if(_6f!=null){return _6f.value;}return null;};this.getField=function(_70){if(_b==null){this.log("Error: cannot get field - form does not exist");return null;}var _71=getElementByName(_b,"input",_70)||getElementByName(_b,"select",_70)||getElementByName(_b,"textarea",_70);return _71;};};HS_Form.prototype.toString=function(){this.baseToString=HS_Object.prototype.toString;return this.baseToString();};function HS_Form_DataService_Callback(_72,_73){if(typeof _73=="undefined"||_73.length<=0){return;}_72=_72.replace("\r\n"," ");var _74=HS_ExtractArrayByName("arrFormData",_72.trim());if(_74!=null){_74=HS_FormatServiceData(_74,null,true,true);}if($$(_73)){_73.build(_74);}}function HS_Form_DisplayHandler_Currency(cy){return cy.toString();}function HS_Form_DisplayHandler_Date(da){return da.toString();}function HS_Form_DisplayHandler_Time(tm){return tm.toString();}function HS_Form_DisplayHandler_DateTime(dt){return dt.toString();}function HS_Form_PreProcess(_79){}function HS_Form_Finalize(_7a){}function HS_Form_SubmitDirectSuccessful(_7b,_7c){if(!_7b){return false;}var _7d=false;try{if(_7c&&_7c.length>0){var _7e=_7b.getForward("forward_success");if(_7e){eval(_7c);if(eval("typeof "+_7e+" != \"undefined\"")){_7d=true;}}}else{_7d=true;}}catch(ex){}return _7d;}
	function HS_ExtractArrayByName(arrayName, strBuffer) {
	    eval(strBuffer);
	
	    if (eval ('typeof ' + arrayName + ' != \'undefined\'')) {
	        eval('var newArray = ' + arrayName + ';');
	        return newArray;
	    } else {
	        return null;
	    }
	}
	
		var _errorEditMail={name:"edit-email-form",data:{"General Error":"A general error has occurred.  Please try again.","email::257":"Please enter the new Email Address.","email::258":"Your email address must include an \"@\" sign, must be a valid domain name and cannot contain spaces.","email::513":"Invalid email. Please try again.","email::514":"Invalid email. Please try again.","retypeNewEmail::257":"Please retype your New Email Address.","retypeNewEmail::258":"Re-type of the email must include an \"@\" sign, must be a valid domain name and cannot contain spaces.","retypeNewEmail::513":"Re-type of the the email is invalid. Please try again.","retypeNewEmail::514":"Re-type of the the email is invalid. Please try again.","2049":"The Email addresses entered do not match. Please re-enter both Email Addresses.","4097":"Email Address entered is already in use by another account. Please enter a unique email address."}};
	hs.error={data:{},displayArea:null,messageArea:null,messageTemplate:null,delimiter:"::",fieldLabelPostfix:"_label",showFieldErrors:false,color:"red",generalErrorName:"General Error",generalErrorsShown:[],permanentErrors:[],initialize:function(_1,_2,_3){if(typeof _1!="undefined"&&_1!=null){hs.error.displayArea=_1;}if(typeof _2!="undefined"&&_2!=null){hs.error.messageArea=_2;}if(typeof _3!="undefined"&&_3!=null){hs.error.messageTemplate=_3;}var _4=["_errorActivateTrader","_errorAddAccount","_errorAddGiveUpCode","_errorAddTrader","_errorAdminLogin","_errorAffirmBlockTrade","_errorCancelBlockTrade","_errorCancelOrder","_errorChangePassword","_errorDeactivateAccount","_errorDeactivateTrader","_errorDeleteGiveUpCode","_errorDeleteWatchlist","_errorEditAccount","_errorEditMail","_errorEditProfile","_errorEditTrader","_errorEditUser","_errorFundsTransfer","_errorLogin","_errorLogout","_errorManageUserPreferences","_errorManageUserRole","_errorModifyOrder","_errorPlaceBlockTrade","_errorPlaceOrder","_errorPreselectAccount","_errorPreselectAccountPermission","_errorPreselectAffirmBlockTrade","_errorPreselectModifyOrder","_errorPreselectStatusBlockTrade","_errorReassignTrader","_errorReferAFriend","_errorReviewBlockTrade","_errorReviewCancelOrder","_errorReviewModifyOrder","_errorReviewPlaceOrder","_errorRecoverPassword","_errorRecoverUserId","_errorElectronicCheck","_errorElectronicCheckReview","_errorOpenaccount","_errorDisclosures","_errorQualifyingQuestions"];var _5=0;for(var i=0;i<_4.length;i++){var _7=_4[i];var _8="typeof "+_7+" != 'undefined' && "+_7+" != null && typeof "+_7+".name != 'undefined' && "+_7+".name != null && "+_7+".name.length > 0";var _9=eval(_8);if(_9){var _a=eval(_4[i]);if(hs.error.load(_a)){_5++;}}}},load:function(_b){if(typeof _b=="undefined"||_b==null){return false;}var _c=_b.name;var _d=_b.data;if(typeof _c=="undefined"||_c==null||_c.length<=0){return false;}if(typeof _d=="undefined"||_d==null){return false;}hs.error.data[_c]=_d;return true;},search:function(_e,_f,_10){var str="";if(typeof _e=="undefined"||_e==null||_e.length<=0){return str;}if(typeof _f=="undefined"||_f==null){return str;}var _12=hs.error.data[_e];if(typeof _12=="undefined"||_12==null){return str;}var _13=_f;if(typeof _10!="undefined"&&_10!=null&&_10.length>0&&_10.toLowerCase()!=_e.toLowerCase()){_13=_10+hs.error.delimiter+_13;}str=_12[_13];if(typeof str=="undefined"||str==null||str.length<=0){str=_12[_f];}if(typeof str=="undefined"||str==null){str="";}return str;},show:function(_14,_15,_16,_17){if(hs.error.displayArea==null){return;}if(hs.error.messageArea==null){return;}if(hs.error.messageTemplate==null){return;}var str=hs.error.search(_14,_15,_16);if(str.length<=0){_Logger.log("ERROR: cannot find error message ("+_14+", "+_15+", "+_16+")","hs.error");hs.error.showDirect("Error "+_15+" has occurred.  Please call/email customer service at 1-877-TO-HEDGE");return;}if(typeof _16!="undefined"&&_16!=null&&_16.length>0){var _19=_16+hs.error.fieldLabelPostfix;var _1a=null;if(typeof _17!="undefined"&&_17!=null){try{_1a=getElementByName(_17,"div",_19);if(_1a==null){_1a=getElementByName(_17,"span",_19);}if(_1a==null){_1a=getElementByName(_17,"a",_19);}if(_1a==null){_1a=getElementByName(_17,"label",_19);}if(_1a==null){_1a=getElementByName(_17,"td",_19);}}catch(e){}}if(_1a==null){_1a=$(_19);}if(_1a!=null){_1a.style.color=hs.error.color;}if(!hs.error.showFieldErrors){for(var i=0;i<hs.error.generalErrorsShown.length;i++){if(hs.error.generalErrorsShown[i]==_14){return;}}var _1c=hs.error.search(_14,hs.error.generalErrorName);str=_1c;hs.error.generalErrorsShown.push(_14);}}hs.error.showDirect(str);},showDirect:function(str,_1e){if(typeof str=="undefined"||str==null||str.length<=0){return;}if(hs.error.displayArea==null){return;}if(hs.error.messageArea==null){return;}if(hs.error.messageTemplate==null){return;}var _1f=_1e;if($$(_1f)&&_1f){for(var i=0;i<hs.error.permanentErrors.length;i++){if(str==hs.error.permanentErrors[i]){return;}}hs.error.permanentErrors.push(str);}var obj=hs.error.messageTemplate.cloneNode(true);if(obj!=null){hs.error.messageArea.appendChild(obj);obj.innerHTML=str;hs.error.displayArea.style.display="block";}},hide:function(_22){hs.error.generalErrorsShown=[];var _23=_22;if($$(_23)&&_23){hs.error.permanentErrors=[];}if(hs.error.permanentErrors.length>0){if(hs.error.messageArea!=null){var _24=[];for(var j=0;j<hs.error.messageArea.childNodes.length;j++){var _26=hs.error.messageArea.childNodes[j];var _27=false;for(var i=0;i<hs.error.permanentErrors.length;i++){var str=hs.error.permanentErrors[i];if(_26.innerHTML==str){_27=true;break;}}if(!_27){_24.push(_26);}}for(var i=0;i<_24.length;i++){hs.error.messageArea.removeChild(_24[i]);}}}else{if(hs.error.messageArea!=null){hs.error.messageArea.innerHTML="";}if(hs.error.displayArea!=null){hs.error.displayArea.style.display="none";}}},bufferfn:function(){}};
	function onEnter(_1,_2){var _3=(document.layers)?true:false;var _4=0;if(_3){_4=_1.which;}else{_4=_1.keyCode;}if(_4==13){_2.submit();}}function onFormEnter(_5){var _6=(document.layers)?true:false;var _7=0;if(_6){_7=_5.which;}else{_7=_5.keyCode;}if(_7==13){HS_Submit();}}
	function HS_SetContentFooter(_1){var id="hsidContentFooter";HS_ReplaceInnerHTML(id,_1);}function HS_SetContentStatus(_3,_4){var id="hsidContentEmpty";if(_3){HS_ReplaceInnerHTML(id,"");HS_HideElementById(id);}else{HS_ReplaceInnerHTML(id,_4);HS_ShowElementById(id,"inline");}}function HS_GetTimeDelayFooter(_6){var _7="";if(typeof _6!="undefined"){if(_6<=0){if(arrSession.get("ecSystemState")==HTS_SYSTEMSTATE_UNAVAILABLE){_7="delayed HedgeStreet prices";}else{_7="Real-time HedgeStreet prices";}}else{_6/=1000;if(_6>=60){_7=Math.round(_6/60)+"-minute";}else{_7=_6+"-second";}_7+=" delayed prices.";}}else{if(isUserLoggedIn){if(arrSession.get("ecSystemState")==HTS_SYSTEMSTATE_UNAVAILABLE){_7="delayed HedgeStreet prices";}else{_7="Real-time HedgeStreet prices";}}else{_7="30-minute delayed prices.";}}return _7;}function HS_WriteHedgeletTimeDelayFooter(_8){HS_WriteBodyFooter("hsidHSHedgeletTimeDelayFooter",HS_GetTimeDelayFooter(_8));}function HS_WriteHedgeletTradeFooter(){var _9="";_9="Please note that it is the Member's responsiblity to ensure that any order placed on the market has sufficient funds/contracts upon execution of such orders.  If, upon execution of any order, the member does not have adequate funds or contracts available to satisfy the transaction, an Insufficent Funds Fee will apply.";HS_WriteBodyFooter("hsidHSHedgeletTradeFooter",_9);}function HS_WriteBodyFooter(id,_b){HS_ReplaceInnerHTML(id,"<span class=\"footertext\">"+_b+"</span>");}function HS_GenerateHedgeletsSubmenu(_c){var _d=document.URL;var _e,arrSideLinks;_e=new Array();arrSideLinks=new Array(new Array("Pending and Settled Contracts","javascript:HS_PendingSettledHedgelets( false );",""));_e[0]=new Array("quotesandcharts.gif","/hedgelets/quotes/",false);_e[1]=new Array("profiletab.gif","/hedgelets/profile/",false);_e[2]=new Array("details.gif","/hedgelets/prospectus/",false);if(_d.match("/hedgelets/quotes/")){_e[0][0]="quotesandcharts_select.gif";_e[0][2]=true;}if(_d.match("/hedgelets/profile/")){_e[1][0]="profiletab_select.gif";_e[1][2]=true;}if(_d.match("/hedgelets/prospectus/")){_e[2][0]="details_select.gif";_e[2][2]=true;}return HS_GenerateSubmenu(_e,arrSideLinks,_c);}function HS_GenerateTradeSubmenu(_f){return HS_GenerateTradeSubmenu2(_f,false);}function HS_GenerateTradeSubmenu2(_10,_11){var _12=document.URL;var _13,arrSideLinks;_13=new Array();arrSideLinks=new Array(new Array("Calculator","javascript:HS_Calculator();",""));_13[0]=new Array("placeorders.gif","/trade/order/",false);_13[1]=new Array("openorder.gif","/trade/openorders/",false);_13[2]=new Array("hist.gif","/trade/history/",false);if(_12.match("/trade/order/")){_13[0][0]="placeorders_select.gif";_13[0][2]=true;}if(_12.match("/trade/openorders/")){_13[1][0]="openorder_select.gif";_13[1][2]=true;}if(_12.match("/trade/history/")){_13[2][0]="hist_select.gif";_13[2][2]=true;}return HS_GenerateSubmenu(_13,arrSideLinks,_10);}function HS_GenerateSubmenu(_14,_15,_16){var _17="";_17+="<table class=\"fillwidth\"><tr><td class=\"height5\"></td></tr><tr><td class=\"fillwidth\">";_17+="<table class=\"bgrepeatx fillwidth whitebg\" background=\""+_16+"/hedgelets_submenu/subnav_bg.gif\"><tr>";_17+="<td class=\"width15\" nowrap></td>";for(i=0;i<_14.length;i++){if(i>0){}_17+="<td class=\"alignleft padall0\" nowrap><a href=\""+_14[i][1]+"\"><img src=\""+_16+"/hedgelets_submenu/"+_14[i][0]+"\"></a></td>";}_17+="<td class=\"fillwidth alignright valignmiddle\">";for(i=0;i<_15.length;i++){var _18=_15[i];if(i>0){_17+="&nbsp;&nbsp;&nbsp;";}if(_18!=null&&_18.length>2){_17+="<a class=\"linkBold\" href=\""+_18[1]+"\"";if(_18[2]!=""){_17+=" target=\""+_18[2]+"\"";}_17+=">"+_18[0]+"</a>";}}_17+="</td>";_17+="<td class=\"width10\" nowrap></td>";_17+="</tr></table>";_17+="</td></tr></table>";return _17;}function HS_GenerateRetailTradeSubheader(_19,_1a,_1b){var _1c;_1c="";_1c+="<table><tr>";_1c+="<td class=\"valigntop\"><span class=titleBold>"+_19+"</span>";_1c+="<span class=title>"+_1a+"</span></td>&nbsp;&nbsp;";_1c+="<td class=\"valignmiddle\">";if(_1b){_1c+="<a href=\"/trade/preferences/\">Order Preferences</a>";}_1c+="</td>";_1c+="</tr></table>";return _1c;}function HS_GenerateTradeSubheader(_1d,_1e,_1f){var _20;_20="";_20+="<table><tr>";_20+="<td class=\"valigntop\"><h1>"+_1d+"</h1></td>";_20+="<td class=\"valignmiddle\">";if(_1e){if(_1f){_20+="<a href=\"/trade/preferences/\">Order Preferences</a>";}else{_20+="<a href=\"/i/trading/preferences/\">Order Preferences</a>";}}_20+="</td>";_20+="</tr></table>";return _20;}function HS_WriteBoxedContent(id,_22,_23,_24,_25){HS_WriteBoxedContent2(id,_22,_23,"left",_24,_25);}function HS_WriteBoxedContent2(id,_27,_28,_29,_2a,_2b){HS_ReplaceInnerHTML(id,HS_GenerateBoxedContent2(_27,_28,_29,_2a,_2b));}function HS_GenerateBoxedContent(_2c,_2d,_2e,_2f){return HS_GenerateBoxedContent2(_2c,_2d,"left",_2e,_2f);}function HS_GenerateBoxedContent2(_30,_31,_32,_33,_34){return HS_GenerateBoxedContent3(_30,_31,_32,new Array(5,5,5,5),_33,_34,new Array(5,5,5,5));}function HS_GenerateBoxedContent3(_35,_36,_37,_38,_39,_3a,_3b){return HS_GenerateBoxedContent4(_35,_36,_37,_38,_39,_3a,"left",_3b,true);}function HS_GenerateBoxedContent4(_3c,_3d,_3e,_3f,_40,_41,_42,_43,_44){var _45,rowColor="",Contentcolor="";var _46="toptextsmall ";var _47="";if(_3c=="#006600"){rowColor="greenbg";}if(_44){_46=_46+"silverborder ";_47=_47+"silverborder ";}if(_3e=="left"){_46=_46+"alignleft "+"valigncenter "+"padall5";}else{_46=_46+"valigncenter "+"padall5";}if(_42=="center"){_47=_47+"aligncenter "+"valigncenter "+"padall5";}else{_47=_47+"valigncenter "+"padall5";}if(_40==""){Contentcolor="greybg";}_45=""+"<table class=\"fillwidth\">\n"+"<tr class=\""+rowColor+"\">\n"+"  <td class=\""+_46+"\">\n"+"    "+_3d+"\n"+"  </td>\n"+"</tr>\n"+"<tr class=\""+Contentcolor+"\">\n"+"  <td class=\""+_47+"\">\n"+"    "+_41+"\n"+"  </td>\n"+"</tr>\n"+"</table>\n";return _45;}function HS_GenerateRightRail(_48,_49){var _4a,strOutput;strOutput="";for(i=0;i<_49.length;i++){strOutput+="<li><a href=\""+_49[i][1]+"\">"+_49[i][0]+"</a></li>";}return HS_GenerateBoxedContent("#006600",_48,"",strOutput);}function HS_DropdownOpen(id,_4c){var _4d;_4d="<select class=\"valignmiddle dropdown\" ";if(id!=""){_4d+=" id=\""+id+"\"";}if(_4c!=""){_4d+=" onchange=\""+_4c+"\"";}_4d+=">";return (_4d);}function HS_DropdownAddOption(_4e,_4f,_50){var _51;_51="<option value=\""+_4e+"\"";if(_50){_51+=" selected";}_51+=">"+_4f+"</option>";return (_51);}function HS_DropdownClose(){return ("</select>");}function HS_Generate_FAQ(_52,_53){var _54="<table>";var _55="";for(var i=0;i<_52.length;i++){_55=_52[i][1]+"/"+_52[i][2]+"#"+_52[i][3];_54+="<tr><td style=\"padding-right:2px;\" valign=top><a href=\"javascript:PopUpWindow('"+_55+"');\"><img src=\"/images/arrow_yellow_sm.gif\" alt=\"\" /></a> </td><td style=\"padding-left:2px;\" valign=top> <a href=\"javascript:PopUpWindow('"+_55+"');\">"+_52[i][0]+"</a></td></tr>";}_54+="</table>";HS_ReplaceInnerHTML("hsidRightRailFaqDetails",_54);HS_ReplaceInnerHTML("hsidRightRailFaqHeader",_53);}
		function HS_OnPageLoad(){var _1=new Array();_1.push(new Array("How do I know that my personal information is safe?","/help","securityprivacy.html","datasafe"));_1.push(new Array("How do I know that my information is kept private?","/help","securityprivacy.html","infoprivate"));HS_Generate_FAQ(_1,"FAQ's");Run_EditMail();}var _editmail=null;function Run_EditMail(){_editmail=new HS_Form("_editmail","hsidEditEmailForm","/hedgelet/service/edit-email-form",HS_ValidateForm);_editmail.setForward("forward_success","/account/editmailconfirm.html");_editmail.setForward("forward_fail","/account/editmail.html");_editmail.setForward("forward_authenticationFail","/login/login.html");_editmail.setForward("forward_authorizationFail","/login/login.html");_editmail.setForward("forward_secureAccessFail","/login/login.html");_editmail.setForward("forward_backendFail","/login/login.html");_editmail.setForward("forward_formSequenceFail","/account/editmail.html");_editmail.setForward("forward_formIDInvalid","/account/editmail.html");_editmail.run();HS_InitError();}function HS_Form_Finalize(_2){var _3=_editmail.getDisplayData("stUserCurrentEmail");if(typeof _3!="undefined"&&_3!=null&&_3.length>0){setInnerHTML("hsidUserCurrentEmailTag",_3);}var _4=_editmail.getErrors();if(_4.length>0){_editmail.clearErrors();for(var i=0;i<_4.length;i++){arr=_4[i].split("::");hs.error.show("edit-email-form",arr[1],arr[0],_editmail);}}}function HS_Submit(){_editmail.submit();}function HS_ValidateForm(){return true;}function HS_InitError(){var _6=$("hsidErrorDialog");var _7=null;if(_6!=null){_7=HS_GetElementByID("hsidErrorContent");}var _8=document.createElement("div");_8.className="errortext";hs.error.initialize(_6,_7,_8);hs.error.showFieldErrors=true;hs.error.color="#cc0000";}
	

