function onMyMenuOpen(obj) {
var dl = obj.dl;
var dt = obj.dt;
var dd = obj.dd;
var d = document.createElement('div');
};
function onMyMenuClose(obj) {
var dl = obj.dl;
var dt = obj.dt;
var dd = obj.dd;
var d = document.createElement('div');
};
var oOptions= {
/*all options are optional*/
/* [ bool ] if dependent is false, then each menu open/close independently*/
dependent:false,
/* [function] callback when a menu is opened*/
onOpen:onMyMenuOpen,
/* [function] ccallback when a menu is closed*/
onClose:onMyMenuClose,
/* [array] cdefault ids of opened menues'
*/
openedIds:[], /*['my-dt-1','my-dt-2','my-dt-3','my-dt-4','my-dt-5','my-dt-6'],*/
/* [number ] seconds for animations*/
seconds:0.2,
/*[ bool ] set true if the animation is to be played slower and slower and vise versa*/
easeOut:false,
/*[ bool ] set true if the animation is to be played*/
animation:true
}
var setting = new AccordionMenu.setting('my-dl',oOptions);
function refineSearch(filtre, type){
sURL = '';
if(getVar('sKeyword') != '')
sURL = sURL + '&sKeyword=' + getVar('sKeyword');
if((getVar('aiIdProvincia') != '') && (getVar('aiIdProvincia') != '%2D1'))
sURL = sURL + '&aiIdProvincia=' + getVar('aiIdProvincia');
if((getVar('iArea') != '') && (getVar('iArea') != '%2D1'))
sURL = sURL + '&iArea=' + getVar('iArea');
if((getVar('sCategoria') != '') && (getVar('sCategoria') != '%2D1'))
sURL = sURL + '&sCategoria=' + getVar('sCategoria');
if((getVar('esperienza') != '') && (getVar('esperienza') != '%2D1'))
sURL = sURL + '&esperienza=' + getVar('esperienza');
if((getVar('studi') != '') && (getVar('studi') != '%2D1'))
sURL = sURL + '&studi=' + getVar('studi');
if((getVar('contratto') != '') && (getVar('contratto') != '%2D1'))
sURL = sURL + '&contratto=' + getVar('contratto');
switch(filtre){
case 1:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + '&sKeyword=' + type + sURL;
break
case 2:
//la region se hace mediante pFiltraPorRegionRun.
break
case 3:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + '&iArea=' + type + sURL;
break
case 4:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + '&esperienza=' + type + sURL;
break
case 5:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + '&studi=' + type + sURL;
break
case 6:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + '&contratto=' + type + sURL;
break
}
return false;
}
function dropFiltre(filtre, type){
sURL = '';
if(getVar('sKeyword') != ''){
lKeywordsNou = new Array();
skeywordinicial = getVar('sKeyword');
KW = skeywordinicial.replace(/,/g,' ');
KW = KW.replace(/%20/g,' ');
KW = KW.replace(/%27/g,'\'');
pattern = /\s\s*/;
aKW = KW.split(pattern);
i = aKW.length;
j = 0;
for (x = 0; x < i; x++){
item = aKW[x];
if(item.length != 0){
if(item != type){
lKeywordsNou[j] = item;
j++;
}
}
}
sURL = sURL + '&sKeyword=' + lKeywordsNou;
}
if((filtre != 2) && (getVar('aiIdProvincia') != ''))
sURL = sURL + '&aiIdProvincia=' + getVar('aiIdProvincia');
if((filtre != 3) && (getVar('iArea') != ''))
sURL = sURL + '&iArea=' + getVar('iArea');
if((filtre != 3) && (getVar('sCategoria') != ''))
sURL = sURL + '&sCategoria=' + getVar('sCategoria');
if((filtre != 4) && (getVar('esperienza') != ''))
sURL = sURL + '&esperienza=' + getVar('esperienza');
if((filtre != 5) && (getVar('studi') != ''))
sURL = sURL + '&studi=' + getVar('studi');
if((filtre != 6) && (getVar('contratto') != ''))
sURL = sURL + '&contratto=' + getVar('contratto');
switch(filtre){
case 1:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + sURL;
break
case 2:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + sURL;
break
case 3:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + sURL;
break
case 4:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + sURL;
break
case 5:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + sURL;
break
case 6:
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1' + sURL;
break
}
return false;
}
function dropAll(){
document.location.href = '/oferta/sitemap/pLlistatOfertesSiteMapSenseJS.cfm' + '?iPrimerRegistre=1';
return false;
}
function trim(cad)
{
return cad.replace(/^\s+|\s+$/g,"");
}
function getVar(cad)
{
var Url = location.href;
Url = Url.replace(/.*\?(.*?)/,"$1");
Variables = Url.split ("&");
for (i = 0; i < Variables.length; i++) {
Separ = Variables[i].split("=");
eval ('var '+Separ[0]+'="'+Separ[1]+'"');
if(Separ[0] == cad)
return Separ[1];
}
return '';
}