function detectGeo(a){var c=GetCookie("geo"),d=new Querystring,b=d.get("redir");b=="0"&&SetCookie("redir","0",null,"/",rURL);if(GetCookie("redir")!="0"){if(GetCookie("wsEntity")=="NA")return;if(GetCookie("wsEntity")=="EU")document.location="http://www.forex.com/uk/"+a;if(GetCookie("wsEntity")=="AU")document.location="http://www.forex.com/au/"+a;if(GetCookie("wsEntity")=="JP")document.location="http://jp.forex.com/jp/";switch(c){case"US":setwsEntityHigh("NA");setEntityLang("en");break;case"AU":setwsEntityHigh("AU");setEntityLang("en");document.location="http://www.forex.com/au/"+a;break;case"NZ":setwsEntityHigh("AU");setEntityLang("en");document.location="http://www.forex.com/au/"+a;break;case"HK":document.location="http://www.forex.com/hk";break;case"JP":setwsEntityHigh("JP");setEntityLang("ja");document.location="http://jp.forex.com/";break;case"ZA":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"CA":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"GB":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"MY":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"VN":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"BN":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"KH":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"ID":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"PH":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"TH":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"CK":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"FJ":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"LA":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"NR":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"PF":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"TO":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"VU":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"KR":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"SG":setwsEntityHigh("EU");setEntityLang("en");document.location="http://www.forex.com/uk/"+a;break;case"TW":setwsEntityHigh("EU");setEntityLang("zh");document.location="http://www.forex.com/uk/cns/"+a;break;case"BH":setwsEntityHigh("EU");setEntityLang("ar");document.location="http://www.forex.com/uk/ar/"+a;break;case"EG":setwsEntityHigh("EU");setEntityLang("ar");document.location="http://www.forex.com/uk/ar/"+a;break;case"JO":setwsEntityHigh("EU");setEntityLang("ar");document.location="http://www.forex.com/uk/ar/"+a;break;case"KW":setwsEntityHigh("EU");setEntityLang("ar");document.location="http://www.forex.com/uk/ar/"+a;break;case"LB":setwsEntityHigh("EU");setEntityLang("ar");document.location="http://www.forex.com/uk/ar/"+a;break;case"OM":setwsEntityHigh("EU");setEntityLang("ar");document.location="http://www.forex.com/uk/ar/"+a;break;case"QA":setwsEntityHigh("EU");setEntityLang("ar");document.location="http://www.forex.com/uk/ar/"+a;break;case"SA":setwsEntityHigh("EU");setEntityLang("ar");document.location="http://www.forex.com/uk/ar/"+a;break;case"AE":setwsEntityHigh("EU");setEntityLang("ar");document.location="http://www.forex.com/uk/ar/"+a;break;case"CN":setwsEntityHigh("EU");setEntityLang("zh");document.location="http://www.forex.com/uk/cns/"+a;break;case"AM":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"AZ":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"BY":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"KZ":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"KG":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"LV":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"LT":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"MD":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"RU":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"TJ":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"UA":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"UZ":setwsEntityHigh("EU");setEntityLang("ru");document.location="http://www.forex.com/uk/ru/"+a;break;case"DE":setwsEntityHigh("EU");setEntityLang("de");document.location="http://www.forex.com/de/"+a;break;case"AT":setwsEntityHigh("EU");setEntityLang("de");document.location="http://www.forex.com/de/"+a}}}function detectMeta(){var b=new Querystring,a=b.get("redir");a=="0"&&SetCookie("redir","0",null,"/",rURL);if(GetCookie("redir")!="0"){if(GetCookie("wsEntity")=="NA"&&GetCookie("wsEntityPlatform")=="META")document.location="http://www.forex.com/metatrader/";if(GetCookie("wsEntity")=="EU"&&GetCookie("wsEntityPlatform")=="META")document.location="http://www.forex.com/metatraderuk/";if(GetCookie("wsEntity")=="AU"&&GetCookie("wsEntityPlatform")=="META")document.location="http://www.forex.com/metatraderau/"}}function detectGeoDemo(b){var d=GetCookie("geo"),c=new Querystring,a=c.get("v")==null?"":"?v="+c.get("v");if(GetCookie("wsEntity")=="NA")return;if(GetCookie("wsEntity")=="EU")document.location="http://www.forex.com/uk/"+b+a;if(GetCookie("wsEntity")=="JP")document.location="http://jp.forex.com/jp/services/forextrader_open_demo.shtml";switch(true){case/AL|AD|AG|AN|AR|AM|AW|AU|AT|AZ|BS|BD|BB|BE|BZ|BJ|BM|BT|BO|BA|BW|BR|VG|BN|BG|BF|KH|CM|CA|CV|KY|CF|TD|CL|CO|CK|CR|HR|CY|CZ|DK|DJ|DM|DO|TL|EC|SV|GQ|EE|ET|FO|FJ|FI|FR|GF|GB|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GT|GW|GY|HT|HN|HU|IS|IN|ID|IE|IL|IT|JM|KZ|KE|KG|LA|LV|LS|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|MQ|MR|MU|MX|MD|MC|MN|ME|MZ|MM|NA|NR|NP|NL|NC|NZ|NI|NE|NG|NO|PK|PA|PG|PY|PE|PH|PL|PT|ZA|RE|RO|RU|RW|WS|SM|SN|RS|SC|SL|SK|SI|SB|SO|ZA|ES|LK|KN|LC|PM|VC|SR|SZ|SE|CH|TJ|TA|TZ|TH|TG|TO|TT|TN|TR|UG|UA|UY|UZ|VU|VA|VE|VN|ZM|ZW/.test(d):document.location="http://www.forex.com/uk/"+b+a}}function grabGeo(){var a=GetCookie("geo");a==null&&document.write('<script type="text/javascript" src="https://secure.efxnow.com/zipproxy/keyfield.asp"><\/script>')}function assignGeoDemo(a){var c=GetCookie("geo");if(typeof cc!="undefined")if(cc!=""&&c==null){var b=getRootDomain();SetCookie("geo",cc,exp,"/",b)}detectGeoDemo(a)}function assignGeo(a){var c=GetCookie("geo");if(typeof cc!="undefined")if(cc!=""&&c==null){var b=getRootDomain();SetCookie("geo",cc,exp,"/",b)}detectGeo(a)}function assignGeoDemoBeta(){var b=GetCookie("geo");if(typeof cc!="undefined")if(cc!=""&&b==null){var a=getRootDomain();SetCookie("geo",cc,exp,"/",a)}detectGeoDemoBeta()}function assignGeoDemoUK(){var b=GetCookie("geo");if(typeof cc!="undefined")if(cc!=""&&b==null){var a=getRootDomain();SetCookie("geo",cc,exp,"/",a)}detectGeoDemoUK()}function assignGeoDemoAU(){var b=GetCookie("geo");if(typeof cc!="undefined")if(cc!=""&&b==null){var a=getRootDomain();SetCookie("geo",cc,exp,"/",a)}detectGeoDemoAU()}function assignGeoDemoUSMeta(){var b=GetCookie("geo");if(typeof cc!="undefined")if(cc!=""&&b==null){var a=getRootDomain();SetCookie("geo",cc,exp,"/",a)}detectGeoDemoUSMeta()}function assignGeoDemoUKMeta(){var b=GetCookie("geo");if(typeof cc!="undefined")if(cc!=""&&b==null){var a=getRootDomain();SetCookie("geo",cc,exp,"/",a)}detectGeoDemoUKMeta()}function assignGeoDemoAUMeta(){var b=GetCookie("geo");if(typeof cc!="undefined")if(cc!=""&&b==null){var a=getRootDomain();SetCookie("geo",cc,exp,"/",a)}detectGeoDemoAUMeta()}function detectGeoDemoBeta(){var c=GetCookie("geo"),e=new Querystring,d=e.get("redir"),b=window.location.pathname,a=b.substring(b.lastIndexOf("/")+1)+location.search;d=="0"&&SetCookie("redir","0",null,"/",rURL);if(GetCookie("redir")!="0"){if(GetCookie("wsEntity")=="NA")return;if(GetCookie("wsEntity")=="EU")document.location="http://www.forex.com/uk/"+a;if(GetCookie("wsEntity")=="AU")document.location="http://www.forex.com/au/"+a;if(GetCookie("wsEntity")=="JP")document.location="http://jp.forex.com/jp/services/forextrader_open_demo.shtml";switch(true){case/AL|AD|AG|AN|AR|AM|AW|AT|AZ|BS|BD|BB|BE|BZ|BJ|BM|BT|BO|BA|BW|BR|VG|BN|BG|BF|KH|CM|CA|CV|KY|CF|TD|CL|CO|CK|CR|HR|CY|CZ|DK|DJ|DM|DO|TL|EC|SV|GQ|EE|ET|FO|FJ|FI|FR|GF|GB|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GT|GW|GY|HT|HN|HU|IS|IN|ID|IE|IL|IT|JM|KZ|KE|KG|KR|LA|LV|LS|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|MQ|MR|MU|MX|MD|MC|MN|ME|MZ|MM|NA|NR|NP|NL|NC|NI|NE|NG|NO|PK|PA|PG|PY|PE|PH|PL|PT|ZA|RE|RO|RU|RW|WS|SM|SN|RS|SC|SL|SK|SI|SB|SO|ZA|ES|LK|KN|LC|PM|VC|SR|SZ|SE|SG|CH|TJ|TA|TZ|TH|TG|TO|TT|TN|TR|TW|UG|UA|UY|UZ|VU|VA|VE|VN|ZM|ZW/.test(c):document.location="http://www.forex.com/uk/"+a;break;case/AU|NZ/.test(c):document.location="http://www.forex.com/au/"+a}}}function detectGeoDemoUK(){var c=GetCookie("geo"),e=new Querystring,d=e.get("redir"),b=window.location.pathname,a=b.substring(b.lastIndexOf("/")+1)+location.search;d=="0"&&SetCookie("redir","0",null,"/",rURL);if(GetCookie("redir")!="0"){if(GetCookie("wsEntity")=="EU")return;if(GetCookie("wsEntity")=="NA")document.location="http://www.forex.com/"+a;if(GetCookie("wsEntity")=="AU")document.location="http://www.forex.com/au/"+a;if(GetCookie("wsEntity")=="JP")document.location="http://jp.forex.com/jp/services/forextrader_open_demo.shtml";switch(true){case/HK|KP|US/.test(c):document.location="http://www.forex.com/"+a;break;case/AU|NZ/.test(c):document.location="http://www.forex.com/au/"+a}}}function detectGeoDemoAU(){var c=GetCookie("geo"),e=new Querystring,d=e.get("redir"),b=window.location.pathname,a=b.substring(b.lastIndexOf("/")+1)+location.search;d=="0"&&SetCookie("redir","0",null,"/",rURL);if(GetCookie("redir")!="0"){if(GetCookie("wsEntity")=="AU")return;if(GetCookie("wsEntity")=="NA")document.location="http://www.forex.com/"+a;if(GetCookie("wsEntity")=="EU")document.location="http://www.forex.com/uk/"+a;if(GetCookie("wsEntity")=="JP")document.location="http://jp.forex.com/jp/services/forextrader_open_demo.shtml";switch(true){case/HK|KP|US/.test(c):document.location="http://www.forex.com/"+a;break;case/AL|AD|AG|AN|AR|AM|AW|AT|AZ|BS|BD|BB|BE|BZ|BJ|BM|BT|BO|BA|BW|BR|VG|BN|BG|BF|KH|CM|CA|CV|KY|CF|TD|CL|CO|CK|CR|HR|CY|CZ|DK|DJ|DM|DO|TL|EC|SV|GQ|EE|ET|FO|FJ|FI|FR|GF|GB|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GT|GW|GY|HT|HN|HU|IS|IN|ID|IE|IL|IT|JM|KZ|KE|KG|KR|LA|LV|LS|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|MQ|MR|MU|MX|MD|MC|MN|ME|MZ|MM|NA|NR|NP|NL|NC|NI|NE|NG|NO|PK|PA|PG|PY|PE|PH|PL|PT|ZA|RE|RO|RU|RW|WS|SM|SN|RS|SC|SL|SK|SI|SB|SO|ZA|ES|LK|KN|LC|PM|VC|SR|SZ|SE|SG|CH|TJ|TA|TZ|TH|TG|TO|TT|TN|TR|TW|UG|UA|UY|UZ|VU|VA|VE|VN|ZM|ZW/.test(c):document.location="http://www.forex.com/uk/"+a}}}function detectGeoDemoUSMeta(){var c=GetCookie("geo"),e=new Querystring,d=e.get("redir"),b=window.location.pathname,a=b.substring(b.lastIndexOf("/")+1)+location.search;d=="0"&&SetCookie("redir","0",null,"/",rURL);if(GetCookie("redir")!="0"){if(GetCookie("wsEntity")=="NA")return;if(GetCookie("wsEntity")=="EU")document.location="http://www.forex.com/metatraderuk/"+a;if(GetCookie("wsEntity")=="AU")document.location="http://www.forex.com/metatraderau/"+a;if(GetCookie("wsEntity")=="JP")document.location="http://jp.forex.com/jp/metatrader/services/demo_account.shtml";switch(true){case/AL|AD|AG|AN|AR|AM|AW|AT|AZ|BS|BD|BB|BE|BZ|BJ|BM|BT|BO|BA|BW|BR|VG|BN|BG|BF|KH|CM|CA|CV|KY|CF|TD|CL|CO|CK|CR|HR|CY|CZ|DK|DJ|DM|DO|TL|EC|SV|GQ|EE|ET|FO|FJ|FI|FR|GF|GB|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GT|GW|GY|HT|HN|HU|IS|IN|ID|IE|IL|IT|JM|KZ|KE|KG|KR|LA|LV|LS|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|MQ|MR|MU|MX|MD|MC|MN|ME|MZ|MM|NA|NR|NP|NL|NC|NI|NE|NG|NO|PK|PA|PG|PY|PE|PH|PL|PT|ZA|RE|RO|RU|RW|WS|SM|SN|RS|SC|SL|SK|SI|SB|SO|ZA|ES|LK|KN|LC|PM|VC|SR|SZ|SE|SG|CH|TJ|TA|TZ|TH|TG|TO|TT|TN|TR|TW|UG|UA|UY|UZ|VU|VA|VE|VN|ZM|ZW/.test(c):document.location="http://www.forex.com/metatraderuk/"+a;break;case/AU|NZ/.test(c):document.location="http://www.forex.com/metatraderau/"+a}}}function detectGeoDemoUKMeta(){var c=GetCookie("geo"),e=new Querystring,d=e.get("redir"),b=window.location.pathname,a=b.substring(b.lastIndexOf("/")+1)+location.search;d=="0"&&SetCookie("redir","0",null,"/",rURL);if(GetCookie("redir")!="0"){if(GetCookie("wsEntity")=="EU")return;if(GetCookie("wsEntity")=="NA")document.location="http://www.forex.com/metatrader/"+a;if(GetCookie("wsEntity")=="AU")document.location="http://www.forex.com/metatraderau/"+a;if(GetCookie("wsEntity")=="JP")document.location="http://jp.forex.com/jp/metatrader/services/demo_account.shtml";switch(true){case/HK|KP|US/.test(c):document.location="http://www.forex.com/metatrader/"+a;break;case/AU|NZ/.test(c):document.location="http://www.forex.com/metatraderau/"+a}}}function detectGeoDemoAUMeta(){var c=GetCookie("geo"),e=new Querystring,d=e.get("redir"),b=window.location.pathname,a=b.substring(b.lastIndexOf("/")+1)+location.search;d=="0"&&SetCookie("redir","0",null,"/",rURL);if(GetCookie("redir")!="0"){if(GetCookie("wsEntity")=="AU")return;if(GetCookie("wsEntity")=="NA")document.location="http://www.forex.com/metatrader/"+a;if(GetCookie("wsEntity")=="EU")document.location="http://www.forex.com/metatraderuk/"+a;if(GetCookie("wsEntity")=="JP")document.location="http://jp.forex.com/jp/metatrader/services/demo_account.shtml";switch(true){case/HK|KP|US/.test(c):document.location="http://www.forex.com/metatrader/"+a;break;case/AL|AD|AG|AN|AR|AM|AW|AT|AZ|BS|BD|BB|BE|BZ|BJ|BM|BT|BO|BA|BW|BR|VG|BN|BG|BF|KH|CM|CA|CV|KY|CF|TD|CL|CO|CK|CR|HR|CY|CZ|DK|DJ|DM|DO|TL|EC|SV|GQ|EE|ET|FO|FJ|FI|FR|GF|GB|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GT|GW|GY|HT|HN|HU|IS|IN|ID|IE|IL|IT|JM|KZ|KE|KG|KR|LA|LV|LS|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|MQ|MR|MU|MX|MD|MC|MN|ME|MZ|MM|NA|NR|NP|NL|NC|NI|NE|NG|NO|PK|PA|PG|PY|PE|PH|PL|PT|ZA|RE|RO|RU|RW|WS|SM|SN|RS|SC|SL|SK|SI|SB|SO|ZA|ES|LK|KN|LC|PM|VC|SR|SZ|SE|SG|CH|TJ|TA|TZ|TH|TG|TO|TT|TN|TR|TW|UG|UA|UY|UZ|VU|VA|VE|VN|ZM|ZW/.test(c):document.location="http://www.forex.com/metatraderuk/"+a}}}
