/*-------------------------------------------------------------------------------------------------*/ function CountryCombo(ComboId,defValue) { for (var bucle=0;bucle<=2;bucle++) { document.getElementById(ComboId).options[bucle] = new Option (COUNTRY.Item[bucle].NOMPAIS,COUNTRY.Item[bucle].PAIS) document.getElementById(ComboId).options[bucle].selected = (COUNTRY.Item[bucle].PAIS==defValue) } } /*-------------------------------------------------------------------------------------------------*/ function CountryComboInternational(ComboId,defValue) { for (var bucle=0;bucle<=COUNTRY.RecordCount-1;bucle++) { document.getElementById(ComboId).options[bucle] = new Option (COUNTRY.Item[bucle].NOMPAIS,COUNTRY.Item[bucle].PAIS) document.getElementById(ComboId).options[bucle].selected = (COUNTRY.Item[bucle].PAIS==defValue) } } /*-------------------------------------------------------------------------------------------------*/ function CountryName(CountryID) { if (CountryID==null) {return;} var bucle; var item; for (bucle=0;bucle<=COUNTRY.RecordCount-1;bucle++) {if (COUNTRY.Item[bucle].PAIS==CountryID) {return COUNTRY.Item[bucle].NOMPAIS}} } /*-------------------------------------------------------------------------------------------------*/ function CountryId(CountryName) { if (CountryName==null) {return;} var bucle; var item; CountryName=CountryName.toUpperCase(); for (bucle=0;bucle<=COUNTRY.RecordCount-1;bucle++) {if (COUNTRY.Item[bucle].NOMPAIS==CountryName) {return COUNTRY.Item[bucle].PAIS}} } /*-------------------------------------------------------------------------------------------------*/ /*Dades*/ /***************************** ESTRUCTURES *******************************/ function COUNTRY$FIELDS(NOMPAIS,PAIS) { this.NOMPAIS=NOMPAIS; this.PAIS=PAIS; } function COUNTRY() { this.AbsolutePage = 1; this.First = 0; this.Item = new Array(); this.Last = 10; this.Name = 'COUNTRY' this.PageCount = 1; this.PageSize = 10; this.RecordCount = 1; } var COUNTRY=new COUNTRY(); var I=0; /***************************** DADES *******************************/ with (COUNTRY){ Item[I++]=new COUNTRY$FIELDS('ESPAŅA','34');}