1function OnGetCountriesModal(bError, oData) { 2 var oSelect = $("#countryselectorModal"); 3 var sOptions = ""; 4 var sCont = ""; 5 var sNorthAmerica = "WF VI VG VN VU US TV TC TM TT TK TG, TL TH TW LK ZA SB SI SG SL SM WS VC PM LC KN RE PR PN PH PG PA PW PK MP NF NU NI NZ NC AN NP NR MM MS MN FM MX YT MU MQ MH ML MV MY MO LA KP KR KI JP JM IT IL IQ IR ID IS HU HK HN HM HT GY GW GN GT GU GP GD GL GH PF GF FJ GQ SV DO DM CZ CU CR AF AX AS AI AG AW AU AZ BS BH BD BB BZ BM BT BV IO BN BF BI KH CM CA KY CN CX CC KM CK"; 6 var sLatinAmerica = "VE UY SR SH PE PY AR BO BR CL CO EC FK"; 7 8 if (!bError){ 9 sOptions += "<option cont='europe' value=''>Please select a country</option>"; 10 11 for (i = 0; i < oData[0].length; i++){ 12 if (sNorthAmerica.indexOf(oData[0][i].sCode) > -1){ 13 sCont = "northamerica"; 14 }else if (sLatinAmerica.indexOf(oData[0][i].sCode) > -1){ 15 sCont = "latinamerica"; 16 }else{ 17 sCont = "europe"; 18 } 19 20 sOptions += "<option cont='" + sCont + "' value='" + oData[0][i].sCode + "'>" + oData[0][i].sName + "</option>"; 21 } 22 } 23 24 oSelect.html(sOptions); 25 } 26 27 function DAID_ReadyGlobal(){ 28 if (!DAID.isNothing(DAID.ActionCodeData)){ 29 if (DAID.ActionCodeData.sReturnValue == "3"){ 30 alert("Successfully unsubscribed from the newsletter!"); 31 32 DAID.reloadLocation(); 33 }else{ 34 alert(ActionCodeData.stError.sMessage); 35 } 36 } 37 38 DAID.loggedIn(OnLoggedInGlobal); 39 40 41 42 43 //Get countries for Flexlinks modal dialog 44 DAID.getCountries(OnGetCountriesModal); 45 //Get countries for contact form 46 if (typeof OnGetCountries == "function"){ 47 DAID.getCountries(OnGetCountries); 48 } 49 50 } 51 52 function OnLoggedInGlobal(bError, oData){ 53 if (!bError){ 54 LoggedInStatusGlobal(oData.sReturnValue == "1"); 55 } 56 } 57 58 function LoggedInStatusGlobal(bLoggedIn){ 59 if (bLoggedIn){ 60 DAID.getAccountInfo(OnGetAccountInfoGlobal); 61 }else{ 62 $("#btnLogin").css("display", "block"); 63 } 64 } 65 66 function OnGetAccountInfoGlobal(bError, oData){ 67 if (!bError){ 68 $("#btnLogout").css("display", "block"); 69 70 $("#spnUsername").html("Welcome " + oData.sFirstName); 71 } 72 } 73 74 function DagaLogout(){ 75 if (confirm("Are you sure you want to log out from DAID?")){ 76 DAID.logout(OnDagaLogoutGlobal); 77 } 78 } 79 80 function OnDagaLogoutGlobal(bError, oData){ 81 if (!bError){ 82 if (oData.sReturnValue == "1"){ 83 document.location.href = "http://www.dataaccess.eu"; 84 } 85 } 86 }
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.