



	var HS_ORDER_TYPE_BUY=1;var HS_ORDER_TYPE_SELL=2;var HS_ORDER_TYPE_SUBSCRIBE=4;var HS_ORDER_TYPE_REDEEM=8;var HS_ORDER_TYPE_BLOCKTRADEBUY=16;var HS_ORDER_TYPE_BLOCKTRADESELL=32;var HS_TIME_FRAME_TODAY=1;var HS_TIME_FRAME_PREVIOUS=2;var HS_ACTION_PLACEORDER=1;var HS_ACTION_MODIFYORDER=2;var HS_ACTION_CANCELORDER=3;var HS_ACTION_CANCELALLORDERS=4;var HS_CASHLEDGER_ACTION_UNKNOWN=0;var HS_CASHLEDGER_ACTION_DEPOSIT=1;var HS_CASHLEDGER_ACTION_WITHDRAWAL=2;var HS_CASHLEDGER_ACTION_BOUGHT=4;var HS_CASHLEDGER_ACTION_SOLD=8;var HS_CASHLEDGER_ACTION_EXPIRED=16;var HS_CASHLEDGER_ACTION_SUBSCRIBED=32;var HS_CASHLEDGER_ACTION_REDEEMED=64;var HS_CASHLEDGER_ACTION_FEE_PAYMENT=128;var HS_CASHLEDGER_ACTION_BLOCKED=256;var HS_CASHLEDGER_ACTION_INTEREST_PAYMENT=512;var HS_CASHLEDGER_ACTION_CREDIT_ADJUSTMENT=1024;var HS_CASHLEDGER_ACTION_DEBIT_ADJUSTMENT=2048;var HS_CASHLEDGER_ACTION_BOUGHTSHORT=4096;var HS_CASHLEDGER_ACTION_SOLDSHORT=8192;var HS_CASHLEDGER_ACTION_ALL=4294967294;var HS_CASHBALANCE_AVAILABLE=1;var HS_CASHBALANCE_TRANSFERIN=2;var HS_CASHBALANCE_TRANSFEROUT=4;var HS_CASHBALANCE_ALL=7;var HS_EC_SUCCESS=1;var HS_EC_VALIDATION_ERROR=2;var HS_EC_SYSTEM_ERROR=4;var HS_EC_UNKNOWN_ERROR=8;var MOST_ACTIVES_HIGHEST_VOLUME=1;var MOST_ACTIVES_HIGHEST_OPEN_INTEREST=2;var MOST_ACTIVES_ADVANCERS_PERCENT_CHANGE=4;var MOST_ACTIVES_DECLINERS_PERCENT_CHANGE=8;var MOST_ACTIVES_HIGHEST_VOLUME_OR_OPEN_INTEREST=16;var HS_EXPIRING_TODAY=16;var HS_ALL_HEDGELETS=32;var HS_WATCHLIST_HEDGELETS=64;var HS_BLOCKTRADE_STATUS_UNKNOWN=0;var HS_BLOCKTRADE_STATUS_OPEN=1;var HS_BLOCKTRADE_STATUS_CONFIRMED=2;var HS_BLOCKTRADE_STATUS_BUY_CONFIRMED=4;var HS_BLOCKTRADE_STATUS_SELL_CONFIRMED=8;var HS_BLOCKTRADE_STATUS_BUY_VOIDED=16;var HS_BLOCKTRADE_STATUS_SELL_VOIDED=32;var HS_BLOCKTRADE_STATUS_BOTH_FAILED=64;var HS_BLOCKTRADE_STATUS_BUY_FAILED=128;var HS_BLOCKTRADE_STATUS_SELL_FAILED=256;var HS_BLOCKTRADE_STATUS_CLEARED=512;var HS_BLOCKTRADE_STATUS_BOTH_EXPIRED=1024;var HS_BLOCKTRADE_STATUS_SELL_EXPIRED=2048;var HS_BLOCKTRADE_STATUS_BUY_EXPIRED=4096;var HS_BLOCKTRADE_STATUS_CANCELED=8192;var HS_HISTORY_MAX_ENTRIES=200;var ACCOUNT_ROLE_MEMBER_ONHOLD_WARNING="Please note that your account is currently on hold. You may only enter orders to liquidate your current open positions (if any).";var ACCOUNT_ROLE_MEMBER_ONHOLD_WITH_PRIVILEGES_WARNING="Please note that your account is currently on hold. You may only deposit funds and/or enter orders to liquidate your current open positions (if any).";var HS_ACCOUNT_POSITION_CLOSE_CLICKED_CONTRACT_NOT_FOUND=0;var HS_ACCOUNT_POSITION_CLOSE_CLICKED_CONTRACT_FOUND=1;var HS_ACCOUNT_POSITION_CLOSE_CLICKED_CONTRACT_FOUND_IN_OPEN_ORDERS=2;var HS_POSITION_EXISTS_IN_OPEN_ORDERS="<b>Alert:</b>  The contract you selected to Close is currently in your Open Orders.  You may proceed to trade this contract or click <b>BACK</b> to cancel.";var HS_POSITION_DOES_NOT_EXIST="<b>Alert:</b> The contract you selected to Close no longer exists in your Positions. You may proceed to trade this contract or click <b>BACK</b> to cancel.";
	function HS_CompareHedgeletSeries_New(_1,_2){return HS_CompareAssetHedgeletSeries_New(_1,_2);}function HS_CompareHedgeletList_New(_3,_4){return HS_CompareHedgeletSeries_New(_3,_4);}function HS_CompareAssetHedgeletSeries_desc(_5,_6){var _7;if(defaultSort=="desc"){if(_5[nVolPosn]>_6[nVolPosn]){return -1;}else{if(_5[nVolPosn]<_6[nVolPosn]){return 1;}else{if(_5[nOpenPosn]>_6[nOpenPosn]){return -1;}else{if(_5[nOpenPosn]<_6[nOpenPosn]){return 1;}else{return 0;}}}}}else{if(defaultSort=="asc"){if(_5[nVolPosn]<_6[nVolPosn]){return -1;}else{if(_5[nVolPosn]>_6[nVolPosn]){return 1;}else{if(_5[nOpenPosn]<_6[nOpenPosn]){return -1;}else{if(_5[nOpenPosn]>_6[nOpenPosn]){return 1;}else{return 0;}}}}}}}function HS_CompareAssetHedgeletSeries_Hedgelet(_8,_9){var n1=nAssetName;var n2=nSortKey;var n3=nLastTradingDate;iResult=HS_CompareDate(_8[n3],_9[n3]);if(iResult!=0){return iResult;}else{if(_8[n1]<_9[n1]){return -1;}else{if(_8[n1]>_9[n1]){return 1;}else{if(_8[n2]<_9[n2]){return -1;}else{if(_8[n2]>_9[n2]){return 1;}else{return 0;}}}}}}function HS_CompareAssetHedgeletSeries_HedgeletReverse(_d,_e){var n1=nAssetName;var n2=nSortKey;var n3=nLastTradingDate;iResult=-(HS_CompareDate(_d[n3],_e[n3]));if(iResult!=0){return iResult;}else{if(_d[n1]<_e[n1]){return -1;}else{if(_d[n1]>_e[n1]){return 1;}else{if(_d[n2]<_e[n2]){return -1;}else{if(_d[n2]>_e[n2]){return 1;}else{return 0;}}}}}}function HS_CompareAssetHedgeletSeries_Sort(_12,_13){var _14;var n1;if(colClicked==MOST_ACTIVES_HIGHEST_VOLUME){n1=nVolPosn;}else{if(colClicked==MOST_ACTIVES_ADVANCERS_PERCENT_CHANGE){n1=nChangePosn;}else{if(colClicked==MOST_ACTIVES_DECLINERS_PERCENT_CHANGE){n1=nChangePosn;}else{if(colClicked==MOST_ACTIVES_HIGHEST_OPEN_INTEREST){n1=nOpenPosn;}}}}if(colClicked!=MOST_ACTIVES_DECLINERS_PERCENT_CHANGE){if(_12[n1]>_13[n1]){return -1;}else{if(_12[n1]<_13[n1]){return 1;}else{return 0;}}}else{if(_12[n1]<_13[n1]){return -1;}else{if(_12[n1]>_13[n1]){return 1;}else{return 0;}}}}function HS_CompareAssetHedgeletSeries_New_Reverse(_16,_17){var _18;_18=-(HS_CompareDate(_16[nLastTradingDate],_17[nLastTradingDate]));if(_18!=0){return _18;}else{if(_16[nSortKey]<_17[nSortKey]){return -1;}else{if(_16[nSortKey]>_17[nSortKey]){return 1;}else{if(_16[nHedgeletTypePosn]<_17[nHedgeletTypePosn]){return -1;}else{if(_16[nHedgeletTypePosn]>_17[nHedgeletTypePosn]){return 1;}else{return 0;}}}}}}function HS_CompareAssetHedgeletSeries_Latest(_19,_1a){var _1b;_1b=HS_CompareDate(_19[nLastTradingDate],_1a[nLastTradingDate]);if(_1b!=0){return _1b;}else{if(_19[nSortKey]<_1a[nSortKey]){return -1;}else{if(_19[nSortKey]>_1a[nSortKey]){return 1;}else{if(_19[nHedgeletTypePosn]<_1a[nHedgeletTypePosn]){return -1;}else{if(_19[nHedgeletTypePosn]>_1a[nHedgeletTypePosn]){return 1;}else{return 0;}}}}}}function HS_CompareMarkets_New(_1c,_1d){if(_1c["stMarketName"]<_1d["stMarketName"]){return -1;}else{if(_1c["stMarketName"]>_1d["stMarketName"]){return 1;}else{return 0;}}}function HS_CompareSubmarkets_New(_1e,_1f){if(_1e["stSubmarketName"]<_1f["stSubmarketName"]){return -1;}else{if(_1e["stSubmarketName"]>_1f["stSubmarketName"]){return 1;}else{return 0;}}}function HS_CompareAssets_New(_20,_21){if(_20["stAssetName"]<_21["stAssetName"]){return -1;}else{if(_20["stAssetName"]>_21["stAssetName"]){return 1;}else{return 0;}}}function HS_ComparePendingSettledHedgeletSeries_New(_22,_23){var _24;if(HS_IsPending(_22["ecHedgeletStatus"])&&!HS_IsPending(_23["ecHedgeletStatus"])){return -1;}else{if(!HS_IsPending(_22["ecHedgeletStatus"])&&HS_IsPending(_23["ecHedgeletStatus"])){return 1;}else{_24=HS_CompareDate(_22["daSettlementDate"],_23["daSettlementDate"]);if(_24!=0){if(HS_IsSettled(_22["ecHedgeletStatus"])){return -(_24);}else{return _24;}}else{if(_22["stAssetName"]<_23["stAssetName"]){return -1;}else{if(_22["stAssetName"]>_23["stAssetName"]){return 1;}else{if(_22["stSortKey"]<_23["stSortKey"]){return -1;}else{if(_22["stSortKey"]>_23["stSortKey"]){return 1;}else{if(_22["ecHedgeletType"]<_23["ecHedgeletType"]){return -1;}else{if(_22["ecHedgeletType"]>_23["ecHedgeletType"]){return 1;}else{return 0;}}}}}}}}}}function HS_CompareHedgeletsHedgeletSeries_New(_25,_26){var _27;var dt1=new Array(_25["daLastTradingDate"][0],_25["daLastTradingDate"][1],_25["daLastTradingDate"][2],_25["tmLastTradingDayCloseTime"][0],_25["tmLastTradingDayCloseTime"][1],_25["tmLastTradingDayCloseTime"][2],_25["tmLastTradingDayCloseTime"][3],_25["tmLastTradingDayCloseTime"][4]);var dt2=new Array(_26["daLastTradingDate"][0],_26["daLastTradingDate"][1],_26["daLastTradingDate"][2],_26["tmLastTradingDayCloseTime"][0],_26["tmLastTradingDayCloseTime"][1],_26["tmLastTradingDayCloseTime"][2],_26["tmLastTradingDayCloseTime"][3],_26["tmLastTradingDayCloseTime"][4]);_27=HS_CompareDateTime(dt1,dt2);if(_27!=0){return _27;}else{if(_25["stAssetName"]<_26["stAssetName"]){return -1;}else{if(_25["stAssetName"]>_26["stAssetName"]){return 1;}else{if(_25["stSortKey"]<_26["stSortKey"]){return -1;}else{if(_25["stSortKey"]>_26["stSortKey"]){return 1;}else{if(_25["ecHedgeletType"]<_26["ecHedgeletType"]){return -1;}else{if(_25["ecHedgeletType"]>_26["ecHedgeletType"]){return 1;}else{return 0;}}}}}}}}function HS_CompareDailyBulletin_New(_2a,_2b){var _2c;if(_2a["stMarketName"]<_2b["stMarketName"]){return -1;}else{if(_2a["stMarketName"]>_2b["stMarketName"]){return 1;}else{if(_2a["stSubmarketName"]<_2b["stSubmarketName"]){return -1;}else{if(_2a["stSubmarketName"]>_2b["stSubmarketName"]){return 1;}else{if(_2a["stAssetName"]<_2b["stAssetName"]){return -1;}else{if(_2a["stAssetName"]>_2b["stAssetName"]){return 1;}else{if(_2a["stHedgeletName"]<_2b["stHedgeletName"]){return -1;}else{if(_2a["stHedgeletName"]>_2b["stHedgeletName"]){return 1;}else{if(_2a["nHedgeletType"]<_2b["nHedgeletType"]){return -1;}else{if(_2a["nHedgeletType"]>_2b["nHedgeletType"]){return 1;}else{return 0;}}}}}}}}}}}function HS_CompareOpenOrderDetail_New(_2d,_2e){iResult=HS_CompareDate(_2d["daOrderDate"],_2e["daOrderDate"]);}function HS_CompareTransactionHistory_New(_2f,_30){iResult=-(HS_CompareDateTime(_2f["dtTransactionDateTime"],_30["dtTransactionDateTime"]));if(iResult!=0){return iResult;}else{return 0;}}function HS_CompareOrderHistory_New(_31,_32){var _33=-(HS_CompareDateTime(_31["dtTimePlaced"],_32["dtTimePlaced"]));if(_33!=0){return _33;}else{return 0;}}function HS_CompareOrderHistory_New_Suborder(_34,_35){var _36=(HS_CompareDateTime(_34["dtTimePlaced"],_35["dtTimePlaced"]));if(_36!=0){return _36;}else{return 0;}}function HS_CompareAccounts_New(_37,_38){if(_37["isStatus"]>_38["isStatus"]){return -1;}else{if(_37["isStatus"]<_38["isStatus"]){return 1;}else{if(_37["stAccountName"]<_38["stAccountName"]){return -1;}else{if(_37["stAccountName"]>_38["stAccountName"]){return 1;}else{return 0;}}}}}function HS_CompareTraders_New(_39,_3a){if(_39["isActive"]>_3a["isActive"]){return -1;}else{if(_39["isActive"]<_3a["isActive"]){return 1;}else{if(_39["stFirstName"]<_3a["stFirstName"]){return -1;}else{if(_39["stFirstName"]>_3a["stFirstName"]){return 1;}else{return 0;}}}}}function HS_CompareGiveUp_New(_3b,_3c){if(_3b["stKey"]<_3c["stKey"]){return -1;}else{if(_3b["stKey"]>_3c["stKey"]){return 1;}else{return 0;}}}function HS_CompareDay(_3d,_3e){var _3f={};_3f["01"]=1;_3f["02"]=2;_3f["03"]=3;_3f["04"]=4;_3f["05"]=5;_3f["06"]=6;_3f["07"]=7;_3f["08"]=8;_3f["09"]=9;_3f["10"]=10;_3f["11"]=11;_3f["12"]=12;_3f["13"]=13;_3f["14"]=14;_3f["15"]=15;_3f["16"]=16;_3f["17"]=17;_3f["18"]=18;_3f["19"]=19;_3f["20"]=20;_3f["21"]=21;_3f["22"]=22;_3f["23"]=23;_3f["24"]=24;_3f["25"]=25;_3f["26"]=26;_3f["27"]=27;_3f["28"]=28;_3f["29"]=29;_3f["30"]=30;_3f["31"]=31;_3f["1"]=32;_3f["2"]=33;_3f["3"]=34;_3f["4"]=35;_3f["5"]=36;_3f["6"]=37;_3f["7"]=38;_3f["8"]=39;_3f["9"]=40;var x=_3f[_3d["stKey"]];var y=_3f[_3e["stKey"]];return ((x<y)?-1:((x>y)?1:0));}function HS_CompareDepartment(_42,_43){var x=_42["stKey"].toLowerCase();var y=_43["stKey"].toLowerCase();return ((x<y)?-1:((x>y)?1:0));}function HS_CompareMonth(_46,_47){var _48={};_48["jan"]=0;_48["feb"]=1;_48["mar"]=2;_48["apr"]=3;_48["may"]=4;_48["jun"]=5;_48["jul"]=6;_48["aug"]=7;_48["sep"]=8;_48["oct"]=9;_48["nov"]=10;_48["dec"]=11;_48["1"]=12;_48["2"]=13;_48["3"]=14;_48["4"]=15;_48["5"]=16;_48["6"]=17;_48["7"]=18;_48["8"]=19;_48["9"]=20;_48["10"]=21;_48["11"]=22;_48["12"]=23;var x=_48[_46["stValue"].toLowerCase()];var y=_48[_47["stValue"].toLowerCase()];return ((x<y)?-1:((x>y)?1:0));}function HS_ComparePositions_New(_4b,_4c){var _4d;if(_4b["stHedgeletName"]<_4c["stHedgeletName"]){return -1;}else{if(_4b["stHedgeletName"]>_4c["stHedgeletName"]){return 1;}else{if(_4b["ecHedgeletType"]<_4c["ecHedgeletType"]){return -1;}else{if(_4b["ecHedgeletType"]>_4c["ecHedgeletType"]){return 1;}else{_4d=-(HS_CompareDateTime(_4b["dtPostDateTime"],_4c["dtPostDateTime"]));if(_4d!=0){return _4d;}else{return 0;}}}}}}function HS_CompareTraders(_4e,_4f){if(_4e["stFirstName"]<_4f["stFirstName"]){return -1;}else{if(_4e["stFirstName"]>_4f["stFirstName"]){return 1;}else{return 0;}}}function HS_CompareAccounts(_50,_51){if(_50["stAccountNumber"]<_51["stAccountNumber"]){return -1;}else{if(_50["stAccountNumber"]>_51["stAccountNumber"]){return 1;}else{return 0;}}}function HS_CompareOrderbookBid(_52,_53){var _54=HS_GenerateCurrencyN(_52["cyBid"]);var _55=HS_GenerateCurrencyN(_53["cyBid"]);if(_54>_55){return -1;}else{if(_54<_55){return 1;}else{return 0;}}}function HS_CompareOrderbookAsk(_56,_57){var _58=HS_GenerateCurrencyN(_56["cyAsk"]);var _59=HS_GenerateCurrencyN(_57["cyAsk"]);if(_58<_59){return -1;}else{if(_58>_59){return 1;}else{return 0;}}}function HS_CompareOrderbookPrice(_5a,_5b){if(_5a[1]>_5b[1]){return -1;}else{if(_5a[1]<_5b[1]){return 1;}else{return 0;}}}function HS_CompareTimeAndSales(_5c,_5d){var _5e;var dt1=new Array(_5c["daDate"][0],_5c["daDate"][1],_5c["daDate"][2],_5c["daTime"][0],_5c["daTime"][1],_5c["daTime"][2],_5c["daTime"][3],_5c["daTime"][4]);var dt2=new Array(_5d["daDate"][0],_5d["daDate"][1],_5d["daDate"][2],_5d["daTime"][0],_5d["daTime"][1],_5d["daTime"][2],_5d["daTime"][3],_5d["daTime"][4]);_5e=HS_CompareDateTime(dt1,dt2);return -(_5e);}function HS_CompareFCM(_61,_62){if(_61["stKey"]<_62["stKey"]){return -1;}else{if(_61["stKey"]>_62["stKey"]){return 1;}else{return 0;}}}function HS_CompareDashboardHedgelets_New(_63,_64){var _65;var dt1=new Array(_63["daLastTradingDate"][0],_63["daLastTradingDate"][1],_63["daLastTradingDate"][2],_63["tmLastTradingDayCloseTime"][0],_63["tmLastTradingDayCloseTime"][1],_63["tmLastTradingDayCloseTime"][2],_63["tmLastTradingDayCloseTime"][3],_63["tmLastTradingDayCloseTime"][4]);var dt2=new Array(_64["daLastTradingDate"][0],_64["daLastTradingDate"][1],_64["daLastTradingDate"][2],_64["tmLastTradingDayCloseTime"][0],_64["tmLastTradingDayCloseTime"][1],_64["tmLastTradingDayCloseTime"][2],_64["tmLastTradingDayCloseTime"][3],_64["tmLastTradingDayCloseTime"][4]);_65=HS_CompareDateTime(dt1,dt2);return _65;}function HS_CompareDateTime(d1,d2){var _6a=HS_CompareDate(d1,d2);if(_6a!=0){return _6a;}else{if(d1[3]<d2[3]){return -1;}else{if(d1[3]>d2[3]){return 1;}else{if(d1[4]<d2[4]){return -1;}else{if(d1[4]>d2[4]){return 1;}else{if(d1[5]<d2[5]){return -1;}else{if(d1[5]>d2[5]){return 1;}else{return 0;}}}}}}}}function HS_CompareComplianceHedgelets(_6b,_6c){var _6d=_6b.headers||_6c.headers;if(!_6d){return 0;}var _6e=_6d["ecHedgeletType"];if(_6b[_6e]==HS_HEDGELET_TYPE_BINARY&&_6c[_6e]==HS_HEDGELET_TYPE_VARIABLE){return -1;}else{if(_6c[_6e]==HS_HEDGELET_TYPE_BINARY&&_6b[_6e]==HS_HEDGELET_TYPE_VARIABLE){return 1;}else{var _6f=_6d["daLastTradingDate"];return HS_CompareDate(_6b[_6f],_6c[_6f]);}}}
	function HS_SelectOpenOrder(_1,_2,_3,_4,_5,_6,_7,_8){HS_SetCookie(HS_COOKIE_ORDER,_1,HS_ORDER_NUMBER);HS_SetCookie(HS_COOKIE_ORDER,_2,HS_ORDER_TYPE);HS_SetCookie(HS_COOKIE_ORDER,_4,HS_ORDER_PRICE);HS_SetCookie(HS_COOKIE_ORDER,_5,HS_ORDER_QUANTITY);if(typeof _8!="undefined"){HS_SetCookie(HS_COOKIE_TEMP1,_8);}HS_SelectHedgelet2(_3,_6,_7);}function HS_CheckOpenOrderSelection(_9){var _a;_a=HS_GetCookie(HS_COOKIE_ORDER,HS_ORDER_NUMBER);if(_a==null||_a==""){location.replace(_9);}_a=HS_GetCookie(HS_COOKIE_ORDER,HS_ORDER_TYPE);if(_a==null||_a==""){location.replace(_9);}_a=HS_GetCookie(HS_COOKIE_ORDER,HS_ORDER_PRICE);if(_a==null||_a==""){location.replace(_9);}_a=HS_GetCookie(HS_COOKIE_ORDER,HS_ORDER_QUANTITY);if(_a==null||_a==""){location.replace(_9);}}function HS_CheckOrderAction(_b){var _c;_c=HS_GetCookie(HS_COOKIE_ORDER,HS_ORDER_ACTION);if(_c==null||_c==""){if(_b.length>0){location.replace(_b);}else{return false;}}return true;}function HS_BasicOrderOptions(_d){var _e=HS_GetElementByID("hsidOrderType");var _f=0;if(_e!=null){HS_ClearDropDownList("hsidOrderType");HS_AddDropDownOption("hsidOrderType","","",false);var _10=HS_GetOrderType();if(_10==HS_ORDER_TYPE_BUY){HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_BUY),"buy",true);_f=1;}else{HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_BUY),"buy",false);}if(_10==HS_ORDER_TYPE_SELL){HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_SELL),"sell",true);_f=2;}else{HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_SELL),"sell",false);}try{_e.selectedIndex=_f;}catch(e){}}HS_ShowElementById("hsidOrderType");_e=HS_GetElementByID("hsidPrice");if(_e!=null){if(typeof _d=="undefined"||_d||_e.style.display=="none"){_e.value="";}_e.style.display="";}HS_HideElementById("hsidPriceDisplay");HS_ShowElementById("hsidHSTradeOrderBasicOptions");HS_HideElementById("hsidHSTradeOrderAdvancedOptions");}function HS_BasicRetailOrderOptions(_11){var _12=HS_GetElementByID("hsidOrderType");var _13=0;if(_12!=null){HS_ClearDropDownList("hsidOrderType");HS_AddDropDownOption("hsidOrderType","","",false);var _14=HS_GetOrderType();if(_14==HS_ORDER_TYPE_BUY){HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_BUY),HS_ORDER_TYPE_BUY,true);_13=1;}else{HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_BUY),HS_ORDER_TYPE_BUY,false);}if(_14==HS_ORDER_TYPE_SELL){HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_SELL),HS_ORDER_TYPE_SELL,true);_13=2;}else{HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_SELL),HS_ORDER_TYPE_SELL,false);}try{_12.selectedIndex=_13;}catch(e){}}HS_ShowElementById("hsidOrderType");_12=HS_GetElementByID("hsidPrice");if(_12!=null){if(typeof _11=="undefined"||_11||_12.style.display=="none"){_12.value="";}_12.style.display="";}HS_ShowElementById("hsidDisplayPrice");HS_HideElementById("hsidPriceDisplay");HS_ShowElementById("hsidHSTradeOrderBasicOptions");HS_HideElementById("hsidHSTradeOrderAdvancedOptions");}function HS_AdvancedOrderOptions(){var _15=HS_GetElementByID("hsidOrderType");var _16=0;if(_15!=null){HS_ClearDropDownList("hsidOrderType");HS_AddDropDownOption("hsidOrderType","","",false);var _17=HS_GetOrderType();if(_17==HS_ORDER_TYPE_SUBSCRIBE){HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_SUBSCRIBE),HS_ORDER_TYPE_SUBSCRIBE,true);_16=1;}else{HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_SUBSCRIBE),HS_ORDER_TYPE_SUBSCRIBE,false);}if(_17==HS_ORDER_TYPE_REDEEM){HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_REDEEM),HS_ORDER_TYPE_REDEEM,true);_16=2;}else{HS_AddDropDownOption("hsidOrderType",HS_GetOrderTypeString(HS_ORDER_TYPE_REDEEM),HS_ORDER_TYPE_REDEEM,false);}try{_15.selectedIndex=_16;}catch(e){}}HS_ShowElementById("hsidOrderType");_15=HS_GetElementByID("hsidDisplayPrice");if(_15!=null){_15.value="10.00";_15.style.display="none";}HS_HideElementById("hsidDisplayPrice");HS_ShowElementById("hsidPriceDisplay");HS_HideElementById("hsidHSTradeOrderBasicOptions");HS_ShowElementById("hsidHSTradeOrderAdvancedOptions");}function HS_ModifyOrder(_18,_19,_1a,_1b,_1c,_1d){HS_SetCookie(HS_COOKIE_ORDER,HS_ACTION_MODIFYORDER,HS_ORDER_ACTION);HS_SelectOpenOrder(_18,_19,_1a,_1b,_1c,_1d);}function HS_CancelOrder(_1e,_1f,_20,_21,_22){HS_SetCookie(HS_COOKIE_ORDER,HS_ACTION_CANCELORDER,HS_ORDER_ACTION);HS_SelectOpenOrder(_1e,_1f,_20,_21,_22,"/trade/openorders/cancelorder.html");}function HS_CancelAllOrders(){HS_SetCookie(HS_COOKIE_ORDER,HS_ACTION_CANCELALLORDERS,HS_ORDER_ACTION);window.location="/trade/openorders/cancelorder.html";}function HS_DisableOrderButtons(){objElement=HS_GetElementByID("hsidButtonLink1");if(objElement!=null){objElement.href="javascript:void(0)";objElement.onclick="";}objElement=HS_GetElementByID("hsidButtonLink2");if(objElement!=null){objElement.href="javascript:void(0)";objElement.onclick="";}objElement=HS_GetElementByID("hsidButtonLink3");if(objElement!=null){objElement.href="javascript:void(0)";objElement.onclick="";}}function HS_PreviewOrder(){HS_Submit();}function HS_PreviewChanges(_23){document.placeOrder.submit();}function HS_ChangeOrderDetail(_24){HS_DisableOrderButtons();HS_SetCookie(HS_COOKIE_ORDER,_24,HS_ORDER_ACTION);document.confirmorder.subAction.value="modify";document.confirmorder.submit();}function HS_ChangeOrderReview(){document.ReviewPlaceOrderForm.action="/hedgelet/service/review-modifyorder-form";document.ReviewPlaceOrderForm.submit();}function HS_CancelPlaceOrder(){HS_DisableOrderButtons();HS_ClearOrderCookies();document.confirmorder.subAction.value="cancel";document.confirmorder.submit();}function HS_CancelChangeOrder(){HS_DisableOrderButtons();HS_ClearOrderCookies();document.confirmorder.subAction.value="cancel";document.confirmorder.submit();}function HS_SubmitOrder(){HS_DisableOrderButtons();HS_SetCookie(HS_COOKIE_ORDERRECEIPT,"");elem=HS_GetElementByID("hsidAccountNumber");document.ConfirmOrderForm.submit();}function HS_AbortCancelOrder(){HS_DisableOrderButtons();HS_ClearOrderCookies();location.href="/trade/openorders/";}function HS_SubmitCancelOrder(){HS_DisableOrderButtons();HS_SetCookie(HS_COOKIE_ORDERRECEIPT,"");document.cancelorder.subAction.value="place";document.cancelorder.submit();}function HS_Trade(_25,_26,_27,_28,_29){HS_ClearOrderCookies();HS_SetCookie(HS_COOKIE_ORDER,HS_ACTION_PLACEORDER,HS_ORDER_ACTION);if(typeof _28!="undefined"){HS_SetCookie(HS_COOKIE_ORDER,_28,HS_ORDER_TYPE);}if(typeof _26!="undefined"){HS_SetCookie(HS_COOKIE_ORDER,_26,HS_ORDER_PRICE);}if(typeof _27!="undefined"){HS_SetCookie(HS_COOKIE_ORDER,_27,HS_ORDER_QUANTITY);}if(_29!="undefined"){if(_29==HS_HEDGELET_TYPE_BINARY){HS_SelectHedgelet2(_25,"/hedgelets/YesNo/quotedetail.html",_29);}else{HS_SelectHedgelet2(_25,"/trade/order/",_29);}}}function HS_Buy(_2a,_2b,_2c){HS_Trade(_2a,_2b,_2c,HS_ORDER_TYPE_BUY);}function HS_Sell(_2d,_2e,_2f){HS_Trade(_2d,_2e,_2f,HS_ORDER_TYPE_SELL);}function HS_ClearOrderCookies(){HS_SetCookie(HS_COOKIE_ORDER,"");}function HS_ClearOrderReceiptCookies(){HS_SetCookie(HS_COOKIE_ORDERRECEIPT,"");}function HS_GetOrderType(){var _30=0;try{_30=form_ordertype;}catch(e){}_30=parseInt(_30,10);if(isNaN(_30)||_30<HS_ORDER_TYPE_BUY){_30=parseInt(HS_GetCookie(HS_COOKIE_ORDER,HS_ORDER_TYPE),10);if(isNaN(_30)||_30<HS_ORDER_TYPE_BUY){_30=0;}}return _30;}function HS_GetOrderHedgeletPath(){var _31;try{_31=form_hedgeletid;}catch(e){}if(_31==null||_31.length<1){_31=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_HEDGELETPATH);if(_31==null||_31.length<1){_31="";}}return _31;}function HS_EstimatedCost(_32,nP,nQ,_35,_36,_37,_38){var _39=_32;var _3a=_37;if(typeof _3a=="undefined"||_3a==null||_3a<=0){_3a=10;}var _3b=_35;if(typeof _3b=="undefined"||_3b==null){_3b=0;}var _3c=_36;if(typeof _3c=="undefined"||_3c==null){_3c=false;}var _3d=_38;if(typeof _3d=="undefined"||_3d==null){_3d=true;}var _3e=nQ;if(typeof _3e=="undefined"||_3e==null){_3e=0;}var _3f=nP;if(typeof _3f=="undefined"||_3f==null){_3f=0;}var _40=_3a-nP;var _41=0;if(_3c){if(_39==HS_ORDER_TYPE_BUY){if(_3b>=0){_41=-(_3e*_3f);}else{if(_3e>Math.abs(_3b)){_41=Math.abs(_3b)*_40-(_3e-Math.abs(_3b))*_3f;}else{_41=_3e*_40;}}}else{if(_39==HS_ORDER_TYPE_SELL){if(_3b<=0){_41=-(_3e*_40);}else{if(_3e>Math.abs(_3b)){_41=Math.abs(_3b)*_3f-(_3e-Math.abs(_3b))*_40;}else{_41=_3e*_3f;}}}}}else{_41=_3e*_3f;if(_39==HS_ORDER_TYPE_BUY||_39==HS_ORDER_TYPE_SUBSCRIBE){_41=-(_41);}}if(_3d){_41=Math.abs(_41);}return Math.round(_41*100)/100;}function HS_OnHedgeletChange(){var obj=HS_GetElementByID("hsidHedgeletSelectorHedgelets");if(obj==null){return;}var _43=obj.options[obj.selectedIndex];strHedgeletName=_43.text;HS_ReplaceInnerHTML("hedgelet_name",strHedgeletName);strHedgeletPath=_43.value;HS_SetCookie(HS_COOKIE_HEDGELET,strHedgeletPath,HS_HEDGELET_HEDGELETPATH);if(strHedgeletPath.length>0){_XMLHTTP.request("/hedgelet/service/snapquote?out=arrSnapQuoteDetail&hedgeletpath="+escape(strHedgeletPath),HS_UpdateHedgeletDetails);}var _44=HS_GetElementByID("hsidHedgeletPath");_44.value=strHedgeletPath;}function HS_FillOpenOrdersAmount(_45,_46){if(!isUserLoggedIn){return;}if(typeof _45=="undefined"||_45==null||_45.length<=0){return;}if(typeof _46=="undefined"||_46==null){return;}_XMLHTTP.request("/hedgelet/service/institutional-open-order?out=arrOrders",HS_FillOpenOrdersAmount2,[_45,_46]);}function HS_FillOpenOrdersAmount2(_47,_48){if(typeof _48=="undefined"||_48==null||_48.length<2){return;}if(typeof _48[1]=="undefined"||_48[1]==null){return;}if(_47.trim().length>0){var _49=HS_ExtractArrayByName("arrOrders",_47.trim());if(_49==null){_49=new Array();}else{_49=HS_FormatServiceData(_49);}}var _4a=0;for(var j=0;j<_49.length;j++){var _4c=_49[j];if(_4c["stHedgeletPath"]==_48[0]){_4a+=_4c["nOpenQuantity"];}}_48[1].innerHTML=_4a;}var _GiveUpInfo=new Array();function HS_SetGiveup(_4d,_4e,_4f,_50,_51,_52,_53){if(typeof _4d=="undefined"||_4d==null){return;}var _54=getElementByName(_4d,"input",_4e);if(typeof _54=="undefined"||_54==null||_54.type.toLowerCase()!="checkbox"){return;}_54.onclick=HS_SetGiveup_ToggleSelect;_GiveUpInfo["checkbox"]=_54;var _55=getElementByName(_4d,"select",_4f);if(typeof _55=="undefined"||_55==null){return;}_GiveUpInfo["firmselect"]=_55;var _56=getElementByName(_4d,"select",_50);if(typeof _56=="undefined"||_56==null){return;}_GiveUpInfo["accountselect"]=_56;_XMLHTTP.request("/hedgelet/service/giveupcode?out=arrGiveUp",HS_SetGiveup_UpdateDetails);if(typeof _51!="undefined"&&_51!=null&&_51){HS_SetGiveup_ToggleSelect();}}function HS_SetGiveup_UpdateDetails(_57){if(_57.trim().length<=0){return;}var _58=HS_ExtractArrayByName("arrGiveUp",_57.trim());if(_58==null){return;}else{_58=HS_FormatServiceData(_58);}_GiveUpInfo["data"]=new Array();for(var i=0;i<_58.length;i++){_GiveUpInfo["data"].push(new Array(_58[i]["stGiveUpFirm"],_58[i]["stAccountNumber"]));}var _5a=_GiveUpInfo["firmselect"];if(typeof _5a!="undefined"&&_5a!=null){while(_5a.options.length>0){try{_5a.remove(0);}catch(e){}}var obj=document.createElement("option");try{_5a.add(obj);}catch(e){_5a.add(obj,null);}obj.text="Select a Firm";obj.value="unspecified";var obj=document.createElement("option");try{_5a.add(obj);}catch(e){_5a.add(obj,null);}obj.text="Unspecified";obj.value="unspecified";var _5c=new Array();for(var i=0;i<_GiveUpInfo["data"].length;i++){if(_GiveUpInfo["data"][i][0].length>0){var _5d=false;for(var j=0;j<_5c.length;j++){if(_5c[j]==_GiveUpInfo["data"][i][0]){_5d=true;break;}}if(!_5d){_5c.push(_GiveUpInfo["data"][i][0]);var obj=document.createElement("option");try{_5a.add(obj);}catch(e){_5a.add(obj,null);}obj.text=_GiveUpInfo["data"][i][0];obj.value=_GiveUpInfo["data"][i][0];}}}_5a.onchange=HS_SetGiveup_ChangeFirm;}HS_SetGiveup_ChangeFirm();}function HS_SetGiveup_ToggleSelect(){var _5f=_GiveUpInfo["checkbox"];if(typeof _5f=="undefined"||_5f==null){return;}var _60=_GiveUpInfo["firmselect"];if(typeof _60=="undefined"||_60==null){return;}var _61=_GiveUpInfo["accountselect"];if(typeof _61=="undefined"||_61==null){return;}if(_5f.checked){_60.style.visibility="visible";_61.style.visibility="visible";}else{_60.style.visibility="hidden";_61.style.visibility="hidden";}}function HS_SetGiveup_ChangeFirm(){var _62=_GiveUpInfo["firmselect"];if(typeof _62=="undefined"||_62==null){return;}var _63=_GiveUpInfo["accountselect"];if(typeof _63=="undefined"||_63==null){return;}while(_63.options.length>0){try{_63.remove(0);}catch(e){}}var obj=document.createElement("option");try{_63.add(obj);}catch(e){_63.add(obj,null);}obj.text="Select an Account";obj.value="unspecified";var obj=document.createElement("option");try{_63.add(obj);}catch(e){_63.add(obj,null);}obj.text="Unspecified";obj.value="unspecified";for(var i=0;i<_GiveUpInfo["data"].length;i++){if(_62.value==_GiveUpInfo["data"][i][0]){var obj=document.createElement("option");try{_63.add(obj);}catch(e){_63.add(obj,null);}obj.text=_GiveUpInfo["data"][i][1];obj.value=_GiveUpInfo["data"][i][1];}}}function HS_GetBlockTradeStatusString(n){var str="";switch(n){case HS_BLOCKTRADE_STATUS_OPEN:break;case HS_BLOCKTRADE_STATUS_CANCELED:str="cancel";break;case HS_BLOCKTRADE_STATUS_CLEARED:str="affirmed";break;case HS_BLOCKTRADE_STATUS_BUY_VOIDED:case HS_BLOCKTRADE_STATUS_SELL_VOIDED:case HS_BLOCKTRADE_STATUS_BOTH_FAILED:str="rejected";break;case HS_BLOCKTRADE_STATUS_BOTH_EXPIRED:case HS_BLOCKTRADE_STATUS_SELL_EXPIRED:case HS_BLOCKTRADE_STATUS_BUY_EXPIRED:str="expired";break;default:break;}return str;}function HS_CalculatePositions(_68,_69){var _6a="";var _6b=0;var _6c;var _6d=new Array();var _6e=new Array(0,0,0);var _6f=new Array();var _70=null;var _71,nTradedAtDisplay,nTradedAtSystem,nCurrValSystem,nCurrValDisplay,nQty,nCashReqd,nPandL,nMarketValue;for(var i=0;i<_68.length;i++){var _73=_68[i];_71=_73["isLong"];if(_73["ecHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){cPurchasePrice=HS_Futures_ToDisplayPrice2(_73["cyPurchasePrice"],_73["bdUnderlyingFloor"],_73["bdUnderlyingCap"],_73["cyPayout"],_73["bdTickSize"]);nTradedAtDisplay=HS_GenerateCurrencyN(cPurchasePrice);}else{nTradedAtDisplay=HS_GenerateCurrencyN(_73["cyPurchasePrice"]);}nTradedAtSystem=HS_GenerateCurrencyN(_73["cyPurchasePrice"]);var _74=_73["cyBid"];if(_73["ecHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){_74=HS_Futures_ToDisplayPrice2(_74,_73["bdUnderlyingFloor"],_73["bdUnderlyingCap"],_73["cyPayout"],_73["bdTickSize"]);}var _75=_73["cyAsk"];if(_73["ecHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){_75=HS_Futures_ToDisplayPrice2(_75,_73["bdUnderlyingFloor"],_73["bdUnderlyingCap"],_73["cyPayout"],_73["bdTickSize"]);}var _76=_73["cyLastTradePrice"];if(_73["ecHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){_76=HS_Futures_ToDisplayPrice2(_76,_73["bdUnderlyingFloor"],_73["bdUnderlyingCap"],_73["cyPayout"],_73["bdTickSize"]);}if(HS_IsValidCurrency(_74)&&HS_GenerateCurrencyN(_74)!=0&&HS_IsValidCurrency(_75)&&HS_GenerateCurrencyN(_75)!=0){nCurrValDisplay=(HS_GenerateCurrencyN(_74)+HS_GenerateCurrencyN(_75))/2;}else{if(HS_IsValidCurrency(_73["cyLastTradePrice"])&&HS_GenerateCurrencyN(_73["cyLastTradePrice"])!=0){nCurrValDisplay=HS_GenerateCurrencyN(_76);}else{nCurrValDisplay=nTradedAtDisplay;}}if(HS_IsValidCurrency(_73["cyBid"])&&HS_GenerateCurrencyN(_73["cyBid"])!=0&&HS_IsValidCurrency(_73["cyAsk"])&&HS_GenerateCurrencyN(_73["cyAsk"])!=0){nCurrValSystem=(HS_GenerateCurrencyN(_73["cyBid"])+HS_GenerateCurrencyN(_73["cyAsk"]))/2;}else{if(HS_IsValidCurrency(_73["cyLastTradePrice"])&&HS_GenerateCurrencyN(_73["cyLastTradePrice"])!=0){nCurrValSystem=HS_GenerateCurrencyN(_73["cyLastTradePrice"]);}else{nCurrValSystem=nTradedAtSystem;}}nQty=_73["nQuantity"];var _77,nCap2;if(_71){nPandL=nQty*(nCurrValSystem-nTradedAtSystem);if(_73["ecHedgeletType"]==HS_HEDGELET_TYPE_BINARY){nCashReqd=nQty*nTradedAtDisplay;nMarketValue=nCurrValDisplay*nQty;}else{nCashReqd=nTradedAtSystem*nQty;nMarketValue=nCurrValSystem*nQty;}}else{nQty=_73["nQuantity"];if(HS_IsValidCurrency(_73["cyPayout"])&&HS_GenerateCurrencyN(_73["cyPayout"])!=0){_77=HS_GenerateCurrencyN(_73["cyPayout"]);}if(_73["bdUnderlyingCap"]==null||_73["bdUnderlyingCap"]==""||_73["bdUnderlyingFloor"]==null||_73["bdUnderlyingFloor"]==""){nCap2=(_77-nTradedAtDisplay);nCashReqd=_73["nQuantity"]*nCap2;nMarketValue=(_77-nCurrValDisplay)*_73["nQuantity"];}else{nCap2=_77-nTradedAtSystem;if(_73["ecHedgeletType"]==HS_HEDGELET_TYPE_BINARY){nCashReqd=_73["nQuantity"]*(_77-nTradedAtDisplay);nMarketValue=(_77-nCurrValDisplay)*(_73["nQuantity"]);}else{nCashReqd=_73["nQuantity"]*nCap2;nMarketValue=(_77-nCurrValSystem)*_73["nQuantity"];}}nPandL=nQty*(nTradedAtSystem-nCurrValSystem);}if(nMarketValue<0){nMarketValue=-nMarketValue;}if(nCashReqd<0){nCashReqd=-nCashReqd;}strTemp=_73["stHedgeletName"];strTemp+=" ("+HS_GenerateDateSimple(_73["daLastTradeDate"])+")";if(!_71){strTemp+=" short";}if(_69==1){_6f.push(new Array(false,strTemp,Math.round(nQty*100)/100,0,nCurrValDisplay,nTradedAtDisplay,Math.round(nPandL*100)/100,Math.round(nMarketValue*100)/100,_71,_73["stHedgeletPath"],Math.round(nCashReqd*100)/100,_73["ecHedgeletType"],_68.length,_73["bdUnderlyingFloor"],_73["bdUnderlyingCap"],_73["cyPayout"],_73["bdTickSize"]));}else{_6f.push(new Array(true,strTemp,0,0,0,0,0,0,_71,_73["stHedgeletPath"],0,_73["ecHedgeletType"],0,_73["bdUnderlyingFloor"],_73["bdUnderlyingCap"],_73["cyPayout"],_73["bdTickSize"]));if(_73["stHedgeletPath"]!=_6a){_70=_6f[_6b];_70[2]=Math.round(nQty*100)/100;_70[4]=nCurrValDisplay;_70[5]=nTradedAtDisplay;_70[6]=Math.round(nPandL*100)/100;_70[7]=Math.round(nMarketValue*100)/100;_70[10]=Math.round(nCashReqd*100)/100;}}_6e[0]+=nPandL;_6e[1]+=nCashReqd;_6e[2]+=nMarketValue;_6a=_73["stHedgeletPath"];_6b=_6b+1;}_6d.push(_6f);if(_69==0){if($$(_70)){_6d.push(_70);}else{_6d.push(null);}_6d.push(_6e);}return (_6d);}function HS_OnEnterSubmit(_78,_79,_7a){var _7b=(document.layers)?true:false;var _7c=0;if(_7b){_7c=_78.which;}else{_7c=_78.keyCode;}if(_7c==13){_7a();}}
	function HS_GetHedgeletTypeNameShort(_1){var _2="";if(_1==HS_HEDGELET_TYPE_YES){_2="Yes";}else{if(_1==HS_HEDGELET_TYPE_NO){_2="No";}else{if(_1==HS_HEDGELET_TYPE_VARIABLE){_2="Futures";}else{if(_1==HS_HEDGELET_TYPE_BINARY){_2="Binaries";}}}}return (_2);}function HS_GetHedgeletTypeName(_3,_4){var _5=HS_GetHedgeletTypeNameShort(_3);if(_5==""){return (_5);}_5+=" Contract";if(_4){_5+="s";}return (_5);}function HS_PendingSettledHedgelets(_6){if(_6){window.location="/hedgelets/pendingandsettled.html";}else{window.location="/hedgelets/pendingandsettled/";}}function HS_OpenHedgelets(){window.location="/hedgelets/open.html";}function HS_DailyHedgelets(){window.location="/hedgelets/spot.html";}function HS_WeeklyHedgelets(){window.location="/hedgelets/weekly.html";}function HS_CalendarHedgelets(){window.location="/hedgelets/calendar.html";}function HS_ClearHedgeletSelection(){HS_SetCookie(HS_COOKIE_HEDGELET,"");HS_SetHedgeletFilters(new Array(HS_HEDGELET_TYPE_ALL,HS_TIME_FRAME_ALL,HS_PERIODICITY_ALL,createFilter(HS_STATUS_OPEN,HS_STATUS_CLOSED),HS_HEDGELET_CLASS_RETAIL));}function HS_SelectAsset(_7,_8,_9,_a,_b){HS_SelectAssetLow(_7,_8,_9,"",_a,_b);}function HS_SelectAssetLow(_c,_d,_e,_f,_10,_11,_12,_13){HS_SetCookie(HS_COOKIE_HEDGELET,_c,HS_HEDGELET_SUBMARKET);HS_SetCookie(HS_COOKIE_HEDGELET,_c,HS_HEDGELET_ASSETNAME);HS_SetCookie(HS_COOKIE_HEDGELET,_d,HS_HEDGELET_ASSETPATH);HS_SetCookie(HS_COOKIE_HEDGELET,"",HS_HEDGELET_HEDGELETPATH);HS_SetCookie(HS_COOKIE_HEDGELET,"",HS_HEDGELET_HEDGELETNAME);HS_SetCookie(HS_COOKIE_HEDGELET,_f,HS_HEDGELET_HEDGELETTYPE);if(typeof strMarket!="undefined"){HS_SetCookie(HS_COOKIE_HEDGELET,strMarket,HS_HEDGELET_MARKETNAME);}if(typeof _10!="undefined"){HS_SetCookie(HS_COOKIE_HEDGELET,_10,HS_HEDGELET_SUBMARKETNAME);}if(typeof _11!="undefined"){HS_SetCookie(HS_COOKIE_HEDGELET,_11,HS_HEDGELET_SUBMARKETPATH);}if(typeof _12!="undefined"){HS_SetCookie(HS_COOKIE_MOSTACTIVE,_12,HS_HEDGELET_MOST_ACTIVE);}if(typeof _13!="undefined"){HS_SetCookie(HS_COOKIE_MOSTACTIVE,_13,HS_HEDGELET_ALL);}if(_e.length>0){if(_e.match("/i/trading/placeorder/")){HS_ClearOrderCookies();}if(parent!=self){parent.location=_e;}else{window.location=_e;}}}function HS_SelectHedgelet(_14,_15,_16,_17,_18,_19){HS_ClearHedgeletSelection();HS_SetCookie(HS_COOKIE_HEDGELET,_14,HS_HEDGELET_HEDGELETPATH);HS_SetCookie(HS_COOKIE_HEDGELET,_15,HS_HEDGELET_HEDGELETTYPE);HS_SetCookie(HS_COOKIE_HEDGELET,_16,HS_HEDGELET_ASSETNAME);HS_SetCookie(HS_COOKIE_HEDGELET,_17,HS_HEDGELET_ASSETPATH);if(typeof _19!="undefined"&&_19!=null){HS_SetCookie(HS_COOKIE_HEDGELET,_19,HS_HEDGELET_HEDGELETNAME);}if(_18.length>0){window.location=_18;}}function HS_SelectHedgelet2(_1a,_1b,_1c,_1d){HS_ClearHedgeletSelection();HS_SetCookie(HS_COOKIE_HEDGELET,_1a,HS_HEDGELET_HEDGELETPATH);if(typeof _1c!="undefined"&&_1c!=null){HS_SetCookie(HS_COOKIE_HEDGELET,_1c,HS_HEDGELET_HEDGELETTYPE);}if(typeof _1d!="undefined"&&_1d!=null){HS_SetCookie(HS_COOKIE_HEDGELET,_1d,HS_HEDGELET_HEDGELETNAME);}if(_1b.length>0){window.location=_1b;}}function HS_CheckSubmarketSelection(_1e){var _1f;_1f=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_MARKETNAME);if(_1f==null||_1f==""){location.replace(_1e);}_1f=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_SUBMARKETPATH);if(_1f==null||_1f==""){location.replace(_1e);}_1f=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_SUBMARKETNAME);if(_1f==null||_1f==""){location.replace(_1e);}}function HS_CheckAssetSelection(_20,_21){var _22;_22=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_ASSETPATH);if(_22==null||_22==""){if(_20.length>0){location.replace(_20);}else{return false;}}if(_21==true){return true;}_22=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_ASSETNAME);if(_22==null||_22==""){if(_20.length>0){location.replace(_20);}else{return false;}}return true;}function HS_CheckHedgeletSelection(_23){var _24;_24=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_HEDGELETPATH);if(_24==null||_24==""){if(_23.length>0){location.replace(_23);}else{return false;}}return true;}function HS_SelectTimeframe(_25,_26){HS_SetCookie(HS_COOKIE_HEDGELETFILTER,_25,HS_FILTER_H_TIMEFRAME);window.location=_26;}function HS_GetHedgeletContent_New(_27,_28){if(typeof _28=="undefined"||_28==null){return null;}if(_28.length<=0){return null;}for(var i=0;i<_28.length;i++){var _2a=_28[i];if(HS_MatchHedgeletContent(_27,_2a["path"])){return _2a;}}return null;}function HS_MatchHedgeletContent(_2b,_2c){var _2d=HS_FormatAssetPathForWeb(_2b);var _2e=HS_FormatAssetPathForWeb(_2c);if(_2d.toLowerCase()==_2e.toLowerCase()){return true;}var _2f=_2d.split(".");if(_2f.length>1){_2d=_2d.substring(_2f[0].length+1);}if(_2d.toLowerCase()==_2e.toLowerCase()){return true;}return false;}function HS_IsPending(_30){if(_30==HS_STATUS_STOPPED){return true;}return false;}function HS_IsSettled(_31){if(_31==HS_STATUS_EXPIRED){return true;}return false;}function HS_IncludeContentJS(_32){var _33=_32;if(typeof _33=="undefined"||_33==null||_33.length<=0){_33=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_ASSETPATH);}if(_33!=null&&_33.length>0){HS_LoadJS("/product/Content/"+HS_ConvertToInstrumentName(_33)+".js","",false);}}function HS_BuildOneHedgeletRow(_34,_35,_36,i,_38,_39,_3a,_3b,_3c){var _3d=0;var _3e=_36["stHedgeletName"]+((_36["stHedgeletSymbol"].trim().length>0)?" ("+_36["stHedgeletSymbol"]+")":"");if(typeof _3c=="undefined"||!_3c){var _3f=_Dialogs.add(null,"Add to Watchlist",false,false);var id=_38+"_watchlist"+i;var obj=getElementByName(_35,"a","link_watchlist_add").cloneNode(true);obj.href="javascript:HS_AddToWatchlist( '"+_36["stHedgeletPath"]+"', '"+_3e+"' );";obj.id=id;_34.cells[_3d++].appendChild(obj);_Dialogs.setParent(_3f,id,"onmouseover","onmouseout","");}obj=getElementByName(_35,"a","link_hedgelet").cloneNode(true);obj.href="javascript:HS_SelectHedgelet2( '"+_36["stHedgeletPath"]+"', '/iHedgelets/asset/quotes/' );";obj.innerHTML=_3e;_34.cells[_3d++].appendChild(obj);if(typeof _39=="undefined"||_39){switch(_36["ecHedgeletType"]){case HS_HEDGELET_TYPE_YES:case HS_HEDGELET_TYPE_NO:case HS_HEDGELET_TYPE_BINARY:_34.cells[_3d++].innerHTML="Binary";break;case HS_HEDGELET_TYPE_VARIABLE:_34.cells[_3d++].innerHTML="Future";break;default:_3d++;break;}}var _42=_Dialogs.add(HS_BuildOrderbook,_36["stHedgeletPath"],true,true);id=_38+"_bid"+i;obj=getElementByName(_35,"a","link_price").cloneNode(true);obj.id=id;obj.href="javascript:;";obj.innerHTML=HS_GenerateCurrency(_36["cyBid"]);_34.cells[_3d++].appendChild(obj);if(HS_IsValidCurrency(_36["cyBid"])){obj.href="javascript:_QuickTrade.placeOrder( \""+_36["stHedgeletPath"]+"\", "+HS_GenerateCurrencyN(_36["cyBid"])+", "+_36["nBidQuantity"]+", \"\" );";var _43=_Dialogs.add(null,HS_GenerateCurrency(_36["cyBid"])+" x "+_36["nBidQuantity"],false,false);_Dialogs.setParent(_43,id,"onmouseover","onmouseout","");id=_38+"_orderbook_bid"+i;obj=getElementByName(_35,"a","link_orderbook").cloneNode(true);obj.id=id;obj.href="javascript:;";_34.cells[_3d++].appendChild(obj);_Dialogs.setParent(_42,id,"onclick","","");}else{_3d++;}id=_38+"_ask"+i;obj=getElementByName(_35,"a","link_price").cloneNode(true);obj.id=id;obj.href="javascript:;";obj.innerHTML=HS_GenerateCurrency(_36["cyAsk"]);_34.cells[_3d++].appendChild(obj);if(HS_IsValidCurrency(_36["cyAsk"])){obj.href="javascript:_QuickTrade.placeOrder( \""+_36["stHedgeletPath"]+"\", "+HS_GenerateCurrencyN(_36["cyAsk"])+", "+_36["nAskQuantity"]+", \"\" );";var _44=_Dialogs.add(null,HS_GenerateCurrency(_36["cyAsk"])+" x "+_36["nAskQuantity"],false,false);_Dialogs.setParent(_44,id,"onmouseover","onmouseout","");id=_38+"_orderbook_ask"+i;obj=getElementByName(_35,"a","link_orderbook").cloneNode(true);obj.id=id;obj.href="javascript:;";_34.cells[_3d++].appendChild(obj);_Dialogs.setParent(_42,id,"onclick","","");}else{_3d++;}id=_38+"_last"+i;obj=getElementByName(_35,"a","link_price").cloneNode(true);obj.id=id;obj.href="javascript:;";var _45=_36["cyLastTrade"];if(typeof _45=="undefined"||_45==null){_45=_36["cyLastTradedPrice"];if(typeof _45=="undefined"||_45==null){_45=null;}}var _46="-";var _47=0;var _48=false;if(_45!=null){_46=HS_GenerateCurrency(_45);_47=HS_GenerateCurrencyN(_45);_48=HS_IsValidCurrency(_45);}var _49=_36["nLastTradeQuantity"];if(typeof _49=="undefined"||_49==null){_49=_36["nLastTradedQuantity"];if(typeof _49=="undefined"||_49==null){_49="";}}obj.innerHTML=_46;_34.cells[_3d++].appendChild(obj);if(_48){obj.href="javascript:_QuickTrade.placeOrder( \""+_36["stHedgeletPath"]+"\", "+_47+", "+_49+", \"\" );";var str=_46+" x "+_49;if(_36["isBlockTrade"]){str+="<br>Block Trade";}var _4b=_36["dtLastTradedTime"];var _4c=_36["daLastTradedDate"];var _4d=_36["tmLastTradedTime"];var _4e=null;if(typeof _4b!="undefined"&&_4b!=null){_4e=_4b;}else{if(typeof _4c!="undefined"&&_4c!=null&&typeof _4d!="undefined"&&_4d!=null){_4e=_4c.concat(_4d);}}if(_4e!=null){var _4f=HS_GenerateDate3(_4e);_4e.splice(0,3);try{var _50=HS_GenerateTime(_4e,true);}catch(e){var _50="";}if(_50.trim().length>0){str+="<br>"+_50;}if(_4f.trim().length>0){str+="<br>"+_4f;}}var _51=_Dialogs.add(null,str,false,false);_Dialogs.setParent(_51,id,"onmouseover","onmouseout","");var _52=_Dialogs.add(HS_BuildTimeAndSales,_36["stHedgeletPath"],true,true);id=_38+"_timesales_last"+i;obj=getElementByName(_35,"a","link_orderbook").cloneNode(true);obj.id=id;obj.href="javascript:;";_34.cells[_3d++].appendChild(obj);_Dialogs.setParent(_52,id,"onclick","","");}else{_3d++;}if(typeof _3a=="undefined"||_3a){var _53=hs.util.getHedgeletChange(_36);var _54=_53.change;var _55=_53.percent;if(_54>0){obj=getElementByName(_35,"img","image_uparrow").cloneNode(true);_34.cells[_3d++].appendChild(obj);obj=getElementByName(_35,"span","span_uptext").cloneNode(true);obj.innerHTML=""+_55+"%&nbsp;("+_54+")";_34.cells[_3d++].appendChild(obj);}else{if(_54<0){obj=getElementByName(_35,"img","image_downarrow").cloneNode(true);_34.cells[_3d++].appendChild(obj);obj=getElementByName(_35,"span","span_downtext").cloneNode(true);obj.innerHTML=""+_55+"%&nbsp;("+_54+")";_34.cells[_3d++].appendChild(obj);}else{_34.cells[_3d++].innerHTML="";_34.cells[_3d++].innerHTML="-";}}}if(typeof _3b=="undefined"||!_3b){var vol=_36["nVolume"];if(typeof vol=="undefined"||vol==null){vol=_36["nUnitVolume"];if(typeof vol=="undefined"||vol==null){vol="-";}}_34.cells[_3d++].innerHTML=vol;}if(typeof _3c!="undefined"&&_3c){var _3f=_Dialogs.add(null,"Remove from Watchlist",false,false);var id=_38+"_watchlistremove"+i;var obj=getElementByName(_35,"a","link_watchlist_remove").cloneNode(true);obj.href="javascript:HS_RemoveFromWatchlist( '"+_36["stHedgeletPath"]+"' );";obj.id=id;_34.cells[_3d++].appendChild(obj);_Dialogs.setParent(_3f,id,"onmouseover","onmouseout","bl");}return _3d;}function HS_BuildPopupQuote(_57,_58){if(_57==null||_57.node==null||_58==null){return;}if(HS_SiteIsInstitutional()){return;}HS_BuildPopupQuote_Refresh(_58,_57.id);}function HS_BuildPopupQuote_Refresh(_59,_5a,_5b){if(HS_SiteIsInstitutional()){return;}_XMLHTTP.request("/hedgelet/service/quote-detail?out=arrQuoteDetail&timeframe="+HS_TIME_FRAME_TODAY+"&hedgeletpath="+escape(_59.hedgeletPath),HS_BuildPopupQuote_Fill,{dialogID:_5a,assetName:_59.assetName,silent:_5b});}function HS_BuildPopupQuote_Fill(_5c,_5d){var _5e=_Dialogs.find(_5d.dialogID);if(_5e==null){return;}var _5f=_5d.silent;if(!$$(_5f)){_5f=false;}if(_5c.trim().length<=0){_Dialogs.hide(_5e.id,true);return;}var _60=HS_ExtractArrayByName("arrQuoteDetail",_5c.trim());if(_60!=null){_60=HS_FormatServiceData(_60,null,true);}if(_60==null){_Dialogs.hide(_5e.id,true);return;}var _61=_5e.id+"_handle";var _62=_5e.node;var _63=_60["stHedgeletName"];if(_60["nHedgeletType"]==HS_HEDGELET_TYPE_YES){_63+=" Yes";}else{if(_60["nHedgeletType"]==HS_HEDGELET_TYPE_NO){_63+=" No";}}_63+=" ("+HS_GenerateDateSimple(_60["daLastTradingDate"])+")";var _64=getElementByName(_62,"td","title");if(_64!=null){_64.id=_61;_64.style.cursor="move";}var _64=getElementByName(_62,"div","title");if(_64!=null){_64.innerHTML=_63;_64.style.textAlign="center";_64.style.marginLeft="12px";_64.style.marginRight="12px";}var _64=getElementByName(_62,"img","link_close");if(_64!=null){_64.onclick=new Function("_Dialogs.hide( '"+_5e.id+"', true );");}var _65=getElementByName(_62,"img","link_refresh");if(_65!=null){_65.onclick=new Function("this.onclick=null;this.style.display=\"none\";HS_BuildPopupQuote_Refresh({ hedgeletPath : '"+_60["stHedgeletPath"]+"', assetName : '' }, '"+_5e.id+"', true );");}var _66=getElementByName(_62,"div","content");if(_66==null){_Dialogs.hide(_5e.id,true);return;}_66.innerHTML="";var _67=hs.ui.getWidget("div","popupquote");if(_67!=null){_67=_67.cloneNode(true);_66.appendChild(_67);var obj=getElementByName(_67,"a","lastprice");if(obj!=null){hs.ui.linkHelp(obj);}var obj=getElementByName(_67,"a","change");if(obj!=null){hs.ui.linkHelp(obj);}var obj=getElementByName(_67,"a","sellat");if(obj!=null){hs.ui.linkHelp(obj);}var obj=getElementByName(_67,"a","buyat");if(obj!=null){hs.ui.linkHelp(obj);}var obj=getElementByName(_67,"a","high");if(obj!=null){hs.ui.linkHelp(obj);}var obj=getElementByName(_67,"a","low");if(obj!=null){hs.ui.linkHelp(obj);}var obj=getElementByName(_67,"a","volume");if(obj!=null){hs.ui.linkHelp(obj);}var obj=getElementByName(_67,"a","openinterest");if(obj!=null){hs.ui.linkHelp(obj);}var obj=getElementByName(_67,"div","description");if(obj!=null){obj.style.display="none";}var _69="";var _6a=_60["stHedgeletPath"];if(typeof _6a!="undefined"&&_6a!=null){var _6b=_6a.indexOf("[");if(_6b>0){_69=_6a.substring(_6b);}}var _6c=_60["stUnderlyingAssetPrice"];var _6d=hs.util.getAssetName(_69);if(typeof _6c!="undefined"&&_6c!=null&&_6c.length>0){var obj=getElementByName(_67,"span","underlying");if(obj!=null){var str="";if(_6d.length>0){str+=_6d+" now";}else{str+="Now";}str+=" trading at ";obj.innerHTML=str;var _6f=hs.ui.getWidget("a","link");if(_6f!=null){_6f=_6f.cloneNode(true);obj.appendChild(_6f);_6f.innerHTML=_6c;_6f.href="javascript:;";var str=hs.util.getUnderlyingDetailMessage(_60);if(str.length>0){hs.ui.linkToolTip(_6f,str);}}else{obj.innerHTML+=_6c;}}}var obj=getElementByName(_67,"a","viewdetails");if(obj!=null){var _70="/hedgelets/YesNo/contract.html";if(_69.length>0){obj.href="javascript:;";var _71=_60["nHedgeletType"];if(_60["nHedgeletType"]!=HS_HEDGELET_TYPE_VARIABLE){_71=HS_HEDGELET_TYPE_BINARY|HS_HEDGELET_TYPE_YES|HS_HEDGELET_TYPE_NO;}obj.onclick=new Function("HS_SelectAsset( '', '"+_69+"', '' );HS_SetCookie( '"+HS_COOKIE_HEDGELET+"', '"+_6a+"', "+HS_HEDGELET_HEDGELETPATH+" );HS_SetCookie( '"+HS_COOKIE_HEDGELET+"', "+_71+", "+HS_HEDGELET_HEDGELETTYPE+" );PopUpWindow3( '"+_70+"', '', 800, 600, 'channelmode=0,dependent=0,directories=0,fullscreen=0,location=1,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=1' );");}else{obj.style.display="none";}}var obj=getElementByName(_67,"td","lastprice");if(obj!=null){var _72=_60["cyLastTradePrice"];if(_60["nHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){_72=HS_Futures_ToDisplayPrice2(_72,_60["bdUnderlyingFloor"],_60["bdUnderlyingCap"],_60["cyPayout"],_60["bdTickSize"]);}obj.innerHTML=HS_GenerateCurrency(_72);}var obj=getElementByName(_67,"td","change");if(obj!=null){obj.innerHTML="";var _73=hs.util.getHedgeletChange(_60);var _74=_73.change;var _75=_73.percent;if(_74>0){var _6f=hs.ui.getWidget("img","popupquote_changeimg_up").cloneNode(true);obj.appendChild(_6f);var _6f=hs.ui.getWidget("span","popupquote_changetext_up").cloneNode(true);_6f.innerHTML=_75+"%&nbsp;("+_74+")";obj.appendChild(_6f);}else{if(_74<0){var _6f=hs.ui.getWidget("img","popupquote_changeimg_down").cloneNode(true);obj.appendChild(_6f);var _6f=hs.ui.getWidget("span","popupquote_changetext_down").cloneNode(true);_6f.innerHTML=_75+"%&nbsp;("+_74+")";obj.appendChild(_6f);}else{obj.innerHTML="-";}}}var obj=getElementByName(_67,"span","sellat");if(obj!=null){var _72=_60["cyBid"];if(_60["nHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){_72=HS_Futures_ToDisplayPrice2(_72,_60["bdUnderlyingFloor"],_60["bdUnderlyingCap"],_60["cyPayout"],_60["bdTickSize"]);}obj.innerHTML=HS_GenerateCurrency(_72);}var obj=getElementByName(_67,"span","buyat");if(obj!=null){var _72=_60["cyAsk"];if(_60["nHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){_72=HS_Futures_ToDisplayPrice2(_72,_60["bdUnderlyingFloor"],_60["bdUnderlyingCap"],_60["cyPayout"],_60["bdTickSize"]);}obj.innerHTML=HS_GenerateCurrency(_72);}var obj=getElementByName(_67,"span","high");if(obj!=null){var _72=_60["cyDailyHigh"];if(_60["nHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){_72=HS_Futures_ToDisplayPrice2(_72,_60["bdUnderlyingFloor"],_60["bdUnderlyingCap"],_60["cyPayout"],_60["bdTickSize"]);}obj.innerHTML=HS_GenerateCurrency(_72);}var obj=getElementByName(_67,"span","low");if(obj!=null){var _72=_60["cyDailyLow"];if(_60["nHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){_72=HS_Futures_ToDisplayPrice2(_72,_60["bdUnderlyingFloor"],_60["bdUnderlyingCap"],_60["cyPayout"],_60["bdTickSize"]);}obj.innerHTML=HS_GenerateCurrency(_72);}var obj=getElementByName(_67,"span","volume");if(obj!=null){obj.innerHTML=_60["nVolume"];}var obj=getElementByName(_67,"span","openinterest");if(obj!=null){obj.innerHTML=_60["nOpenInterest"];}var obj=getElementByName(_67,"span","timeremaining");if(obj!=null){var _76=new Date(_SessionState["dtCurrentTime"][0],_SessionState["dtCurrentTime"][1]-1,_SessionState["dtCurrentTime"][2],_SessionState["dtCurrentTime"][3],_SessionState["dtCurrentTime"][4],_SessionState["dtCurrentTime"][5]);var _77=new Date(_60["daLastTradingDate"][0],_60["daLastTradingDate"][1]-1,_60["daLastTradingDate"][2],_60["tmLastTradingDayCloseTime"][0],_60["tmLastTradingDayCloseTime"][1],_60["tmLastTradingDayCloseTime"][2]);obj.innerHTML=HS_GetTimeRemainingString2(Math.round((_77.getTime()-_76.getTime())/1000),false);}var obj=getElementByName(_67,"div","detailschart");hs.util.setHedgeletChart(_60,obj,true);}if(_65!=null){_65.style.display="inline";}var _78=415;_62.style.width=_78+"px";_Dialogs.setHandle(_5e.id,_61);_62.style.display="";if(!_5f){_5e.set(true,_78);}}function HS_BuildOrderbook(_79,_7a){if(_79==null||_79.node==null||_7a==null){return;}HS_BuildOrderbook_Refresh(_7a,_79.id);}function HS_BuildOrderbook_Refresh(_7b,_7c,_7d){if(HS_SiteIsInstitutional()){if(isUserLoggedIn){_XMLHTTP.request("/hedgelet/service/quote-depth?out=arrQuoteDepth&hedgeletpath="+escape(_7b),HS_BuildOrderbook_Refresh2,_7c);}else{_XMLHTTP.request("/hedgelet/service/quote-depth?out=arrQuoteDepth&hedgeletpath="+escape(_7b),HS_BuildOrderbook_Fill,_7c);}}else{_XMLHTTP.request("/hedgelet/service/quote-depth?out=arrQuoteDepth&hedgeletpath="+escape(_7b),HS_BuildOrderbook_Fill_Retail,[_7c,_7d]);}}function HS_BuildOrderbook_Refresh2(_7e,_7f){if(isUserLoggedIn){_XMLHTTP.request("/hedgelet/service/institutional-open-order?out=arrOrders",HS_BuildOrderbook_Refresh3,[_7e,_7f]);}else{HS_BuildOrderbook_Fill(_7e,_7f);}}function HS_BuildOrderbook_Refresh3(_80,_81){var _82;if(isUserLoggedIn&&_80.trim().length>0){_82=HS_ExtractArrayByName("arrOrders",_80.trim());if(_82!=null){_82=HS_FormatServiceData(_82);}else{_82=new Array();}}else{_82=new Array();}HS_BuildOrderbook_Fill(_81[0],_81[1],_82);}function HS_BuildOrderbook_Fill(_83,_84,_85){var _86=_Dialogs.find(_84);if(_86==null){return;}var _87=HS_GetElementByID("hsidOrderBookTableTemplate");if(_87==null){_Dialogs.hide(_86.id,true);return;}if(_83.trim().length<=0){_Dialogs.hide(_86.id,true);return;}var _88=HS_ExtractArrayByName("arrQuoteDepth",_83.trim());if(_88!=null){_88=HS_FormatServiceData(_88,null,true);}if(_88==null){_Dialogs.hide(_86.id,true);return;}var _89=HS_GetElementByID("hsidOrderBookTableWidgetRow");var _8a=getElementByName(_89,"table","orderbook_table").cloneNode(true);var _8b=getElementByName(_8a,"tbody","orderbook_tbody");if(_8b==null){_Dialogs.hide(_86.id,true);return;}var _8c=_86.node;HS_SetStyles_DialogShadowedOuter(_8c);_8c.innerHTML="";var _8d=document.createElement("div");HS_SetStyles_DialogShadowedInner(_8d);_8c.appendChild(_8d);_8a.style.width="100%";_8d.appendChild(_8a);var _8e=_86.id+"_handle";var _8f=HS_GetElementByID("hsidOrderBookTableHeaderRow").cloneNode(true);if(_8f!=null){_8f.id="";_8b.appendChild(_8f);var _90=getElementByName(_89,"div","div_menu").cloneNode(true);_90.id=_8e;_90.innerHTML="Order Book - "+_88["stHedgeletSymbol"];var _91=getElementByName(_89,"div","div_menu_links").cloneNode(true);var obj=getElementByName(_89,"a","link_refresh").cloneNode(true);obj.href="javascript:HS_BuildOrderbook_Refresh( '"+_88["stHedgeletPath"]+"', '"+_86.id+"' );";_91.appendChild(obj);var obj=getElementByName(_89,"a","link_close").cloneNode(true);obj.href="javascript:_Dialogs.hide( '"+_86.id+"', true );";_91.appendChild(obj);_90.appendChild(_91);_8f.cells[0].appendChild(_90);}var _8f=HS_GetElementByID("hsidOrderBookTableSubHeaderRow").cloneNode(true);if(_8f!=null){_8f.id="";_8b.appendChild(_8f);if(!isUserLoggedIn){_8f.cells[0].innerHTML="";_8f.cells[6].innerHTML="";}}if(_88[HS_HASHKEY_SUBARRAY+"1"]==null){_88[HS_HASHKEY_SUBARRAY+"1"]=new Array();}if(_88[HS_HASHKEY_SUBARRAY+"2"]==null){_88[HS_HASHKEY_SUBARRAY+"2"]=new Array();}_88[HS_HASHKEY_SUBARRAY+"1"].sort(HS_CompareOrderbookBid);_88[HS_HASHKEY_SUBARRAY+"2"].sort(HS_CompareOrderbookAsk);var _93=new Array();var _94=0;var _95=0;var _96=0;for(var i=0;i<_88[HS_HASHKEY_SUBARRAY+"1"].length;i++){var bid=_88[HS_HASHKEY_SUBARRAY+"1"][i];var _99=0;if(isUserLoggedIn&&typeof _85!="undefined"&&_85!=null&&_85.length>0){for(var j=0;j<_85.length;j++){var _9b=_85[j];if(_9b["stHedgeletPath"]==_88["stHedgeletPath"]){switch(_9b["nOrderType"]){case HS_ORDER_TYPE_BUY:case HS_ORDER_TYPE_SUBSCRIBE:case HS_ORDER_TYPE_BLOCKTRADEBUY:if(HS_GenerateCurrencyN(_9b["cyPrice"])==HS_GenerateCurrencyN(bid["cyBid"])){_99+=_9b["nOpenQuantity"];}break;case HS_ORDER_TYPE_SELL:case HS_ORDER_TYPE_REDEEM:case HS_ORDER_TYPE_BLOCKTRADESELL:break;default:break;}}}}_95+=_99;_94+=bid["nBidSize"];if(i>0){_93.push(new Array("bid",HS_GenerateCurrencyN(bid["cyBid"]),bid["nBidSize"],_94,_99));}else{_93.push(new Array("bid",HS_GenerateCurrencyN(bid["cyBid"]),bid["nBidSize"],-1,_99));}}var _94=0;for(var i=0;i<_88[HS_HASHKEY_SUBARRAY+"2"].length;i++){var ask=_88[HS_HASHKEY_SUBARRAY+"2"][i];var _99=0;if(isUserLoggedIn&&typeof _85!="undefined"&&_85!=null&&_85.length>0){for(var j=0;j<_85.length;j++){var _9b=_85[j];if(_9b["stHedgeletPath"]==_88["stHedgeletPath"]){switch(_9b["nOrderType"]){case HS_ORDER_TYPE_BUY:case HS_ORDER_TYPE_SUBSCRIBE:case HS_ORDER_TYPE_BLOCKTRADEBUY:break;case HS_ORDER_TYPE_SELL:case HS_ORDER_TYPE_REDEEM:case HS_ORDER_TYPE_BLOCKTRADESELL:if(HS_GenerateCurrencyN(_9b["cyPrice"])==HS_GenerateCurrencyN(ask["cyAsk"])){_99+=_9b["nOpenQuantity"];}break;default:break;}}}}_96+=_99;_94+=ask["nAskSize"];if(i>0){_93.push(new Array("ask",HS_GenerateCurrencyN(ask["cyAsk"]),ask["nAskSize"],_94,_99));}else{_93.push(new Array("ask",HS_GenerateCurrencyN(ask["cyAsk"]),ask["nAskSize"],-1,_99));}}if(_93.length>0){_93.sort(HS_CompareOrderbookPrice);var _9d=false;var _9e="";for(var i=0;i<_93.length;i++){var _9f=_93[i];if(!_9d&&_9e.length>0&&_9e!=_9f[0]){var _8f=HS_GetElementByID("hsidOrderBookTableDividerRow").cloneNode(true);if(_8f!=null){_8f.id="";_8b.appendChild(_8f);}_9d=true;}_9e=_9f[0];if(i%2==0){var _8f=HS_GetElementByID("hsidOrderBookTableRow").cloneNode(true);}else{var _8f=HS_GetElementByID("hsidOrderBookTableHighlightRow").cloneNode(true);}if(_8f!=null){_8f.id="";_8b.appendChild(_8f);if(_9f[0]=="bid"){if(_9f[4]>0){var obj=getElementByName(_89,"span","span_owntext").cloneNode(true);_8f.cells[0].appendChild(obj);obj.innerHTML=_9f[4];}else{_8f.cells[0].innerHTML="";}_8f.cells[1].innerHTML=(_9f[3]>0)?_9f[3]:"";_8f.cells[2].innerHTML=_9f[2];}else{_8f.cells[0].innerHTML="";_8f.cells[1].innerHTML="";_8f.cells[2].innerHTML="";}_8f.cells[3].innerHTML=HS_GenerateCurrency4(_9f[1],false);if(_9f[0]=="ask"){_8f.cells[4].innerHTML=_9f[2];_8f.cells[5].innerHTML=(_9f[3]>0)?_9f[3]:"";if(_9f[4]>0){var obj=getElementByName(_89,"span","span_owntext").cloneNode(true);_8f.cells[6].appendChild(obj);obj.innerHTML=_9f[4];}else{_8f.cells[6].innerHTML="";}}else{_8f.cells[4].innerHTML="";_8f.cells[5].innerHTML="";_8f.cells[6].innerHTML="";}}}if(isUserLoggedIn){var _8f=HS_GetElementByID("hsidOrderBookTableFooterRow").cloneNode(true);if(_8f!=null){_8f.id="";_8b.appendChild(_8f);_8f.cells[0].innerHTML=_95;_8f.cells[6].innerHTML=_96;}}}else{var _8f=HS_GetElementByID("hsidOrderBookTableEmptyRow").cloneNode(true);if(_8f!=null){_8f.id="";_8b.appendChild(_8f);_8f.cells[0].innerHTML="Information is unavailable at this time.";}}var _a0=300;_8c.style.width=_a0+"px";_8c.style.display="";_Dialogs.setHandle(_86.id,_8e);_86.set(true,_a0);}var HS_OrderBook_OrderInfo=null;function HS_BuildOrderbook_Fill_Retail(_a1,_a2,_a3){var _a4=_Dialogs.find(_a2[0]);if(_a4==null){return;}var _a5=_a2[1];if(!$$(_a5)){_a5=false;}if(_a1.trim().length<=0){_Dialogs.hide(_a4.id,true);return;}var _a6=HS_ExtractArrayByName("arrQuoteDepth",_a1.trim());if(_a6!=null){_a6=HS_FormatServiceData(_a6,null,true);}if(_a6==null){_Dialogs.hide(_a4.id,true);return;}var _a7=_a4.id+"_handle";var _a8=_a4.node;var _a9=getElementByName(_a8,"td","title");if(_a9!=null){_a9.id=_a7;_a9.style.cursor="move";}var _a9=getElementByName(_a8,"div","title");if(_a9!=null){_a9.innerHTML="Order Book";_a9.style.textAlign="center";_a9.style.marginLeft="12px";_a9.style.marginRight="12px";}var _a9=getElementByName(_a8,"img","link_close");if(_a9!=null){_a9.onclick=new Function("_Dialogs.hide( '"+_a4.id+"', true );");}var _aa=getElementByName(_a8,"img","link_refresh");if(_aa!=null){_aa.onclick=new Function("this.onclick=null;this.style.display=\"none\";HS_BuildOrderbook_Refresh( '"+_a6["stHedgeletPath"]+"', '"+_a4.id+"', true );");}var _ab=getElementByName(_a8,"div","content");if(_ab==null){_Dialogs.hide(_a4.id,true);return;}_ab.innerHTML="";var _ac=hs.ui.getWidget("table","orderbook_table");if(_ac!=null){_ac=_ac.cloneNode(true);_ab.appendChild(_ac);var _ad=getElementByName(_ac,"tbody","orderbook_tbody");if(_ad!=null){var _ae=[];var _af=[];if(_a6[HS_HASHKEY_SUBARRAY+"1"]!=null){_ae=_a6[HS_HASHKEY_SUBARRAY+"1"];}if(_a6[HS_HASHKEY_SUBARRAY+"2"]!=null){_af=_a6[HS_HASHKEY_SUBARRAY+"2"];}_ae.sort(HS_CompareOrderbookBid);_af.sort(HS_CompareOrderbookAsk);var _b0=Math.max(_ae.length,_af.length);if(_b0<=0){var row=hs.ui.getWidget("tr","orderbook_emptyrow");if(row!=null){row=row.cloneNode(true);_ad.appendChild(row);row.cells[0].innerHTML="Information is unavailable<br>at this time.";}}else{var _b2=_a6["stHedgeletName"];if(_a6["nHedgeletType"]==HS_HEDGELET_TYPE_YES){_b2+=" Yes";}else{if(_a6["nHedgeletType"]==HS_HEDGELET_TYPE_NO){_b2+=" No";}}_b2+=" ("+HS_GenerateDateSimple(_a6["daLastTradeDate"])+")";for(var i=0;i<_b0;i++){var bid=null;var ask=null;if(i<_ae.length){bid=_ae[i];}if(i<_af.length){ask=_af[i];}var row=hs.ui.getWidget("tr","orderbook_contentrow");if(row!=null){row=row.cloneNode(true);_ad.appendChild(row);var _b6=0;var _b7=null;var _b8=null;var _b9=null;var _ba=null;var _bb="";var _bc="";if(bid!=null){_b7=bid["nBidSize"];var _bd=bid["cyBid"];if(_a6["nHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){_bd=HS_Futures_ToDisplayPrice2(_bd,_a6["bdUnderlyingFloor"],_a6["bdUnderlyingCap"],_a6["cyPayout"],_a6["bdTickSize"]);}_b8=_bd;if($$(HS_OrderBook_OrderInfo)){_bb="HS_OrderBook_OrderInfo( true, \""+_a6["stHedgeletPath"]+"\", \""+_b2+"\", "+HS_GenerateCurrencyN(_b8)+", "+_b7+", "+_a6["nHedgeletType"]+", \""+_a6["bdUnderlyingFloor"]+"\", \""+_a6["bdUnderlyingCap"]+"\", \""+_a6["cyPayout"]+"\", \""+_a6["bdTickSize"]+"\" );";}}if(ask!=null){_b9=ask["nAskSize"];var _bd=ask["cyAsk"];if(_a6["nHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){_bd=HS_Futures_ToDisplayPrice2(_bd,_a6["bdUnderlyingFloor"],_a6["bdUnderlyingCap"],_a6["cyPayout"],_a6["bdTickSize"]);}_ba=_bd;if($$(HS_OrderBook_OrderInfo)){_bc="HS_OrderBook_OrderInfo( false, \""+_a6["stHedgeletPath"]+"\", \""+_b2+"\", "+HS_GenerateCurrencyN(_ba)+", "+_b9+", "+_a6["nHedgeletType"]+", \""+_a6["bdUnderlyingFloor"]+"\", \""+_a6["bdUnderlyingCap"]+"\", \""+_a6["cyPayout"]+"\", \""+_a6["bdTickSize"]+"\" );";}}var _be=getElementByName(row.cells[_b6],"div","content");if(_be!=null){var obj=hs.ui.getWidget("a","link");if(obj!=null){obj=obj.cloneNode(true);_be.appendChild(obj);obj.href="javascript:"+_bb+";";if(bid!=null){obj.innerHTML=_b7;}else{obj.innerHTML="&nbsp;";}}}_b6++;var _be=getElementByName(row.cells[_b6],"div","content");if(_be!=null){var obj=hs.ui.getWidget("a","link");if(obj!=null){obj=obj.cloneNode(true);_be.appendChild(obj);obj.href="javascript:"+_bb+";";if(bid!=null){obj.innerHTML=HS_GenerateCurrency(_b8);}else{obj.innerHTML="&nbsp;";}}}_b6++;_b6++;var _be=getElementByName(row.cells[_b6],"div","content");if(_be!=null){var obj=hs.ui.getWidget("a","link");if(obj!=null){obj=obj.cloneNode(true);_be.appendChild(obj);obj.href="javascript:"+_bc+";";if(ask!=null){obj.innerHTML=HS_GenerateCurrency(_ba);}else{obj.innerHTML="&nbsp;";}}}_b6++;var _be=getElementByName(row.cells[_b6],"div","content");if(_be!=null){var obj=hs.ui.getWidget("a","link");if(obj!=null){obj=obj.cloneNode(true);_be.appendChild(obj);obj.href="javascript:"+_bc+";";if(ask!=null){obj.innerHTML=_b9;}else{obj.innerHTML="&nbsp;";}}}_b6++;}}}}}if(_aa!=null){_aa.style.display="inline";}var _c0=188;_a8.style.width=_c0+"px";_Dialogs.setHandle(_a4.id,_a7);_a8.style.display="";if(!_a5){_a4.set(true,_c0);}}function HS_BuildTimeAndSales(_c1,_c2){if(_c1==null||_c1.node==null||_c2==null){return;}HS_BuildTimeAndSales_Refresh(_c2,_c1.id);}function HS_BuildTimeAndSales_Refresh(_c3,_c4){_XMLHTTP.request("/hedgelet/service/time-and-sales?out=arrTimeAndSales&hedgeletpath="+escape(_c3),HS_BuildTimeAndSales_Fill,_c4);}function HS_BuildTimeAndSales_Fill(_c5,_c6){var _c7=_Dialogs.find(_c6);if(_c7==null){return;}var _c8=HS_GetElementByID("hsidTimeAndSalesTableTemplate");if(_c8==null){_Dialogs.hide(_c7.id,true);return;}if(_c5.trim().length<=0){_Dialogs.hide(_c7.id,true);return;}var _c9=HS_ExtractArrayByName("arrTimeAndSales",_c5.trim());if(_c9!=null){_c9=HS_FormatServiceData(_c9,null,true);}if(_c9==null){_Dialogs.hide(_c7.id,true);return;}var _ca=HS_GetElementByID("hsidTimeAndSalesTableWidgetRow");var _cb=getElementByName(_ca,"table","timeandsales_table").cloneNode(true);var _cc=getElementByName(_cb,"tbody","timeandsales_tbody");if(_cc==null){_Dialogs.hide(_c7.id,true);return;}var _cd=_c7.node;HS_SetStyles_DialogShadowedOuter(_cd);_cd.innerHTML="";var _ce=document.createElement("div");HS_SetStyles_DialogShadowedInner(_ce);_cd.appendChild(_ce);_cb.style.width="100%";_ce.appendChild(_cb);var _cf=_c7.id+"_handle";var _d0=HS_GetElementByID("hsidTimeAndSalesTableHeaderRow").cloneNode(true);if(_d0!=null){_d0.id="";_cc.appendChild(_d0);var _d1=getElementByName(_ca,"div","div_menu").cloneNode(true);_d1.id=_cf;_d1.innerHTML="Time & Sales - "+_c9["stHedgeletSymbol"];var _d2=getElementByName(_ca,"div","div_menu_links").cloneNode(true);var obj=getElementByName(_ca,"a","link_refresh").cloneNode(true);obj.href="javascript:HS_BuildTimeAndSales_Refresh( '"+_c9["stHedgeletPath"]+"', '"+_c7.id+"' );";_d2.appendChild(obj);var obj=getElementByName(_ca,"a","link_close").cloneNode(true);obj.href="javascript:_Dialogs.hide( '"+_c7.id+"', true );";_d2.appendChild(obj);_d1.appendChild(_d2);_d0.cells[0].appendChild(_d1);}var _d0=HS_GetElementByID("hsidTimeAndSalesTableSubHeaderRow").cloneNode(true);if(_d0!=null){_d0.id="";_cc.appendChild(_d0);}if(_c9[HS_HASHKEY_SUBARRAY].length>0){for(var i=0;i<_c9[HS_HASHKEY_SUBARRAY].length;i++){if(i>20){break;}var _d5=_c9[HS_HASHKEY_SUBARRAY][i];if(i%2==0){var _d0=HS_GetElementByID("hsidTimeAndSalesTableRow").cloneNode(true);}else{var _d0=HS_GetElementByID("hsidTimeAndSalesTableHighlightRow").cloneNode(true);}if(_d0!=null){_d0.id="";_cc.appendChild(_d0);var tm=new Array(_d5["dtTradeDateTime"][3],_d5["dtTradeDateTime"][4],_d5["dtTradeDateTime"][5],_d5["dtTradeDateTime"][6],_d5["dtTradeDateTime"][7]);var _d7=HS_GenerateDate3(_d5["dtTradeDateTime"])+"&nbsp;"+HS_GenerateTime(tm,true);var _d8=_d5["nTradeSize"];var _d9=HS_GenerateCurrency(_d5["cyTradePrice"]);if(_d5["isBlockTrade"]){var obj=getElementByName(_ca,"span","span_owntext").cloneNode(true);_d0.cells[0].appendChild(obj);obj.innerHTML=_d7;var obj=getElementByName(_ca,"span","span_owntext").cloneNode(true);_d0.cells[1].appendChild(obj);obj.innerHTML=_d8;var obj=getElementByName(_ca,"span","span_owntext").cloneNode(true);_d0.cells[2].appendChild(obj);obj.innerHTML=_d9+" (BT)";}else{_d0.cells[0].innerHTML=_d7;_d0.cells[1].innerHTML=_d8;_d0.cells[2].innerHTML=_d9;}}}}else{var _d0=HS_GetElementByID("hsidTimeAndSalesTableEmptyRow").cloneNode(true);if(_d0!=null){_d0.id="";_cc.appendChild(_d0);_d0.cells[0].innerHTML="Information is unavailable at this time.";}}var _da=290;_cd.style.width=_da+"px";_Dialogs.setHandle(_c7.id,_cf);_c7.set(true,_da);}function HS_BuildNotification(_db,_dc){if(_db==null||_db.node==null||_dc==null){return;}var _dd=_db.node;HS_SetStyles_DialogShadowedOuter(_dd);_dd.innerHTML="";var _de=document.createElement("div");HS_SetStyles_DialogShadowedInner(_de);_de.style.padding="0px";_de.style.backgroundColor="#E1FBFF";_dd.appendChild(_de);_de.onclick=new Function("_Dialogs.hide( '"+_db.id+"', true );");var _df=document.createElement("div");_df.style.marginLeft="30px";_df.style.marginRight="30px";_df.style.marginTop="15px";_df.style.marginBottom="15px";_df.style.textAlign="center";_df.style.fontSize="12px";_de.appendChild(_df);_df.innerHTML=_dc;_dd.style.width="300px";_db.set();}function HS_Manage_WatchList_Callback(){var _e0=window.frames["watchlist_iframe"];if(_e0==null){return;}if(typeof _e0.HS_Submit!="undefined"&&_e0.HS_Submit!=null){_e0.HS_Submit();}}function HS_Manage_WatchList_Result(str,_e2,_e3){if(HS_SiteIsInstitutional()){var _e4=_Dialogs.add(HS_BuildNotification,str,true,false);_Dialogs.show(_e4,null);}else{if((typeof _e2!="undefined"&&_e2!=null&&_e2)||typeof _e3=="undefined"||_e3==null||_e3.length<=0||_e3=="add"){if(typeof strBoundingID!="undefined"||strBoundingID!=null||strBoundingID.length>0){hs.ui.showNotification("Watchlist",str,$(strBoundingID));}else{hs.ui.showNotification("Watchlist",str,$("hsidHSRetailContentMain"));}}}}var strBoundingID=null;function HS_AddToWatchlist(_e5,_e6,_e7){if(!isUserLoggedIn){return;}strBoundingID=_e7;var _e8=window.frames["watchlist_iframe"];if(_e8==null){return;}_e8.location.replace("/i/trading/watchlists/manage/?a=add&hedgeletpath="+escape(_e5)+"&hedgeletname="+escape(_e6));}function HS_RemoveFromWatchlist(_e9,_ea){if(!isUserLoggedIn){return;}if(typeof _ea!="undefined"&&_ea!=null&&_ea.length>0){var _eb=window.frames["watchlist_iframe"];if(_eb==null){return;}_eb.location.replace("/i/trading/watchlists/manage/?a=delete&hedgeletpath="+escape(_e9)+"&hedgeletname="+escape(_ea));}else{var _ec=location.pathname;var _ed=new HS_Form("","hsidDeleteWatchListForm","/hedgelet/service/delete-watchlist-form");if(HS_SiteIsInstitutional()){_ed.setForward("forward_success","/i/trading/watchlists/");}else{_ed.setForward("forward_success","/trade/watchlist/");}_ed.setForward("forward_fail",_ec);_ed.setForward("forward_authenticationFail","/login/login.html");_ed.setForward("forward_authorizationFail","/login/login.html");_ed.setForward("forward_secureAccessFail","/login/login.html");_ed.setForward("forward_backendFail",_ec);_ed.setForward("forward_formSequenceFail",_ec);_ed.setForward("forward_formIDInvalid",_ec);_ed.updateField("deleteHedgeletPathItem",_e9);_ed.submit(true);}}function IncludeAssetContentFile(){var _ee=HS_CheckAssetSelection("",true);var _ef=HS_CheckHedgeletSelection("");var str=null;if(_ee){str="";}else{if(_ef){var arr=HS_GetCookie(HS_COOKIE_HEDGELET,HS_HEDGELET_HEDGELETPATH).split(".");if(arr.length>2){str=arr[2];}}}if(str!=null){HS_IncludeContentJS(str);}}function HS_BuildAssetRightRail(_f2,_f3){if(typeof _f2=="undefined"||_f2==null||_f2.length<=0){return;}var _f4="";var _f5=[];if(typeof assetSnippet!="undefined"&&assetSnippet!=null&&assetSnippet.length>0){_f4=assetSnippet;}else{if(typeof _f3!="undefined"&&_f3!=null&&_f3){_f4="Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text";}}if(typeof newsLink!="undefined"&&newsLink!=null&&newsLink.length>0){_f5=newsLink;}else{if(typeof _f3!="undefined"&&_f3!=null&&_f3){for(var i=0;i<5;i++){_f5.push(["Link "+(i+1),"www.hedgestreet.com"]);}}}if(_f4.length>0){var obj=$("hsidHSRetailContentRight");if(obj!=null){var _f8=hs.ui.getWidget("div","rightrailblock");if(_f8!=null){_f8=_f8.cloneNode(true);obj.appendChild(_f8);var _f9=getElementByName(_f8,"div","title");if(_f9!=null){_f9.innerHTML="About "+_f2+" Contracts";}var _f9=getElementByName(_f8,"div","body");if(_f9!=null){_f9.innerHTML=_f4;}}}}if(_f5.length>0){var obj=$("hsidHSRetailContentRight");if(obj!=null){var _f8=hs.ui.getWidget("div","rightrailblock");if(_f8!=null){_f8=_f8.cloneNode(true);obj.appendChild(_f8);var _f9=getElementByName(_f8,"div","title");if(_f9!=null){_f9.innerHTML="Learn More about "+_f2;}var _f9=getElementByName(_f8,"div","body");if(_f9!=null){for(var i=0;i<_f5.length;i++){var _fa=hs.ui.getWidget("div","rightrailblock_link");if(_fa!=null){_fa=_fa.cloneNode(true);_f9.appendChild(_fa);var _fb=getElementByName(_fa,"a","link");if(_fb!=null){_fb.href=_f5[i][1];_fb.target="_blank";_fb.innerHTML=_f5[i][0];}}}}}}}}function HS_BuildAssetInfo(_fc){if(typeof _fc=="undefined"||_fc==null||_fc.length<=0){return;}var obj=$("hsidNewsBlock");if(obj!=null){while(obj.childNodes.length>0){try{obj.removeChild(obj.childNodes[0]);}catch(e){}}var _fe=HS_GetElementByID("hsidNewsBlockDiv");if(_fe!=null){_fe=_fe.cloneNode(true);obj.appendChild(_fe);var _ff=getElementByName(_fe,"div","title");if(_ff!=null){_ff.innerHTML="News and Research";}var _ff=getElementByName(_fe,"div","body");if(_ff!=null){for(var i=0;i<_fc.length;i++){var obj4=HS_GetElementByID("hsidNewsBlockLink");if(obj4!=null){obj4=obj4.cloneNode(true);_ff.appendChild(obj4);var obj5=getElementByName(obj4,"a","linknews");if(obj5!=null){obj5.href=_fc[i][1];obj5.target="_blank";obj5.innerHTML=_fc[i][0];}}}}}}}function HS_UpdateAssetUnderlyingQuote(_103,arr){if(typeof arr=="undefined"||arr==null){return;}var _105=hs.util.getUnderlyingDetailMessage2(arr);var _106=arr["stUnderlyingAssetPrice"];if(!$$s(_106)){_106=arr["stUnderlyingAssetPrice"];}var _107=_105.source;if(!$$s(_107)){_107=_103;}var _108=_105.dt;var obj=$("hsidUnderlyingQuoteBox");if(obj!=null){var _10a=getElementByName(obj,"span","underlyingquote");var _10b=getElementByName(obj,"span","underlyingquote_time");if($$s(_106)&&$$s(_107)&&$$(_108)){if($$(_10a)){_10a.innerHTML=_107+" last traded at:&nbsp;"+_106+"&nbsp;- "+HS_GenerateDateTime4(_108,true);}}else{if($$(_10a)){_10a.innerHTML="&nbsp;";}}}}
	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(){}};
	var _Glossary={"term":"definition","Account Number":"The number that identifies your relationship with HedgeStreet. Your account number is sent to you via email once you have completed the account application process. Your account number is also found on the My HedgeStreet tab after you have logged in. ","ACH (Automatic Clearing House Network)":"A nationwide electronic funds transfer network that enables participating financial institutions to distribute electronic credit and debit entries to bank accounts and to settle such entries. Any withdrawals from a HedgeStreet account will be done via ACH. ","Action":"The Select button allows you to select a Contract in the trading console below.","Amount":"The total amount of a transaction.","Available Cash":"Cash in your account which can be used either for trading purposes or cash withdrawals.","Ask":"The Contract price associated with a sell order. This is the price at which HedgeStreet members are willing to sell a Contract, making it the price at which other members can buy the contract.","Buyer Payout":"The amount the buyer receives as a result of the expiration value of the underlying at settlement. For Binaries, the buyer payout is either $0 or $10; for Futures, the buyer payout is between $0 and $50 (depending on the contract size of the Futures Contract).","Available Cash":"Cash in your account which can be used for trading purposes or cash withdrawals. ","Bid":"The price associated with a buy order. This is the price at which HedgeStreet members are willing to buy a Contract, making it the price at which other members can sell the contract.","Buy":"The act of purchasing a Contract. If you are logged in, this button/link directs you to the Place Order page. If you are not logged in, this link directs you to a login/open-account page. ","Buy Downside":"The maximum amout of money you could lose by buying at your entered quantity and price","Buy Order":"A bid to buy a specified quantity of Contracts at a specified price. (To place a buy order, a trader must have sufficient funds in his/her Available Cash account to cover the entire cost of the order if it is executed.) ","Buy Upside":"The maximum amout of money you could make by buying at your entered quantity and price","Callable Contracts":"A Contract in which the expiration date is contingent on a specified occurrence, rather than a predetermined time. When the specified occurrence happens, it yields the payout criteria for determining the settlement value of the Contract. The Contract will then be \"called\" into expiry. ","Cancel":"A link on the Open Orders page that allows a member to remove an existing open order from HedgeStreet. ","Cash":"A value on the Positions page indicating the Available Cash in your account that can be used for trading purposes or cash withdrawals. ","Cash Required":"The total cash associated with acquiring a particular Contract position.","Cash Required to Trade":"The per contract cost associated with acquiring a particular Contract position for a buyer or seller.","Change":"The daily percent change of the Contract.","Chart":" A graphical display of a Contract and the underlying market over the course of a defined period. You can view charts containing the current day's data (1-day), the week's data (5-day), the month's data (30 days) or All data for a longer term perspective. The Contract price data (displayed in blue) are the average of the latest bid and ask prices, generated periodically. For Assets with a ticking underlying, the market data (displayed in green) for the day and week charts are the intraday futures and spot prices. The market data for all other assets and chart durations are the expiration values of the underlying each day, as determined by the respective HedgeStreet Settlement Source Agency.","Clearing":"The daily financial settlement of transactions, including payouts and fees, for HedgeStreet and its members. ","Close":"The last price at which a particular Contract was traded on a given day. ","Closing Transaction":"An order placed by a trader to reduce or eliminate a Contract position. ","Commodity Futures Trading Commission (CFTC)":"The Federal regulatory agency responsible for monitoring the activities within the commodity futures and options industry in much the same way the Securities and Exchange Commission (SEC) regulates the securities industry. HedgeStreet is a designated contract market and clearing organization regulated by the CFTC. For more information, visit www.cftc.gov. ","Confirmation Code":"A unique alphanumeric code electronically sent to the user as part of the account creation process. This confirmation code, which serves as the electronic signature of the member applicant, must be entered by the applicant to finalize the creation of an account in order to become a member. ","Cost":"The amount paid by the trader when any portion of an order is executed (not including applicable fees). ","Cost Basis":"The amount a trader paid for a particular Contract (unit cost basis) or a Contract position (total cost basis). ","Country of Residence":"The country of which you are a legal resident. Currently, HedgeStreet only permits legal residents (both individuals and entities) of the United States with an account at a United States financial institution to apply for membership. ","Current Value":"The current value for a Contract. Current value is the average of the current inside Sell At and Buy At prices for the Contract. If a Sell At and Buy At price is unavailable, HedgeStreet uses the last traded price for the Contract. HedgeStreet displays the current value for the long position. To calculate the current value for the short position for a Binary, subtract the current value from $10; to calculate the current value for the short position for a Futures Contract, subtract the current value from the Contracts contract size ($0-$50).","Daily High":"The highest trade price achieved during the day for a particular Contract.","Daily Low":"The lowest trade price achieved during the day for a particular Contract.","Date/Time":"The date and time an order or transaction was recorded by HedgeStreet.","Description":"A detailed description for a particular transaction.","Discount":"The amount a Contract value is trading under its corresponding Asset value. For example, if a Gold $400 to $410 (2 Dec 05) Variable Long Contract is trading at $5, and Gold is trading at $408, there is a discount of $3. Differences between Contract values and Asset values are created by market forces and the time-value of Contracts. ","Dollar Multiplier":"The monetary amount by which the rate, level, amount, measure, or other value of the underlying of a Variable Contract is multiplied to determine the Settlement Value. ","Electronic Check":"An Electronic Check is an online service that allows you to deposit funds with a paper check via the Internet. You can deposit up to $10,000 with each electronic check. ","Electronic Signature":"As a completely Internet-based contract market, HedgeStreet requests that applicants sign certain documents via electronic signature. An electronic signature is a sound, symbol or process used to sign enforceable contracts as well as other types of documents. Signing a document with an electronic signature is the legal equivalent to signing a document with pen and paper. When you complete the initial application on the HedgeStreet website, HedgeStreet will assign you a unique alphanumeric signature code and send that code to your registered email address. You will then be required to input that code as your electronic signature. HedgeStreet will confirm as to whether or not you agree to sign the application and agreement by electronic means. HedgeStreet will then store the receipt of your unique electronic signature along with your confirmation that you acknowledged and agreed to sign the membership application. HedgeStreet will follow the same procedure for each authorized representative designated by an entity applicant. ","Entity":"A business/legal body (other than an individual) that may open a HedgeStreet account, such as a Trust, Corporation, Limited Liability Company (LLC), Partnership or Sole Proprietorship. ","Estimated Cash Required":"The estimated cash associated with acquiring a particular Contract position.","Expiration Value":"The value of an asset at expiration. The Underlying Expiration Value is used to determine the payout for buyers and sellers","Fee":"A charge assessed to members for activities on HedgeStreet. (For a list of current fees, please refer to the Fee Schedule)","Final Results":"Contracts that have been settled and cleared.","Contract":"A Contract is a small financial contract between a Buyer and a Seller, based on an underlying asset (such as Oil or Gold), or an underlying economic event (such as an increase in the Fed Funds rate).These inexpensive financial contracts are designed by HedgeStreet and traded exclusively on the HedgeStreet Exchange. Traders take a position on the degree and direction of price movements or the outcome of an economic event by buying and selling Contracts that represent what they believe will occur. If the outcome the trader predicted occurs, they receive a pre-defined payout per contract.","Contract Pair":"The combination of opposing Yes and No Contracts. For example, Gasoline > $2.125 Yes (2 Dec 05) and Gasoline > $2.125 No (2 Dec 05) constitute a Contract Pair. ","Contract Position":"The number of Contracts held by a trader. A trader who does not hold any Contracts has \"no position\". ","Hedging":"The act of sheltering oneself from uncertainty by investing in a financial instrument that will offset monetary losses in the event of a specific outcome. ","Hypothetical Performance":"Hypothetical performance results have many inherent limitations, some of which are described below. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown. In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. One of the limitations of hypothetical performance results is that they are generally prepared with the benefit of hindsight. In addition, hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk in actual trading. For example, the ability to withstand losses or to adhere to a particular trading program in spite of trading losses are material points which can also adversely affect actual trading results. There are numerous other factors related to the markets in general or to the implementation of any specific trading program which cannot be fully accounted for in the preparation of hypothetical performance results and all of which can adversely affect actual trading results. ","In-the-Money Contract":"A Contract for which the payout criteria is determined to have been met at Settlement. ","Last Trade":"The last price at which a particular Contract was traded.","Last Bid":"The last buy price (bid) for a particular Contract on a given day. ","Last Offer":"The last sell price (ask) for a particular Contract on a given day. ","Last Trade":"The last price at which a particular Contract was traded. ","Login":"The process of accessing a HedgeStreet account, by entering the proper username and password, in order to view account information or trade on HedgeStreet. ","Logout":"The process of ending access to a HedgeStreet account. The user must log in again to view account information or trade on HedgeStreet. ","Long":"On HedgeStreet, \"long\" refers to a Variable Contract position that increases in value as the underlying asset increases, and decreases in value as the underlying asset decreases. ","Market":"On HedgeStreet, a market is a grouping of related Contracts. Examples of markets include \"Finance\" and \"Real Estate\". For a list of current markets, refer to the Contracts page. ","Market Value":"The total value of a Contract position in the market. Market Value represents the cash that would be obtained if the entire Contract position were liquidated at the Current Value price.","Maturity":"For Contracts, maturity is the same as Expiration. ","National Futures Association (NFA)":"A self-regulatory organization whose members include Futures Commission Merchants (FCM), Commodity Pool Operators (CPO), Commodity Trading Advisors (CTA), Introducing Brokers (IB), contract markets, commercial firms, and banks. The NFA is responsible-under CFTC oversight-for certain aspects of the regulation of FCMs, CPOs, CTAs, IBs, and their registered employees. The primary focus of the NFA includes monitoring the qualifications and proficiency, financial condition, retail sales practices, and business conduct of these futures professionals. NFA also performs arbitration and dispute resolution functions for industry participants. HedgeStreet has contracted with National Futures Association (\"NFA\") to assist with the surveillance of the HedgeStreet market including conducting trade practice and market surveillance on trading and order data, reviewing data for any trade or market inconsistencies or exceptions and notifying HedgeStreet if any investigation is warranted. For more information, please visit www.nfa.futures.org. ","Non-Intermediated":"The absence of an agent, broker, or financial institution who acts as a middle person between an individual and a market. ","Offer":"An order to sell a specified number of Contracts at a specified price per Contract. Offers are shown in the Ask column of the Order Book. A trade occurs when another trader places a buy order at or above the Offer price. ","Open":"The first price at which a particular Contract was traded on a given day. ","Open Interest":"The total number of Contracts that have been purchased, but have not yet expired and settled (i.e., the total number of outstanding Contracts that are owned by participants in the market).","Open Order":"A buy or sell order (Bid or Ask) that has been placed, but has not yet been filled (executed). ","Opening Trade Value":"The rate, level, amount, measure, or other value of the underlying of a Variable Contract at which a Contract position is opened in a member account. ","Opening Transaction":"An order placed by a trader to establish or increase a Contract position. ","Order Book":"On HedgeStreet, the order book provides a gauge of liquidity by displaying the best bids and ask prices for each Contract and the associated quantities. ","Order Number":"A unique numeric code assigned to each buy or sell order placed on HedgeStreet. ","Out-of-the Money Contract":"A Contract for which the payout criteria is not determined to have been met at settlement. ","P & L":"The total profit or loss for a Contract position. P&L is calculated as the difference between what you paid to acquire the specific Contract position (Cash Required) and the current Market Value of that position.","Par":"The amount a Contract value is trading under its corresponding Asset value. For example, if a Gold $400 to $410 (2 Dec 05) Variable Long Contract is trading at $5, and Gold is trading at $407, there is a par of $2. Differences between Contract values and Asset values are created by market forces and the time-value of Contracts. ","Password":"A code that must be entered along with a username when logging into an account. Your HedgeStreet password can be between 6 and 8 alphanumeric characters (letters and/or digits), is case-sensitive, must start with a letter, and must include at least one digit (number). ","Pending Deposits":"Deposits that HedgeStreet are currently processing, but have not cleared. Most deposits take 10 business days to clear. Once deposits are cleared, they are displayed in Available Cash. ","Pending Final Result":"Contracts which have concluded trading and are pending the final expiration value to determine the payout value.","Pending Withdrawals":"Withdrawals that HedgeStreet are currently processing. After the withdrawal is processed, your Available Cash will be reduced by the amount of the withdrawal. Funds withdrawn from HedgeStreet will transfer to your bank account within approximately 2-3 business days. ","Positions":"The Contracts you currently hold. The Positions page displays your current Contract positions, plus information relating to those positions such as current price, quantity, cost basis, P&L, market value, and total portfolio value. You must be logged in to access this page. ","Potential Gain":"The maximum amount of profit a trader can make if an order is executed (completely filled) and the Contracts in the order settle at the highest possible settlement value. (For all Contract types, the highest possible settlement value is $10.) ","Potential Loss":"The maximum amount of money a trader could lose if an order is executed (completely filled) and the Contracts in the order settle at the lowest possible settlement value. (For all Contract types, the lowest possible settlement value is $0; therefore, the potential loss always equals the amount invested.) ","Premium":"The amount a Contract value is trading over its corresponding Asset value. For example, if a Gold $400 to $410 (2 Dec 05) Variable Long Contract is trading at $5, and Gold is trading at $402, there is a premium of $3. Differences between Contract values and Asset values are created by market forces and the time-value of Contracts. ","Price":"The per Contract price associated with an order.","Principal":"The total principal amount associated with a transaction.","Privacy Policy":"A legal statement indicating the conditions under which HedgeStreet will or will not reveal personal information about users. HedgeStreet only shares member information in accordance with federal and state privacy laws. To view the complete HedgeStreet Privacy Policy, click here. ","Quantity":"The number of a Contracts. Quantities associated with sells are denoted by a negative (-) number.","Quantity To Trade":"The number of Contracts you want to buy or sell.","Range":"The difference between the Cap and Floor specified for a Variable Contract. For example, the Gasoline $2.10 to $2.20 (2 Dec 05) Variable Contract has a range of 0.10 (2.20-2.10). Within the range, a trader owning a long position on a Variable Contract receives a pre-defined dollar amount for every point above the entry price the underlying moves, or loses the same amount for every point below the entry price the underlying moves. A trader with a short position on a Variable Contract receives a pre-defined dollar amount for every point below the entry price the underlying moves, or loses the same amount for every point above the entry price the underlying moves. ","Redemption (Redeem)":"Selling a Contract Pair (\"selling both\" Yes and No Contracts) to HedgeStreet for $10, less a fee. ","Redemption Fee":"The fee charged by HedgeStreet when a Binary Pair is redeemed. (For a list of current fees, please refer to the Fee Schedule). ","Refresh":"Re-displays the current page with updated content. ","Remaining":"The portion of an order which has not yet been filled, measured in the number of Contracts left to be purchased or sold.","Result":"Contracts that are pending settlement.","Running Balance":"Your available cash account balance inclusive of all executed transactions, including settled deposits, withdrawals, filled orders, interest paid to HedgeStreet members and HedgeStreet fees. The balance represents the current amount in your account that can be used for trading purposes or withdrawals. ","Sell":"The act of offering a Contract for sale. If you are logged in, this button/link directs you to the Place Order page. If you are not logged in, this link directs you to a login/open-account page. ","Sell Downside":"The maximum amout of money you could lose by selling at your entered quantity and price","Sell Order":"An offer to sell a specified quantity of Contracts at a specified price. To place a sell order for Binaries, the trader must own the specified number of Contracts. ","Sell Upside":"The maximum amout of money you could make by selling at your entered quantity and price","Seller Payout":"The amount the seller receives as a result of the expiration value of the underlying at settlement. For Binaries, the seller payout is either $0 or $10; for Futures, the seller payout is between $0 and $50 (depending on the contract size of the Futures Contract).","Settled Deposits":"Funds deposited into your HedgeStreet account that have been approved and are available for trading. ","Settlement":"The process of assigning a settlement value (a payout amount) to expired Contracts by determining whether the payout criterion of the contract has been met. During settlement, all expired Contracts are closed and payout is made to the appropriate member accounts. ","Settlement Fee":"The amount deducted by HedgeStreet as its fee for settlement services when a payout is made during settlement. ","Short":"On HedgeStreet, \"short\" refers to a Variable Contract position that increases in value as the underlying asset decreases and decreases in value as the underlying asset increases. ","Speculating":"Taking a position on an uncertain outcome in anticipation of making a profit, but with the risk of taking a loss. ","Spot Contracts":"Contracts with a short-term maturity (or lifetime) not exceeding a 48 hour period (also known as Spot \"Daily\" Contracts). ","SSN":"Social Security Number. ","Tick Size":"The increment by which order prices can be entered. For Binaries, the tick size is shown in US dollars (i.e. $.50 or $.05); for Futures, the tick size is shown in terms of the underlying asset price (i.e. .0001 for EUR/USD or $.01 for Gold).","Time Stamp":"Date and time of the content displayed on a HedgeStreet web page. Clicking the Refresh link will update this information. The time stamp is located at the top right corner of each page. ","Time Remaining":"The period of time, represented in days, hours, and minutes, left until a contract is no longer available for trading. It is calculated by comparing the Last Trading Day and time for a given Contract with the current time stamp on HedgeStreet. For example, if the current time stamp for a Contract is December 29, 2005 4:37:33 PM ET, and the last trading day is 30 Dec 05 8:00PM ET, the time remaining would be 1 day, 3 hours, 22 minutes.","Total Account Value":"The total value of the account, given current Contract positions. Total Account Value is the sum of both the Market Value and Available Cash.","Total Cost":"The total amount paid by the trader, including any applicable fees, when any portion of an order is executed.","Total Cost Basis":"The total amount a trader paid for a Contract position, calculated as the average price paid per Contract (unit cost basis) multiplied by the quantity. For Short Variable Contracts, the total cost basis is $10 - unit cost basis multiplied by the quantity. ","Trade Number":"A numerical code assigned to each executed trade on HedgeStreet. ","Traded At":"The unit price for a particular Contract (i.e. the price paid per Contract to acquire a specific Contract position). If the Contracts is acquired at different times, and therefore at different prices, the Traded At price shown is the average price paid per contract for the entire position. For Futures, the value of the underlying associated with the calculated Traded At price for the Contract is shown. HedgeStreet always displays the Traded At price for the long position. For Short positions, the Traded At price shown would be the unit price at which you sold the Contract.","Trading Fee":"A fee charged to members to trade on HedgeStreet. For a current list of fees, please refer to the Fee Schedule. ","Type":"A type of transaction or order, for example, buy or sell.","Underlying":"The last underlying value reported for the underlying asset, for example, the price of Oil.  For Currencies, this value is the midpoint (midquote) value derived from the Bid/Ask spread. The midquote is calculated by first adding the Bid & Ask prices together and then dividing the resulting number by 2 in order to derive the mean.  Using the EUR/USD as an example, if the Bid is 1.3110 and the Ask is 1.3114, the resulting midpoint is 1.3112 [(1.3110 + 1.3114)/2 = (2.6224)/2 = 1.3112].","Unit Cost Basis":"The average price a trader paid for particular Contracts. For Short Variable Contracts, the unit cost basis is ($10 - unit cost basis). ","Unrealized P&L":"An \"unrealized\" profit or loss is one that has not actually occurred, but would occur if a specified transaction were to take place. ","Username":"An alias identifying an account, chosen by the account owner. Your HedgeStreet username can be between 6 and 15 alphanumeric characters (letters and/or digits). The username cannot be changed once the account has been opened. ","Vol./Open Interest":"The Daily Volume (quantity of Contracts that have been traded in a given day) and Open Interest (the total number of outstanding Contracts that are owned by participants in the market) of a Contract.","W-9":"An IRS Form that requires you to certify under penalty of perjury that your social security number is correct and that you are not subject to backup withholding. HedgeStreet requires that each member, both individuals and entities, complete this form when opening an account. ","Wire Transfer":"An electronic transfer of funds from an account at one financial institution to an account at another financial institution. "};
	function HS_UpdatePositionTable(_1){_1=HS_FormatServiceData(_1);var _2=_1[0]["cyAvailableCash"]?_1[0]["cyAvailableCash"]:0;var _3=_1[0]["cyTotalCash"]?_1[0]["cyTotalCash"]:0;var _4=HS_GetElementByID("hsidPositionsTableMain");var _5=_1[0][HS_HASHKEY_SUBARRAY];_5.sort(HS_ComparePositions_New);var _6=0;var _7;var _8="";var _9;if(_5.length<=0||_4==null){HS_HideElementById("hsidPositionsTableC");HS_HideElementById("footer_c");HS_ShowElementById("hsidNoResults");}var _a=HS_CalculatePositions(_5,0);var _b=_a[0];var _c=_a[1];var _d=_a[2];var _e="";var _f="";var _9,arrTemp;var _7;if(_b.length>0){if(_SessionState["isUserLoggedIn"]){if(_SessionState["ecAcctRole"]==ACCOUNT_ROLE_MEMBER_ONHOLD){var _10=$("hsidWarningDialog");var _11=null;if(_10!=null){_11=HS_GetElementByID("hsidWarningContent");}var _12=document.createElement("div");hs.error.initialize(_10,_11,_12);if(_SessionState["isAcctPrivileged"]){hs.error.showDirect(ACCOUNT_ROLE_MEMBER_ONHOLD_WITH_PRIVILEGES_WARNING,true);}else{hs.error.showDirect(ACCOUNT_ROLE_MEMBER_ONHOLD_WARNING,true);}}}}if(_4!=null){if(_5.length>0){_7=HS_GetElementByID("hsidPositionsTableHeaderRow");if(_7!=null){var obj=getElementByName(_7,"a","hedgelet");if(obj!=null){hs.ui.linkHelp(obj,"Contract");}var obj=getElementByName(_7,"a","currentvalue");if(obj!=null){hs.ui.linkHelp(obj,"Current Value");}var obj=getElementByName(_7,"a","quantity");if(obj!=null){hs.ui.linkHelp(obj,"Quantity");}var obj=getElementByName(_7,"a","tradedat");if(obj!=null){hs.ui.linkHelp(obj,"Traded At");}var obj=getElementByName(_7,"a","pnl");if(obj!=null){hs.ui.linkHelp(obj,"P & L");}var obj=getElementByName(_7,"a","cashrequired");if(obj!=null){hs.ui.linkHelp(obj,"Cash Required");}var obj=getElementByName(_7,"a","marketvalue");if(obj!=null){hs.ui.linkHelp(obj,"Market Value");}}}for(var i=0;i<_b.length;i++){arrTableRow=_b[i];if(arrTableRow[9]!=_8){_7=HS_GetElementByID("pr");if(_7!=null){_7=_7.cloneNode(false);_7.id="pr"+i;_7.style.display="";_4.insertBefore(_7,HS_GetElementByID("hsidPositionsTableTotalRow"));}objCell=HS_GetElementByID("hsidImgRow");if(objCell!=null){objCell=objCell.cloneNode(false);objCell.id="";objCell.style.display="";objLink=HS_GetElementByID("hsidExpandLink");if(objLink!=null){objLink=objLink.cloneNode(true);objLink.id="pr"+i+"_expand";objLink.src="/images/institutional/expand.gif";objLink.style.cursor="pointer";objLink.onclick=new Function("HS_ShowPositions( "+i+", \""+arrTableRow[9]+"\",  this  );");objCell.appendChild(objLink);}}_7.appendChild(objCell);HS_BuildPositionsCommonCells(arrTableRow,_7,i);_8=arrTableRow[9];}}if(_5.length>0){_7=HS_GetElementByID("hsidPositionsTableTotalRow");if(_7!=null){var nPL=_d[0];objCell=HS_GetElementByID("hsidTotalRowPl");if(nPL<0){objCell.innerHTML="("+HS_GenerateCurrency4(Math.abs(Math.round(nPL*100)/100),true)+")";}else{objCell.innerHTML=HS_GenerateCurrency4(Math.round(nPL*100)/100,true);}var _16=_d[1];objCell=HS_GetElementByID("hsidTotalRowCashReqd");objCell.innerHTML=HS_GenerateCurrency4(Math.round(_16*100)/100,true);var _17=_d[2];objCell=HS_GetElementByID("hsidTotalRowMarketValue");objCell.innerHTML=HS_GenerateCurrency4(Math.round(_17*100)/100,true);}HS_ShowElementById("hsidPositionsTableC");HS_ShowElementById("footer_c");HS_HideElementById("hsidNoResults");}}var _4=HS_GetElementByID("hsidBalancesTable");if(_4!=null){availableCash=HS_GenerateCurrencyN(_1[0]["cyAvailableCash"]);if(typeof _d!="undefined"&&_d.length>0&&_d!=null){_6=Math.round(_d[2]*100)/100+Math.round(availableCash*100)/100;}else{_6=Math.round(availableCash*100)/100;}var obj=HS_GetElementByID("hsidAvailableCash");obj.innerHTML=HS_GenerateCurrency4(Math.round(availableCash*100)/100,true);var _18=HS_GenerateCurrency2(_1[0]["cyPendinDeposit"],true);var _19=HS_GenerateCurrency2(_1[0]["cyPendingWithdrawal"],true);if(_18!="-"&&_18!="$&nbsp;0.00"){var obj=HS_GetElementByID("hsidPendingDeposits");obj.innerHTML=_18;}if(_19!="-"&&_19!="$&nbsp;0.00"){var obj=HS_GetElementByID("hsidPendingWithdrawal");obj.innerHTML=_19;}var _1a=0;var _1b=HS_FormatServiceData(arrDeposit);if(_1b!="undefined"&&_1b.length>0){_7=HS_GetElementByID("hsidDepositDataRow");if(_7!=null){var _1c="";for(i=0;i<_1b.length;i++){if(_1b[i]["ecCheckStatus"]==HS_EC_SUCCESS){var amt="";var _1e="";_7=_7.cloneNode(true);_7.id="hsidDepositDataRow"+i;_7.style.display="";_4.insertBefore(_7,HS_GetElementByID("hsidPositionsLastRow"));amt=HS_GenerateCurrency2(_1b[i]["cyCheckAmount"],true);_1e="Check #"+_1b[i]["stCheckNumber"]+"&nbsp;"+"&nbsp;("+HS_GenerateDateSimple(_1b[i]["daCheckDate"])+")";_7.cells[0].innerHTML=_1e;_7.cells[1].innerHTML=amt;_1a++;}}}}if(_1a==0){_7=HS_GetElementByID("hsidDepositRow");if(_7!=null){var obj=HS_GetElementByID("hsidPendingDeposit");if(obj!=null){obj.innerHTML="$0.00";}}}var obj=HS_GetElementByID("hsidAmountCol");obj.innerHTML=HS_GenerateCurrency4(Math.round(_6*100)/100,true);}HS_ShowElementById("hsidBalancesTableC");}function HS_BuildPositionsCommonCells(_1f,_20,_21){if(!_1f[0]){var obj=HS_GetElementByID("pr"+_21+"_expand");if(obj!=null){obj.src="/images/institutional/contract.gif";obj.onclick=new Function("HS_HidePositions( "+_21+","+_1f[12]+", \""+_1f[9]+"\" );");}}var _23=(_1f[11]==HS_HEDGELET_TYPE_VARIABLE)?_1f[16]:null;if(_1f[0]){objCell=HS_GetElementByID("hsidRowTitle");}else{objCell=HS_GetElementByID("hsidSubRowTitle");}objCell=objCell.cloneNode(false);objCell.id="";objCell.style.display="";if(_1f[0]){objLink=HS_GetElementByID("hsidHedgeletLink");if(objLink!=null){objLink=objLink.cloneNode(true);objLink.id="";objLink.style.display="";if(_1f[11]==HS_HEDGELET_TYPE_BINARY){objLink.href="javascript:HS_SelectHedgelet2( '"+_1f[9]+"', '/hedgelets/YesNo/quotedetail.html', "+_1f[11]+" );";}else{if(_1f[11]==HS_HEDGELET_TYPE_VARIABLE){objLink.href="javascript:HS_SelectHedgelet2( '"+_1f[9]+"', '/hedgelets/CapFloor/quotedetail.html', "+_1f[11]+" );";}else{objLink.href="javascript:HS_SelectHedgelet2( '"+_1f[9]+"', '/hedgelets/quotes/quotedetail.html', "+_1f[11]+" );";}}objLink.innerHTML=_1f[1];objCell.appendChild(objLink);}}else{objCell.innerHTML=_1f[1];}_20.appendChild(objCell);if(_1f[0]){objCell=HS_GetElementByID("hsidRowBuySell");}else{objCell=HS_GetElementByID("hsidSubRowBuySell");}objCell=objCell.cloneNode(false);objCell.id="";objCell.style.display="";objLink=HS_GetElementByID("hsidTradeLink");if(objLink!=null){objLink=objLink.cloneNode(true);objLink.id="";objLink.style.display="";if(_1f[0]){objLink.href="javascript:HS_Trade( '"+_1f[9]+"', \""+HS_GenerateCurrency4(_1f[4],false,false,_23)+"\", \"\", \"\", "+_1f[11]+" );";}else{objLink.href="javascript:HS_Trade( '"+_1f[9]+"', \""+HS_GenerateCurrency4(_1f[4],false,false,_23)+"\", "+Math.abs(_1f[2])+" , \"\","+_1f[11]+" );";}objCell.appendChild(objLink);}_20.appendChild(objCell);if(_1f[0]){objCell=HS_GetElementByID("hsidRowQuantity");}else{objCell=HS_GetElementByID("hsidSubrowQuantity");}objCell=objCell.cloneNode(true);objCell.id="hsidRowQuantity";objCell.style.display="";var str=_1f[2];if(!_1f[8]){str="-"+str;}objCell.innerHTML=str;_20.appendChild(objCell);if(_1f[0]){objCell=HS_GetElementByID("hsidRowCurrval");}else{objCell=HS_GetElementByID("hsidSubRowCurrval");}objCell=objCell.cloneNode(true);objCell.id="";objCell.style.display="";objCell.innerHTML=HS_GenerateCurrency4(_1f[4],false,false,_23);_20.appendChild(objCell);if(_1f[0]){objCell=HS_GetElementByID("hsidRowTradeDat");}else{objCell=HS_GetElementByID("hsidSubRowTradeDat");}objCell=objCell.cloneNode(true);objCell.id="";objCell.style.display="";objCell.innerHTML=HS_GenerateCurrency4(_1f[5],false,false,_23);_20.appendChild(objCell);if(_1f[0]){objCell=HS_GetElementByID("hsidRowPl");}else{objCell=HS_GetElementByID("hsidSubRowPl");}objCell=objCell.cloneNode(true);objCell.id="";objCell.style.display="";var pnl=_1f[6];if(pnl<0){objCell.innerHTML="("+HS_GenerateCurrency4(Math.abs(_1f[6]),true)+")";}else{objCell.innerHTML=HS_GenerateCurrency4(_1f[6],true);}_20.appendChild(objCell);if(_1f[0]){objCell=HS_GetElementByID("hsidRowCashReqd");}else{objCell=HS_GetElementByID("hsidSubRowCashReqd");}objCell=objCell.cloneNode(true);objCell.id="";objCell.style.display="";objCell.innerHTML=HS_GenerateCurrency4(_1f[10],true);_20.appendChild(objCell);if(_1f[0]){objCell=HS_GetElementByID("hsidRowMarketValue");}else{objCell=HS_GetElementByID("hsidSubRowMarketValue");}objCell=objCell.cloneNode(true);objCell.id="";objCell.style.display="";objCell.innerHTML=HS_GenerateCurrency4(_1f[7],true);_20.appendChild(objCell);}function HS_ShowPositions(_26,_27,_28){if(typeof _28!="undefined"&&_28!=null){_28.onclick=null;}_XMLHTTP.request("/hedgelet/service/account-position?out=arrPositionDetail&details=1&hedgeletpath="+escape(_27),HS_UpdatePositionDetails,_26,_28,_27);}function HS_UpdatePositionDetails(_29,_2a){if(_29.trim().length<=0){return;}var _2b=HS_ExtractArrayByName("arrPositionDetail",_29.trim());if(_2b!=null){_2b=HS_FormatServiceData(_2b);}if(_2b.length<=0){return;}var _2c;var _2d;var _2e=_2b[0][HS_HASHKEY_SUBARRAY];objTable=HS_GetElementByID("hsidPositionsTableMain");var _2f=HS_GetElementByID("pr"+(_2a+1));if(_2f==null){_2f=HS_GetElementByID("hsidPositionsTableTotalRow");}if(objTable!=null&&_2f!=null){var _30=HS_CalculatePositions(_2e,1);_2c=_30[0];for(var i=0;i<_2c.length;i++){var _32=HS_GetElementByID("hsidPositionsTableSubRow");if(_32!=null){_32=_32.cloneNode(false);_32.id="pr"+_2a+"_subrow"+i;_32.style.display="";objTable.insertBefore(_32,_2f);}HS_BuildPositionsCommonCells(_2c[i],_32,_2a);}}var _33=_2a.objRoot;if(_33!=null){_33.src="/images/institutional/contract.gif";_33.onclick=function(){HS_HidePositions(_2a.iParentRow,_2c.length,_2a.strHedgeletPath);};}}function HS_HidePositions(_34,_35,_36){var obj=HS_GetElementByID("pr"+_34+"_expand");if(obj!=null){obj.src="/images/institutional/expand.gif";obj.onclick=new Function("HS_ShowPositions( "+_34+", \""+_36+"\",  this  );");}var _38=HS_GetElementByID("hsidPositionsTableMain");for(i=0;i<_35;i++){row=HS_GetElementByID("pr"+_34+"_subrow"+i);_38.removeChild(row);}}
	if(typeof hs=="undefined"){hs={};}hs.ui={};hs.ui.initialize=function(){hs.ui.widgetGroups=[];hs.ui.loadWidgetGroup("hsidGlobalWidgets");hs.ui.linkHelpAll();};hs.ui.loadWidgetGroup=function(id){var _2=$(id);if(_2!=null){hs.ui.widgetGroups.push(_2);}};hs.ui.getWidget=function(_3,_4){for(var i=0;i<hs.ui.widgetGroups.length;i++){var _6=getElementByName(hs.ui.widgetGroups[i],_3,_4);if(_6!=null){return _6;}}return null;};hs.ui.createDialog=function(_7,_8,_9){if(HS_ClientBrowserIs("msie")){var _a=hs.ui.getWidget("table","dialog_ie");}else{var _a=hs.ui.getWidget("table","dialog");}if(_a!=null){_a=_a.cloneNode(true);_a.id="Toptable";document.body.appendChild(_a);_a.style.display="none";_a.style.top="-1000px";_a.style.left="-1000px";if(typeof _7!="undefined"&&_7!=null&&_7>0){_a.style.width=_7+"px";}var _b=getElementByName(_a,"div","title");if(_b!=null){_b.innerHTML="&nbsp;";if(typeof _9!="undefined"&&_9!=null&&_9){_b.style.textAlign="center";_b.style.marginLeft="12px";_b.style.marginRight="12px";}}_b=getElementByName(_a,"div","content");if(_b!=null){_b.innerHTML="&nbsp;";}if(typeof _8=="undefined"||_8==null||!_8){_b=getElementByName(_a,"img","link_close");if(_b!=null){_b.style.visibility="hidden";}}}return _a;};hs.ui.linkHelpAll=function(){var _c=$("hsidHSContainer2");if(_c!=null){var _d=_c.getElementsByTagName("a");for(var i=0;i<_d.length;i++){var _f=_d[i];hs.ui.linkHelp(_f);}}};hs.ui.linkHelp=function(obj,_11){if(obj==null){return;}var _12=null;if(typeof _11!=""&&_11!=null&&_11.length>0){_12=_11;}else{var _13="_hs_glossary_term[";var _14=obj.className;if(typeof _14!="undefined"&&_14!=null&&_14.length>0){var _15=_14.indexOf(_13);if(_15>=0){var end=_14.indexOf("]",_15+_13.length-1);if(end>_15){var str=_14.substring(_15+_13.length,end);if(str.length>0){_12=str;}}}}}if(_12!=null){obj.onmouseover=new Function("hs.ui.showHelp( this, '"+_12+"' );");if(!$$s(obj.href)&&!$$(obj.onclick)){var str="definitionAnchor";if(obj.className.length>0){str=" "+str;}obj.className+=str;}}};
	if(typeof hs=="undefined"){hs={};}if(typeof hs.ui=="undefined"){hs.ui={};}hs.ui.helpDialog=null;hs.ui.helpDialogRequests={};hs.ui.helpDialogRequestsCount=0;hs.ui.helpDialogInterval=500;hs.ui.showHelp=function(_1,_2){if(!$$(_1)){return;}if(!$$s(_2)){return;}var _3=hs.ui.helpDialogRequestsCount++;hs.ui.helpDialogRequests[_3]={target:_1,term:_2};setTimeout("hs.ui.displayHelp( \""+_3+"\" );",hs.ui.helpDialogInterval);_1.onmouseout=new Function("hs.ui.hideHelp( \""+_3+"\" );");};hs.ui.displayHelp=function(id){var _5=hs.ui.helpDialogRequests[id];if(!$$(_5)||!$$(_5.target)||!$$(_5.term)){return;}var _6=_5.target;var _7=_5.term;if(!$$(_6)){return;}if(!$$s(_7)){return;}if(typeof _Glossary=="undefined"){return;}if(!$$(_Glossary)){return;}hs.ui.helpDialogRequests[id]=null;var _8="Definition";var _9=_Glossary[_7];if(typeof _9=="undefined"||_9==null||_9.length<=0){return;}if(hs.ui.helpDialog==null){hs.ui.helpDialog=hs.ui.createDialog(250,false);var _a=getElementByName(hs.ui.helpDialog,"div","title");if(_a!=null){_a.innerHTML=_8;_a.style.marginLeft="2px";}_a=getElementByName(hs.ui.helpDialog,"div","content");if(_a!=null){_a.style.marginTop="4px";_a.style.marginLeft="2px";_a.style.marginRight="0px";_a.style.marginBottom="2px";}}if(hs.ui.helpDialog==null){return;}if(hs.ui.underlying){hs.ui.underlying.hide();}var _a=getElementByName(hs.ui.helpDialog,"div","content");if(_a!=null){_a.innerHTML="";var _b=HS_GetElementByID("hsidHelpDialogTerm");if(_b!=null){_b=_b.cloneNode(true);_a.appendChild(_b);_b.innerHTML=_7;}_b=HS_GetElementByID("hsidHelpDialogDefinition");if(_b!=null){_b=_b.cloneNode(true);_a.appendChild(_b);_b.innerHTML="<span>&nbsp;</span>- "+_9;}}hs.ui.helpDialog.style.zIndex=-1000;hs.ui.helpDialog.style.display="block";HS_BoundElement(hs.ui.helpDialog,_6,null,null,[-5,-12,-12,-9],[0,0,0,9]);if(typeof _Dialogs!="undefined"&&_Dialogs!=null){_Dialogs.bringToTop(hs.ui.helpDialog);}else{hs.ui.helpDialog.style.zIndex=1000;}};hs.ui.hideHelp=function(id){var _d=hs.ui.helpDialogRequests[id];if($$(_d)){var _e=_d.target;if($$(_e)){_e.onmouseout=null;}hs.ui.helpDialogRequests[id]=null;}else{if(hs.ui.helpDialog==null){return;}hs.ui.helpDialog.style.display="none";hs.ui.helpDialog.style.zIndex=-1000;}};
	if(typeof hs=="undefined"){hs={};}if(typeof hs.ui=="undefined"){hs.ui={};}hs.ui.nFrames=0;hs.ui.createFrame=function(_1){var id="hsidHSUIiFrame"+(hs.ui.nFrames);var _3=$(id);if(_3!=null){return _3;}var _4=document.createElement("iframe");_4.id=id;_4.name=id;if(typeof _1!="undefined"&&_1!=null&&_1.length>0){_4.src=_1;}else{_4.src="/i/trading/quicktrade/";}document.body.appendChild(_4);_4.style.position="absolute";_4.style.visibility="hidden";_4.style.width="0px";_4.style.height="0px";_4.style.top="-1000px";_4.style.left="-1000px";_4.style.border="0px";_4.style.padding="0px";_4.style.margin="0px";try{_4.style.filter="alpha(opacity=0)";}catch(e){}_3=$(id);if(_3!=null){hs.ui.nFrames++;return _3;}};hs.ui.removeFrame=function(id){var _6=$(id);if(_6!=null){document.body.removeChild(_6);}};
	function HS_ExtractArrayByName(arrayName, strBuffer) {
	    eval(strBuffer);
	
	    if (eval ('typeof ' + arrayName + ' != \'undefined\'')) {
	        eval('var newArray = ' + arrayName + ';');
	        return newArray;
	    } else {
	        return null;
	    }
	}
	
	var HS_SERVICE_RESPONSE_ASSET=1;var HS_SERVICE_RESPONSE_TRADE=2;var HS_SERVICE_RESPONSE_PnP=3;var HS_SERVICE_RESPONSE_PnP_SNAPQUOTE=4;var HS_SERVICE_RESPONSE_QUOTEDETAIL1=5;var HS_SERVICE_RESPONSE_QUOTEDETAIL2=6;var HS_SERVICE_RESPONSE_QUOTEDEPTH=7;var HS_SERVICE_RESPONSE_PENDINGSETTLED=8;var HS_SERVICE_RESPONSE_HEDGELETS=9;var HS_SERVICE_RESPONSE_DAILYBULLETIN=10;var HS_SERVICE_RESPONSE_POSITIONS=11;var HS_SERVICE_RESPONSE_MARKET_HEDGELET=12;var HS_SERVICE_RESPONSE_SUBMARKET_HEDGELET=13;var HS_SERVICE_RESPONSE_PnP_ATAGLANCE=14;var HS_SERVICE_RESPONSE_PLACEORDER_SNAPQUOTE=15;var HS_SERVICE_RESPONSE_PLACEORDER=16;var HS_SERVICE_RESPONSE_OPENORDERS=17;var HS_SERVICE_RESPONSE_OPENORDERDETAIL=18;var HS_SERVICE_RESPONSE_UNDERLYING=19;var HS_SERVICE_RESPONSE_BREADCRUMB=20;var HS_SERVICE_RESPONSE_FEATURED=21;var HS_SERVICE_RESPONSE_PLACEORDER_SNAPQUOTE_I=22;var HS_SERVICE_RESPONSE_PLACEORDER_POSITIONS=23;var HS_SERVICE_RESPONSE_ASSET_INDIVIDUAL=24;var HS_SERVICE_RESPONSE_TRANSACTIONHISTORY=25;var HS_SERVICE_RESPONSE_ORDERHISTORY=26;var HS_SERVICE_RESPONSE_MARKET_TRADE=27;var HS_SERVICE_RESPONSE_SUBMARKET_TRADE=28;var HS_SERVICE_CALENDAR_HEDGELETS=29;var HS_SERVICE_RESPONSE_COMPLIANCE_MARKET=30;var HS_SERVICE_RESPONSE_COMPLIANCE_SUBMARKET=31;var HS_SERVICE_RESPONSE_COMPLIANCE_ASSET=32;var HS_SERVICE_RESPONSE_COMPLIANCE_HEDGELET=33;var HS_SERVICE_RESPONSE_QA_MARKET=34;var HS_SERVICE_RESPONSE_QA_SUBMARKET=35;var HS_SERVICE_RESPONSE_QA_ASSET=36;var HS_SERVICE_RESPONSE_VIEWACCOUNT=37;var HS_SERVICE_RESPONSE_TRADERDETAIL=38;var HS_SERVICE_RESPONSE_ACCTDETAIL=39;var HS_SERVICE_RESPONSE_TRADERLIST=40;var HS_SERVICE_RESPONSE_ACCTLIST=41;var HS_ACCOUNTTYPE_UNDEFINED=0;var HS_ACCOUNTTYPE_COMPLIANCE=1;var HS_ACTION_PLACEORDER=1;var HS_ACTION_MODIFYORDER=2;var HS_ACTION_CANCELORDER=3;var HS_ACTION_CANCELALLORDERS=4;var HS_DELIMITER="|||";var HS_COOKIE_IFRAME="hs_iframe";var HS_IFRAME_URL=0;var HS_IFRAME_PARAM=1;var HS_IFRAME_RESPONSEID=2;var HS_COOKIE_HEDGELET="hs_hedgelet";var HS_COOKIE_COMPLIANCE="hs_compliance";var HS_HEDGELET_MARKETNAME=0;var HS_HEDGELET_SUBMARKETNAME=1;var HS_HEDGELET_SUBMARKETPATH=2;var HS_HEDGELET_ASSETNAME=3;var HS_HEDGELET_ASSETPATH=4;var HS_HEDGELET_HEDGELETPATH=5;var HS_HEDGELET_HEDGELETTYPE=6;var HS_COOKIE_QA="hs_qatool";var HS_HEDGELET_MARKETNAME=0;var HS_HEDGELET_SUBMARKETNAME=1;var HS_HEDGELET_SUBMARKETPATH=2;var HS_HEDGELET_ASSETNAME=3;var HS_HEDGELET_ASSETPATH=4;var HS_HEDGELET_HEDGELETPATH=5;var HS_HEDGELET_HEDGELETTYPE=6;var HS_COOKIE_GRAPH="hs_qagraph";var HS_HEDGELET_MARKETNAME=0;var HS_HEDGELET_SUBMARKETNAME=1;var HS_HEDGELET_SUBMARKETPATH=2;var HS_HEDGELET_ASSETNAME=3;var HS_HEDGELET_ASSETPATH=4;var HS_HEDGELET_HEDGELETPATH=5;var HS_HEDGELET_HEDGELETTYPE=6;var HS_COOKIE_HEDGELETFILTER="hs_hedgeletfilter";var HS_FILTER_H_TYPE=0;var HS_FILTER_H_TIMEFRAME=1;var HS_FILTER_H_PERIODICITY=2;var HS_FILTER_H_STATUS=3;var HS_COOKIE_ORDER="hs_order";var HS_COOKIE_ORDERRECEIPT="hs_orderreceipt";var HS_ORDER_ACTION=0;var HS_ORDER_NUMBER=1;var HS_ORDER_TYPE=2;var HS_ORDER_PRICE=3;var HS_ORDER_QUANTITY=4;var HS_ORDER_AMOUNT=5;var HS_ORDER_HEDGELETPATH=6;var HS_COOKIE_SESSIONERROR="hs_sessionerror";var HS_COOKIE_TARGETURL="hs_targeturl";var HS_COOKIE_TEMP1="hs_temp1";var HTS_SYSTEMSTATE_UNAVAILABLE=1;var HTS_SYSTEMSTATE_LOCKEDFORSETTLEMENT=2;var HTS_SYSTEMSTATE_AVAILABLE=4;var arrHSMonthsSimple=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var arrHSMonthsFull=new Array("January","February","March","April","May","June","July","August","September","October","November","December");var arrHSWeeksSimple=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");function HS_UpdateMonthSelect(id,_2,_3){var _4=HS_GetElementByID(id);if(_4!=null){if(typeof _2=="undefined"||_2<=0){_2=24;}if(typeof _3=="undefined"){_3=new Date();}var _5=_3.getMonth();var _6=_3.getFullYear();HS_ClearDropDownList(id);var _7=_5;var _8=_6;for(i=0;i<_2;i++){if(i>0){_7--;}if(_7<0){_7=11;_8--;}HS_AddDropDownOption(id,arrHSMonthsSimple[_7]+" "+_8,(_7+1)+HS_DELIMITER+_8,false);}}}function createFilter(){var _9=0;for(i=0;i<createFilter.arguments.length;i++){_9+=createFilter.arguments[i];}return _9;}function HSUSD(_a,_b){return new Array("USD",_a,_b);}function HSDate(_c,_d,_e){return new Array(_c,_d,_e);}function HSTime(_f,_10,_11,_12,_13){return new Array(_f,_10,_11,_12,_13);}function HSDateTime(_14,_15,_16,_17,_18,_19,_1a,_1b){return new Array(_14,_15,_16,_17,_18,_19,_1a,_1b);}function HS_GenerateDateTime(_1c){var _1d=HS_GenerateDate(_1c);if(_1c.length>6){_1d+=" "+HS_GenerateTime(new Array(_1c[3],_1c[4],_1c[5],_1c[6],_1c[7]));}return _1d;}function HS_GenerateDateTime2(_1e){var _1f=HS_GenerateDate2(_1e);if(_1e.length>6){_1f+="&nbsp;-&nbsp;"+HS_GenerateTime(new Array(_1e[3],_1e[4],_1e[5],_1e[6],_1e[7]));}return _1f;}function HS_GenerateDateCal(_20){var _21=new Date();_21.setDate(_20[2]);_21.setMonth(_20[1]-1);_21.setYear(_20[0]);return _21;}function HS_GenerateDate(_22){return arrHSMonthsFull[_22[1]-1]+"&nbsp;"+_22[2]+",&nbsp;"+_22[0];}function HS_GenerateDate2(_23){return HS_GenerateDateSimple(_23);}function HS_GenerateDateSimple(_24,_25){var _26="&nbsp;";if(typeof _25!="undefined"&&_25){_26=" ";}return _24[2]+_26+arrHSMonthsSimple[_24[1]-1]+_26+_24[0].toString().substring(2);}function HS_GenerateTime(_27){if(_27[3].toLowerCase().indexOf("st")!=-1||_27[3].toLowerCase().indexOf("dt")!=-1){_27[3]=_27[3].replace("S","");_27[3]=_27[3].replace("D","");}return ((_27[0]%12==0)?"12":_27[0]%12)+":"+((_27[1]<10)?"0":"")+_27[1]+"&nbsp;"+((_27[0]>=12)?"PM":"AM")+"&nbsp;"+_27[3];}function HS_IsValidDate(_28){if(_28[1]<=12&&_28[2]<60){return true;}else{return false;}}function HS_IsValidCurrency(_29){if(typeof _29!="undefined"&&_29!=null&&_29.length>=3&&_29[2]!=null&&_29[2]<100){return true;}else{return false;}}function HS_GenerateCurrencyN(_2a){var _2b;if(HS_IsValidCurrency(_2a)){_2b=Math.round((_2a[1]+_2a[2]/100)*100)/100;}else{_2b=0;}return _2b;}function HS_GenerateCurrency(_2c){return HS_GenerateCurrency2(_2c,false);}function HS_GenerateCurrency2(_2d,_2e){return HS_GenerateCurrency3(_2d,true,_2e);}function HS_GenerateCurrency4(_2f,_30){return HS_GenerateCurrency5(Math.floor(_2f),Math.round((_2f-Math.floor(_2f))*100),"USD",true,_30);}function HS_GenerateCurrency3(_31,_32,_33,_34){return HS_GenerateCurrency5(_31[1],_31[2],_31[0],_32,_33,_34);}function HS_GenerateCurrency5(_35,_36,_37,_38,_39,_3a){if(_36<100||(typeof _3a!="undefined"&&_3a)){var _3b=false;if(_35<0||_36<0){_3b=true;var _3c=Math.abs(_35).toString();}else{var _3c=_35.toString();}if(_38){for(var i=0;i<Math.floor((_3c.length-(1+i))/3);i++){_3c=_3c.substring(0,_3c.length-(4*i+3))+","+_3c.substring(_3c.length-(4*i+3));}}_3c+=".";if(_36<0){_36=Math.abs(_36);}if(_36<10){_3c+="0";}_3c+=_36.toString();if(_3b){_3c="-"+_3c;}if(_39){if(_37.toLowerCase()=="usd"){_3c="$&nbsp;"+_3c;}}return _3c;}else{return "-";}}function HS_GetTimeRemainingString(_3e){return HS_GetTimeRemainingString2(_3e,false);}function HS_GetTimeRemainingString2(_3f,_40){var _41,nHours,nMinutes,bNegative;bNegative=false;if(_3f<0){return "-";bNegative=true;_3f=-(_3f);}_41=Math.floor(_3f/(24*60*60));_3f-=_41*(24*60*60);nHours=Math.floor(_3f/(60*60));_3f-=nHours*(60*60);nMinutes=Math.round(_3f/(60));var _42="";if(_41>0){_42+=_41+" day";if(_41>1){_42+="s";}}if(_40){if(_42.length>0){_42+=", ";}_42+=nHours+":";if(nMinutes<10){_42+="0";}_42+=nMinutes;}else{if(nHours>0){if(_42.length>0){_42+=", ";}_42+=nHours+" hour";if(nHours>1){_42+="s";}}if(nMinutes>0){if(_42.length>0){_42+=", ";}_42+=nMinutes+" minute";if(nMinutes>1){_42+="s";}}}if(bNegative){_42="minus "+_42;}return _42;}function HS_GetOrderTypeString(_43){switch(_43){case HS_ORDER_TYPE_BUY:return "Buy";break;case HS_ORDER_TYPE_SELL:return "Sell";break;case HS_ORDER_TYPE_SUBSCRIBE:return "Subscribe";break;case HS_ORDER_TYPE_REDEEM:return "Redeem";break;default:return "-";}}function HS_SetHedgeletFilters(_44){if(!IsArray(_44)||_44.length<5){return;}var _45="";var _46=HS_GetHedgeletFilters();_45+=(_44[HS_FILTER_H_TYPE]!="")?_44[HS_FILTER_H_TYPE]:_46[HS_FILTER_H_TYPE];_45+=HS_DELIMITER;_45+=(_44[HS_FILTER_H_TIMEFRAME]!="")?_44[HS_FILTER_H_TIMEFRAME]:_46[HS_FILTER_H_TIMEFRAME];_45+=HS_DELIMITER;_45+=(_44[HS_FILTER_H_PERIODICITY]!="")?_44[HS_FILTER_H_PERIODICITY]:_46[HS_FILTER_H_PERIODICITY];_45+=HS_DELIMITER;_45+=(_44[HS_FILTER_H_STATUS]!="")?_44[HS_FILTER_H_STATUS]:_46[HS_FILTER_H_STATUS];HS_SetCookie(HS_COOKIE_HEDGELETFILTER,_45);}function HS_GetHedgeletFilters(){var _47=false;var _48=HS_GetCookie(HS_COOKIE_HEDGELETFILTER);var _49;if(_48==null||_48.length<1){_47=true;}else{_49=_48.split(HS_DELIMITER);if(!IsArray(_49)||_49.length<5){_47=true;}else{for(var i=0;i<_49.length;i++){if(typeof _49[i]=="undefined"||_49[i]==null){_47=true;break;}}}}if(_47){return new Array(HS_HEDGELET_TYPE_ALL,HS_TIME_FRAME_ALL,HS_PERIODICITY_ALL,createFilter(HS_STATUS_OPEN,HS_STATUS_CLOSED),HS_HEDGELET_CLASS_RETAIL);}else{return _49;}}function HS_SetHedgeletFilter(id,_4c){if((id<HS_FILTER_H_TYPE&&id>HS_FILTER_H_STATUS)||_4c==""){return;}var _4d=new Array("","","","","");_4d[id]=_4c;HS_SetHedgeletFilters(_4d);}function HS_GetHedgeletFilter(id){if(id<HS_FILTER_H_TYPE&&id>HS_FILTER_H_STATUS){return;}var _4f=HS_GetHedgeletFilters();return _4f[id];}
	function HS_IsValidCurrency(_1){if(typeof _1=="undefined"||_1==null||_1.length<3){return false;}if(typeof _1[2]=="undefined"||_1[2]==null){return false;}if(_1[1]==9999&&_1[2]==9999){return false;}var _2=HS_GetCurrencyMultiplier(_1);if(Math.abs(_1[2])>=_2){return false;}return true;}function HS_GetCurrencyMultiplier(_3){var _4=100;if(typeof _3=="undefined"||_3==null||_3.length<3){return _4;}if(typeof _3[2]=="undefined"||_3[2]==null){return _4;}var _5=HS_DefaultCurrencyTick();if(_3.length>=4&&typeof _3[3]!="undefined"&&_3[3]!=null&&_3[3]>0){_5=_3[3];}_4=HS_GetTickMultiplier(_5);return _4;}function HS_DefaultCurrencyTick(){return 0.01;}function HS_GetTickMultiplier(_6){var t=_6;if(typeof t=="undefined"||t==null){t=HS_DefaultCurrencyTick();}if(isNaN(t)){t=parseFloat(t);}if(isNaN(t)||t<=0){t=HS_DefaultCurrencyTick();}var _8=1;var _9=0;while(t<1){t*=10;_8*=10;_9++;}_8=Math.max(1,_8);return _8;}function HS_GenerateCurrency(_a){return HS_GenerateCurrency2(_a,false);}function HS_GenerateCurrency2(_b,_c){return HS_GenerateCurrency3(_b,true,_c);}function HS_GenerateCurrency3(_d,_e,_f,_10){var _11=HS_DefaultCurrencyTick();if(_d.length>=4&&typeof _d[3]!="undefined"&&_d[3]!=null&&_d[3]>0){_11=_d[3];}var _12=HS_GetTickMultiplier(_11);return HS_GenerateCurrency5(_d[1],_d[2],(_12.toString().length-1),_d[0],_e,_f,_10);}function HS_GenerateCurrency4(_13,_14,_15,_16,_17){var _18=(_13<0)?true:false;_13=Math.abs(_13);var t=_16;if(typeof t=="undefined"||t==null||t<0){if(typeof _15!="undefined"&&_15!=null&&_15){t=_13-Math.floor(_13);}else{t=HS_DefaultCurrencyTick();}}var _1a=HS_GetTickMultiplier(t);var _1b=_13-Math.floor(_13);if(_1b>0&&_1b<1){_1b*=_1a;}if(typeof _17=="undefined"||_17==null){_17=true;}var _1c=Math.floor(_13);if(_18){_13=-_13;_1c=Math.ceil(_13);}return HS_GenerateCurrency5(_1c,Math.round(_1b),(_1a.toString().length-1),"USD",_17,_14);}function HS_GenerateCurrency5(_1d,_1e,_1f,_20,_21,_22,_23){var str="-";if(typeof _1d=="undefined"||_1d==null){return str;}if(typeof _1e=="undefined"||_1e==null){return str;}if(_1d==9999&&_1e==9999){return str;}var _25=false;if(_1d<0||_1e<0){_25=true;str=Math.abs(_1d).toString();}else{str=_1d.toString();}if(_21){for(var i=0;i<Math.floor((str.length-(1+i))/3);i++){str=str.substring(0,str.length-(4*i+3))+","+str.substring(str.length-(4*i+3));}}var _27=_1f;if(typeof _27=="undefined"||_27==null||_27<0){_27=2;}if(_27>0){str+=".";if(_1e<0){_1e=Math.abs(_1e);}var _28=_1e.toString();var _29=_27-_28.length;while(_29>0){_28="0"+_28;_29--;}str+=_28;}if(_25){str="-"+str;}if(_22&&typeof _20!="undefined"&&_20!=null&&_20.length>0){if(_20.toLowerCase()=="usd"){str="$"+str;}}return str;}function HS_GenerateCurrencyN(_2a){var _2b;if(HS_IsValidCurrency(_2a)){var _2c=HS_GetCurrencyMultiplier(_2a);_2b=Math.round((_2a[1]+_2a[2]/_2c)*_2c)/_2c;}else{_2b=0;}return _2b;}function HS_Futures_ToDisplayPrice(_2d,_2e){if(HS_IsValidCurrency(_2d)&&_2e["ecHedgeletType"]==HS_HEDGELET_TYPE_VARIABLE){if(_2e["bdUnderlyingFloor"]==""||_2e["bdUnderlyingCap"]==""||!HS_IsValidCurrency(_2e["cyPayout"])){return (_2d);}var _2f=HS_Futures_ToDisplayPrice2(_2d,_2e["bdUnderlyingFloor"],_2e["bdUnderlyingCap"],_2e["cyPayout"],_2e["bdTickSize"]);return _2f;}else{return (_2d);}}function HS_Futures_ToDisplayPrice2(_30,_31,cap,_33,_34){if(!HS_IsValidCurrency(_30)){return _30;}var _35=HS_GenerateCurrencyN(_33);if(_35<=0){return _30;}if(_31==null||_31.length<=0){return _30;}if(cap==null||cap.length<=0){return _30;}return HS_Futures_ToDisplayPrice3(_30,_31,cap,_35,_34);}function HS_Futures_ToDisplayPrice3(_36,_37,cap,_39,_3a){var _3b=HS_GenerateCurrencyN(_36);var _3c=HS_Futures_ToDisplayPrice_calc(_3b,_37,cap,_39,_3a);return (HS_FloatToCurrency(_36[0],_3c,false,_3a));}function HS_Futures_ToDisplayPrice_calc(_3d,_3e,cap,_40,_41){var _42=parseFloat(_3e);var _43=parseFloat(cap);var _44=_43-_42;return _3d*_44/_40+_42;}function HS_Futures_FromDisplayPrice(_45,_46,cap,_48,_49){var _4a=HS_GenerateCurrencyN(_48);if(_4a<=0){return cyPrice;}if(_46==null||_46.length<=0){return cyPrice;}if(cap==null||cap.length<=0){return cyPrice;}var _4b=parseFloat(_46);var _4c=parseFloat(cap);var _4d=_4c-_4b;return ((_45-_4b)*_4a)/_4d;}function HS_Futures_ToHedgeletPrice2(_4e,_4f,cap,_51){if(!HS_IsValidCurrency(_4e)){return _4e;}var _52=HS_GenerateCurrencyN(_4e);var _53=HS_Futures_ToHedgeletPrice3(_52,_4f,cap,_51);return (HS_FloatToCurrency(_4e[0],_53,false,HS_DefaultCurrencyTick()));}function HS_Futures_ToHedgeletPrice3(_54,_55,cap,_57,_58,_59){if(typeof _59=="undefined"){_59=0.01;}var _5a=HS_GenerateCurrencyN(_57);if(_5a<=0){return _54;}if(_55==null||_55.length<=0){return _54;}if(cap==null||cap.length<=0){return _54;}var _5b=parseFloat(_55);var _5c=parseFloat(cap);if($$s(_58)){_58=HS_DefaultCurrencyTick();}var _5d=HS_GetTickMultiplier(_58);var _5e=Math.round((_5c-_5b)*_5d)/_5d;if(_5e<=0){return _54;}var _5f=Math.round((_54-_5b)*_5d)/_5d;var _60=HS_GetTickMultiplier(_59);var _61=Math.max(0,Math.round((_5f*_5a/_5e)*_60)/_60);return _61;}function HS_CurrencyToFloat(_62){var _63;if(HS_IsValidCurrency(_62)){var _64=HS_GetCurrencyMultiplier(_62);_63=Math.round((_62[1]+_62[2]/_64)*_64)/_64;}else{_63=0;}return _63;}function HS_FloatToCurrency(_65,_66,_67,_68){var t=_68;if(typeof t=="undefined"||t==null||t<0){if(typeof _67!="undefined"&&_67!=null&&_67){t=_66-Math.floor(_66);}else{t=HS_DefaultCurrencyTick();}}var _6a=HS_GetTickMultiplier(t);var _6b=_66-Math.floor(_66);if(_6b>0&&_6b<1){_6b*=_6a;}var str=_65;if(typeof str=="undefined"||str==null||str.length<0){str="USD";}return [str,Math.floor(_66),Math.round(_6b),1/_6a];}function HS_StripCommas(_6d){if(_6d==null||typeof _6d!="string"){return _6d;}else{return _6d.replace(/,/g,"");}}
	

