var iPrimerRegistre = 1; var iNumRegistres = 20; var iIdAntiguitat=5; function RedefinirCerca(Cerca, method, iCanalId ,sFormUUID) { document.wddxForm.action = '/oferta/pLlistatOfertes.cfm'; oWddx = new Object(); oWddx.iCanalId = iCanalId; attributes = new Object(); i = Cerca.akeyword.length; Cerca.iIdAntiguitat = document.getElementById("iIdAntiguitat_" + sFormUUID).value; if (document.getElementById("keyWordRedefinirCerca_" + sFormUUID).value != '') { Cerca.akeyword[i] = document.getElementById("keyWordRedefinirCerca_" + sFormUUID).value; } Cerca.iPrimerRegistre=1; attributes = Cerca; oWddx.method=method; oWddx.attributes = attributes; wddxSerializer = new WddxSerializer(); document.wddxForm.wddx.value = wddxSerializer.serialize(oWddx); document.wddxForm.submit(); return false; } function enviarCercaMesOfertes(){ document.wddxForm.action = '/oferta/pLlistatOfertes.cfm'; oWddx = new Object(); attributes = new Object(); attributes.aKeyWord= new Array(); attributes.iPrimerRegistre=6; attributes.iNumRegistres=40; attributes.iIdAntiguitat=iIdAntiguitat; oWddx.method="CercaMesOfertes"; oWddx.attributes = attributes; wddxSerializer = new WddxSerializer(); document.wddxForm.wddx.value = wddxSerializer.serialize(oWddx); document.wddxForm.submit(); return false; } function enviarCercaRapida(){ document.wddxForm.action = '/oferta/pLlistatOfertes.cfm'; oWddx = new Object(); attributes = new Object(); attributes.sKeyWordInicial = document.getElementById('sKeywordInicial').value; attributes.aiIdProvincia = new Array(); attributes.aiIdProvincia[0] = document.getElementById('iIdProvincia')[document.getElementById('iIdProvincia').selectedIndex].value; attributes.aiIdCategoria = new Array(); attributes.aiIdCategoria[0] = document.getElementById('iIdCategoria')[document.getElementById('iIdCategoria').selectedIndex].value; attributes.aKeyWord= new Array(); attributes.iPrimerRegistre=iPrimerRegistre; attributes.iNumRegistres=iNumRegistres; attributes.iIdAntiguitat=iIdAntiguitat; oWddx.method="CercaRapida"; oWddx.attributes = attributes; wddxSerializer = new WddxSerializer(); document.wddxForm.wddx.value = wddxSerializer.serialize(oWddx); document.wddxForm.submit(); return false; } function enviarCercaAvanzada() { document.wddxForm.action = '/oferta/pLlistatOfertes.cfm'; oWddx = new Object(); attributes = new Object(); attributes.aKeyWord= new Array(); attributes.iPrimerRegistre = iPrimerRegistre; attributes.sKeyWordInicial = document.getElementById('sKeywordInicial').value; attributes.aiIdProvincia = new Array(); while(document.getElementById('aiIdProvincia').selectedIndex != -1) { attributes.aiIdProvincia[attributes.aiIdProvincia.length] = document.getElementById('aiIdProvincia')[document.getElementById('aiIdProvincia').selectedIndex].value; document.getElementById('aiIdProvincia')[document.getElementById('aiIdProvincia').selectedIndex].selected=false; } attributes.aiIdCategoria = new Array(); while(document.getElementById('aiIdCategoria').selectedIndex != -1) { attributes.aiIdCategoria[attributes.aiIdCategoria.length] = document.getElementById('aiIdCategoria')[document.getElementById('aiIdCategoria').selectedIndex].value; document.getElementById('aiIdCategoria')[document.getElementById('aiIdCategoria').selectedIndex].selected=false; } attributes.iIdAntiguitat = document.getElementById('iIdAntiguitat')[document.getElementById('iIdAntiguitat').selectedIndex].value; attributes.iNumRegistres = document.getElementById('iNumRegistres').value; attributes.iIdNivellEstudis = document.getElementById('iIdNivellEstudis')[document.getElementById('iIdNivellEstudis').selectedIndex].value; attributes.aiIdTipusContracte = new Array(); while(document.getElementById('aiIdTipusContracte').selectedIndex != -1) { attributes.aiIdTipusContracte[attributes.aiIdTipusContracte.length] = document.getElementById('aiIdTipusContracte')[document.getElementById('aiIdTipusContracte').selectedIndex].value; document.getElementById('aiIdTipusContracte')[document.getElementById('aiIdTipusContracte').selectedIndex].selected=false; } attributes.aiIdJornadaLaboral = new Array(); j = 0; for(i=0;i