

            
            function HS_Goto(_1){try{if(typeof (window.opener)!="undefined"&&window.opener!=null){var _2=window.self;while(_2!="undefined"&&_2!=null){_2=_2.opener;if(typeof (_2.opener)=="undefined"||_2.opener==null){_2.location.href=_1;_2.focus();break;}}}else{window.location.href=_1;}}catch(e){}}
            var arrPartnerSpecificInfo=new Array();arrPartnerSpecificInfo["881797059"]={tooltip:"CBOE",url:"http://www.cboe.com",disclosure:null,pdfFile:null,confirmText:null};arrPartnerSpecificInfo["839781129"]={tooltip:"Enercast",url:"http://www.enercast.com",disclosure:null,pdfFile:null,confirmText:null};arrPartnerSpecificInfo["2060265081"]={tooltip:"Whisper Number",url:"http://www.whispernumber.com",disclosure:null,pdfFile:null,confirmText:null};arrPartnerSpecificInfo["116387757"]={tooltip:"MarketZar",url:"http://www.marketzar.com",disclosure:null,pdfFile:null,confirmText:null};arrPartnerSpecificInfo["928811206"]={tooltip:"Dorman Trading",url:"http://www.dormantrading.com",disclosure:null,pdfFile:null,confirmText:null};arrPartnerSpecificInfo["1593780480"]={tooltip:"Zaner",url:"",disclosure:"referral-disclosure.html",pdfFile:"referral_disclosure.pdf",confirmText:null};arrPartnerSpecificInfo["289701659"]={tooltip:"Future Path",url:"http://www.futurepathtrading.com",disclosure:null,pdfFile:null,confirmText:null};arrPartnerSpecificInfo["818269270"]={tooltip:"Photon Trader",url:"",disclosure:"referral-disclosure.html",pdfFile:"referral_disclosure.pdf",confirmText:"transfer-confirm-text.html"};
            var gConfigHeader={image:null};gConfigHeader.image=({mainLogo:{url:"/images/mainheader/mocktrader_logo.gif",alt:"HedgeStreet",width:252,height:50,onclick:"try{HS_ReturnToHedgeStreet();}catch(ex){location.href = '/';}"},tagline1:{url:"/images/mainheader/mocktrader_tagline.gif",alt:"",width:261,height:50,onclick:null},tagline2:{url:"/images/mainheader/mocktrader_tagline.gif",alt:"",width:261,height:50,onclick:null}});
            function RunHeader(){var _1=$("hsidHSHeaderTop");try{UpdateCurrentPromo();var _2=window.location.pathname.toLowerCase();if(_2=="/"||_2=="/index.html"){HS_GetDetailAndRedirect();}if(_2=="/hedgelets/contract/yesno/index.html"||_2=="/hedgelets/contract/yesno/"){HS_RedirectToSelectedDetails(_2);}HS_SetHeaderImage("hedgestreet");HS_HeaderDisplayCurrentTime(_1);var _3=HS_GetElementByID("dataCol");if(_3!=null){var _4=new Array();var _5="";var _6="none";var _7=document.getElementById("accessStatus");if(isUserLoggedIn){HS_SetCookie(HS_COOKIE_STATE,USER_STATE_MEMBER,HS_USER_STATE);if(arrSession.get("ecAcctRole")==HS_ACCOUNTTYPE_COMPLIANCE){_4.push("<a href=\"/compliance/\">Surveillance</a>");_5="<a class='hsclassMenu' href='/compliance/'>Surveillance</a>";_6="";}_4.push("<a href=\"javascript:PopUpHelp2();\">Help</a>");_4.push("<a id=\"hsidLogoutButtonID\" href=\"javascript:HS_Logout();\">Logout</a>");if(_7!=null){_7.innerHTML="| <a href=\"#\" onclick=\"javascript:HS_Logout();\" >Logout</a>";}}else{var _8="";if(location.port.length>0&&location.port!="80"){_8=":"+location.port;}_8="https://"+location.hostname+_8;_4.push("<a href=\"javascript:PopUpHelp2();\">Help</a>");_4.push("<a href=\""+_8+"/login/login.html\" style=\"font-weight:bold\">LOGIN</a>");if(_7!=null){_7.innerHTML="| <a href='#' onclick=\"javascript:RedirectToPromoOrUrl('/login/login.html');\">Login</a>";}}var _9=document.getElementById("hsidSurveillance");if(_9!=null){_9.innerHTML=_5;}var _a=document.getElementById("hsidSurveillanceDivider");if(_a!=null){_a.style.display=_6;}var _b="";for(var i=0;i<_4.length;i++){var _d=_4[i];_b+=" | "+_d;}}var _e=HS_GetElementByID("hsidHSHeaderNav2");if(_e!=null){_e.style.display="block";var _f=$("hsidMainMenuContent");var _10=$("hsidMainMenuRight");HS_BuildMenu();HS_InitMMCancelAllOrders();HS_InitOpenAccountButton();}if(arrSession.get("ecSystemState")!=HTS_SYSTEMSTATE_AVAILABLE){HS_CheckURL(arrSession.get("ecSystemState"),arrSession.get("isUserLoggedIn"));}}catch(e){}_1.style.display="block";}function HS_HeaderDisplayCurrentTime(){var _11;try{arrCurrTime=new Array("",arrSession.get("dtCurrentTime"));_11=HS_GenerateDateTimeHeader(arrCurrTime[1]);}catch(e){_11="&nbsp;";}var obj=HS_GetElementByID("hsidHeaderDateTime");if(obj!=null){obj.innerHTML=_11;if(arrSession.get("stHeaderBgColor")!="#FFFFFF"){obj.style.background=arrSession.get("stHeaderBgColor");}}}function HS_GetDetailAndRedirect(){var _13=escape(HS_GetQueryString("market"));var _14=escape(HS_GetQueryString("futuresmarket"));var _15=escape(HS_GetQueryString("hedgeletid"));var _16=escape(HS_GetQueryString("futureshedgeletid"));var _17=escape(HS_GetQueryString("hedgeletpath"));var _18=escape(HS_GetQueryString("futureshedgeletpath"));var _19=HS_GetQueryString("targetpage");if($$s(_17)){HS_SetCookie(HS_COOKIE_HEDGELET,unescape(_17),HS_HEDGELET_HEDGELETPATH);location.replace("/hedgelets/YesNo/quotedetail.html");}else{if($$s(_15)){HS_SetCookie(HS_COOKIE_HEDGELET,unescape(_15),HS_HEDGELET_HEDGELETID);location.replace("/hedgelets/YesNo/quotedetail.html");}else{if($$s(_19)){location.replace(unescape(_19));}}}}function HS_RedirectToSelectedDetails(_1a){var _1b=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_ASSETPATH);var _1c=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_HEDGELETTYPE);location.href="/hedgelets/contract/YesNo/"+_1b.substring(_1b.indexOf("[")+1,_1b.indexOf("]"))+".html";}function HS_RunQS(){HS_InitializeRuntime(false,true);var obj=$("hsidQuoteInput");if(obj!=null){obj.onkeydown=new Function("HS_InitializeQS( this );");}}function HS_BuildMenu(){try{var _1e=HS_GetElementByID("hsidMainMenuContent");if(window.HS_CustomizeMenu!=null){HS_CustomizeMenu();}var _1f=RegisterMainMenu([["hsidMainMenuTab1","hsidMainMenuTab1SubMenu"],["hsidMainMenuTab3","hsidMainMenuTab3SubMenu"],["hsidMainMenuTab5","hsidMainMenuTab5SubMenu"],["hsidMainMenuTab6","hsidMainMenuTab6SubMenu"],]);if(_1f!=null){gMainMenuData["hsidMainMenuTab3"].show();if(isUserLoggedIn){gMainMenuData["hsidMainMenuTab5"].show();}else{gMainMenuData["hsidMainMenuTab6"].show();}try{HS_SelectMenu(_1f);}catch(e){}}if(_1e!=null){_1e.style.display="block";}}catch(e){}}function HS_InitMMCancelAllOrders(){var _20=document.getElementById("hsidMMCancelAllButton");if(_20){if(isUserLoggedIn&&gSessionState.get("ecAcctRole")==ACCOUNT_ROLE_MARKET_MAKER){_20.style.display="block";if(!window.HS_Object){HS_LoadJS("/js/HS_Object.js","",false);}if(!window.HS_XMLHTTP){HS_LoadJS("/js/HS_XMLHTTP.js","",false);}if(!window.HS_ExtractArrayByName){HS_LoadJS("/js/utils_obfuscator.js","",false);}if(!window.HS_Form){HS_LoadJS("/js/HS_Form.js","",false);}}else{_20.style.display="none";}}}function HS_InitOpenAccountButton(){var _21=document.getElementById("openAccountButton");if(_21){if(!isUserLoggedIn){_21.style.display="block";}else{_21.style.display="none";}}}var gMMCancelAllForm=null;function HS_MMCancelAllOrders(){window.HS_Form_FinalizeOld=window.HS_Form_Finalize;window.HS_Form_Finalize=HS_Form_Finalize_MMCancelAllOrders;var _22=window.location.href;gMMCancelAllForm=new HS_Form("gMMCancelAllForm","hsidMMCancelAllOrdersForm","/hedgelet/service/cancel-orders-form");gMMCancelAllForm.setForward("forward_success","/trade/openorders/cancelorder.html");gMMCancelAllForm.setForward("forward_fail",_22);gMMCancelAllForm.setForward("forward_authenticationFail","/login/login.html");gMMCancelAllForm.setForward("forward_authorizationFail","/login/login.html");gMMCancelAllForm.setForward("forward_secureAccessFail","/login/login.html");gMMCancelAllForm.setForward("forward_backendFail",_22);gMMCancelAllForm.setForward("forward_formSequenceFail",_22);gMMCancelAllForm.setForward("forward_formIDInvalid",_22);gMMCancelAllForm.run();}function HS_Form_Finalize_MMCancelAllOrders(_23){window.HS_Form_Finalize=window.HS_Form_FinalizeOld;gMMCancelAllForm.updateField("cancelActionItem","All");gMMCancelAllForm.submit();}function setBinaryOptions(){HS_SetCookie(HS_COOKIE_BINARY_OR_FUTURES,"",HS_COOKIE_BINARY_OR_FUTURES_SELECTION);window.location="/trade/active-trader.html";return true;}
            function HS_Object(_1){this.name="";if(arguments.length>0){this.init(_1);}this.className="HS_Object";}HS_Object.prototype.init=function(_2){if(typeof _2!="undefined"){this.name=_2;}};HS_Object.prototype.toString=function(){var _3=this.className;if(this.name.length>0){_3+=" ("+this.name+")";}return _3;};HS_Object.prototype.log=function(_4){_Logger.log(_4,this);};HS_Object.prototype.error=function(_5){_Logger.error(_5,this);};
            var XMLHTTPREQUEST_TIMEOUT=-1;HS_XMLHTTP.prototype=new HS_Object();HS_XMLHTTP.prototype.constructor=HS_XMLHTTP;function HS_XMLHTTP(_1){if(arguments.length>0){this.init(_1);}this.className="HS_XMLHTTP";}HS_XMLHTTP.prototype.init=function(_2){this.baseInit=HS_Object.prototype.init;this.baseInit(_2);var _3=(typeof _2=="undefined"||_2==null)?null:_2;this.requests={};this.XMLHTTP=function(){var _4=null;try{_4=new XMLHttpRequest();}catch(e){try{_4=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{_4=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){_4=null;}}}return _4;};this.getCaller=function(_5){var _6=arguments.callee.caller;if(_5){for(var i=0;i<_5;i++){_6=_6.caller;}}var _8="";while(true){if(!_6){break;}_8+=this.getFName(_6.toString())+"|";_6=_6.caller;}return _8.substring(0,_8.length-1);};this.getFName=function(s){var i=s.indexOf("function");if(i<0){return s.substring(0,40);}var j=s.indexOf("(");if(j<0){return s.substring(11,50);}var _c=s.substring(i+8,j);if(_c.trim()==""){return s.substring(11,50);}return _c;};this.request=function(_d,_e,_f,_10){this.get(_d,_e,_f,_10);};this.get=function(_11,_12,_13,_14){this.send("GET",_11,null,_12,_13,_14);};this.post=function(_15,_16,_17,_18){this.send("POST",_15.action,HS_XMLHTTP.serializeForm(_15),_16,_17,_18);};this.send=function(_19,_1a,_1b,_1c,_1d,_1e){_19=_19.trim().toUpperCase();if(_19!="GET"&&_19!="POST"){return;}_1a=_1a.trim();if(_1a.length<=0){return;}if(typeof _1c!="undefined"&&_1c!=null){var _1f=null;for(var key in this.requests){var _21=null;try{_21=this.requests[key].handler;}catch(e){_21=null;}if(_21==_1c){_1f=key;break;}}if(_1f!=null){this.endRequest(_1f);}}var _22=this.XMLHTTP();if(_22==null){return;}var _23=new Date();var id=Math.floor(Math.random()*_23.getTime()*1000);var _25=new HS_XMLHTTPRequest(id,_22,_1a,_1c,_1d);if(_19=="GET"){if(_1a.indexOf("?")>=0){_1a+="&";}else{_1a+="?";}_1a+="xmlhttpid="+id;if(_1a.indexOf("out=")<0){_1a+="&testStr="+escape(this.getCaller(3));}}else{if(_1b==null){_1b="";}if(_1b.length>0){_1b+="&";}_1b+="xmlhttpid="+id;}try{_22.open(_19,_1a,true);if(_3!=null){_22.onreadystatechange=function(){if(typeof _XMLHTTP!="undefined"){eval(_3+".processResponse( "+id+" );");}};}else{_22.onreadystatechange=null;}if(_19=="POST"){_22.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}_22.send(_1b);this.requests[id]=_25;if(XMLHTTPREQUEST_TIMEOUT>0){_25.timeout=setTimeout(this.name+".timeoutRequest( "+id+" );",XMLHTTPREQUEST_TIMEOUT);}}catch(e){_22=null;_25=null;}if(_22!=null){HS_UIWait();if(typeof _1e=="undefined"||_1e==null||_1e){HS_SetSessionTimeout();}}};this.timeoutRequest=function(id){this.endRequest(id);};this.endRequest=function(id){var _28=this.requests[id];if(typeof _28=="undefined"||_28==null){return;}this.requests[id]=null;try{if(!_28.completed){_28.xmlhttp.abort();clearTimeout(_28.timeout);}}catch(e){}HS_UIResume();};this.processResponse=function(id){var _2a=this.requests[id];if(_2a==null){return;}if(_2a.xmlhttp!=null){var _2b=_2a.xmlhttp.readyState;if(_2b==4){clearTimeout(_2a.timeout);_2a.completed=true;if(_2a.handler!=null){var _2c="";try{var _2d=_2a.xmlhttp.status;if(_2d==200){_2c=_2a.xmlhttp.responseText;var _2e=_2a.xmlhttp.getResponseHeader("Content-Type").toLowerCase();if(_2e.indexOf("text/html")==-1&&_2e!="text/plain"&&_2e!="text/xml"){var _2f=_2c.toLowerCase().indexOf("var");var _30=_2c.lastIndexOf(";");if(_2f>0||_30<_2c.length-1){_2c=_2c.substring(_2f,_30+1);}}}else{if(_2d==302){_2c=_2a.xmlhttp.responseText;}}_2a.handler(_2c,_2a.data);}catch(e){}}this.endRequest(id);}}};};HS_XMLHTTP.prototype.toString=function(){this.baseToString=HS_Object.prototype.toString;return this.baseToString();};HS_XMLHTTP.serializeForm=function(_31){var els=_31.elements;var len=els.length;var _34="";this.addField=function(_35,_36){if(_34.length>0){_34+="&";}_34+=encodeURIComponent(_35)+"="+encodeURIComponent(_36);};for(var i=0;i<len;i++){var el=els[i];if(!el.disabled){switch(el.type){case "text":case "password":case "hidden":case "textarea":this.addField(el.name,el.value);break;case "select-one":if(el.selectedIndex>=0){this.addField(el.name,el.options[el.selectedIndex].value);}break;case "select-multiple":for(var j=0;j<el.options.length;j++){if(el.options[j].selected){this.addField(el.name,el.options[j].value);}}break;case "checkbox":case "radio":if(el.checked){this.addField(el.name,el.value);}break;}}}return _34;};function HS_XMLHTTPRequest(id,_3b,_3c,_3d,_3e){if(arguments.length>0){this.init(id,_3b,_3c,_3d,_3e);}this.className="HS_XMLHTTPRequest";}HS_XMLHTTPRequest.prototype.init=function(id,_40,_41,_42,_43){this.id=id;this.xmlhttp=_40;this.url=_41;this.completed=false;this.timeout=null;this.handler=null;if(typeof _42!="undefined"){this.handler=_42;}this.data=null;if(typeof _43!="undefined"){this.data=_43;}};HS_XMLHTTPRequest.prototype.toString=function(){return this.className+" id="+this.id;};var gUIWaitRequests=0;var gUILoadingSign=null;var UIWAIT_GRACE_PERIOD=500;function HS_UIWait(){setTimeout(function(){gUIWaitRequests++;HS_UpdateUILoading();},UIWAIT_GRACE_PERIOD);}function HS_UIResume(){gUIWaitRequests--;HS_UpdateUILoading();}function HS_UpdateUILoading(){if(gUIWaitRequests>0){document.body.style.cursor="wait";}else{document.body.style.cursor="default";}}
            function HS_SetHeaderImage(_1){var _2=HS_GetElementByID("hsidHSHeaderTop");var _3=null;var _4=null;if(_2!=null){_3=HS_GetElementByID("hsidHeaderLogo");}if(_3!=null){if(_1=="hedgestreet"||_1==null){_4=HS_CreateImgElement("hsidImgHeaderLogo",gConfigHeader.image.mainLogo.url,gConfigHeader.image.mainLogo.alt,gConfigHeader.image.mainLogo.width,gConfigHeader.image.mainLogo.height,null,gConfigHeader.image.mainLogo.onclick);_4.style.display="inline";_3.appendChild(_4);var _5=null;var _6=HS_GetElementByID("hsidTagline");if(_6!=null){if(location.pathname.indexOf("/dashboard")>=0){_5="tagline2";}else{_5="tagline1";}var _7=HS_CreateImgElement("hsidImgTagline",gConfigHeader.image[_5].url,gConfigHeader.image[_5].alt,gConfigHeader.image[_5].width,gConfigHeader.image[_5].height,null,gConfigHeader.image[_5].onclick);_7.className="tagline";_7.style.display="inline";_6.appendChild(_7);}}else{_4=HS_CreateImgElement("hsidImgHeaderLogo");if(_1.indexOf(HS_DELIMITER)>=0){nTempPartnerID=_1.split(HS_DELIMITER);_1=nTempPartnerID[1];}var _8=HS_GetPartnerDetails(_1);_4.src="/partner/"+_1+"/images/logo.gif";if(_8!=null){_4.alt=_8.tooltip;_4.title=_8.tooltip;_4.onclick=new Function("location.href = \""+_8.url+"\";");}_4.style.display="inline";_4.style.cursor="pointer";_3.appendChild(_4);var _9=HS_GetElementByID("hsidPresentedBy");if(_9!=null){var _a=HS_CreateImgElement("hsidPresentedByImg","/partner/"+_1+"/images/wl_logo.gif");_9.appendChild(_a);}}}}function HS_GetPartnerDetails(_b){var _c=null;if($$(arrPartnerSpecificInfo)){var _d=arrPartnerSpecificInfo[_b];if($$(_d)){_c=_d;}}return _c;}function HS_SplitPartnerID(){var _e=HS_GetCookie("token");if(window.location.hostname==_SessionState["stTestDriveServerName"]){_e="hedgestreet";}else{if(isUserLoggedIn){_e=_SessionState["stReferrer"];HS_SetCookie("token",_e);}if(typeof _e=="undefined"||_e==null||_e.length<=0){_e="hedgestreet";HS_SetCookie("token",_e);}else{if(_e.indexOf(HS_DELIMITER)>=0){_e=_e.split(HS_DELIMITER);_e=_e[1];}}}return _e;}
            
            
