var tabResultats;
function carrega( o ) {
if ( o.id=="eina" ) return;
var url="";
url="carregaCercador.asp?"+o.id+"="+escape( o.value )+"&"+o.id+"_size="+o.options.length+"&idioma=en";
var p=objecteAjax();
peticioAjax(p, url, function() {
if (p.readyState == 4) {
eval( p.responseText );
}
} );
var producte=document.getElementById("producte");
var activitat=document.getElementById("activitat");
var imgProducte=document.getElementById("imgProducte");
var imgActivitat=document.getElementById("imgActivitat");
if ( o.id!="proces")
imgProducte.src="./dades/imgFitxa/Productes/"+prod(unescape(producte.options[ producte.selectedIndex ].value))+".jpg";
else
imgProducte.src="img/search.png";
imgProducte.alt="";
imgActivitat.src="./dades/imgFitxa/Activitats/"+unescape(activitat.options[ activitat.selectedIndex ].value)+".jpg";
imgActivitat.alt="";
}
function carregaEspecialitats() {
var url="";
url="carregaEspecialitats.asp?idioma=en";
var p=objecteAjax();
peticioAjax(p, url, function() {
if (p.readyState == 4) {
eval( p.responseText );
}
} );
}
function cercar() {
var producte=document.getElementById("producte");
var activitat=document.getElementById("activitat");
var subactivitat=document.getElementById("subactivitat");
var eina=document.getElementById("eina");
var especialitat=document.getElementById("especialitat");
var pais=document.getElementById("pais");
var sEina=document.getElementById("seleccionaEina").checked;
var sEmpresa=!document.getElementById("seleccionaEina").checked;
if ( producte.value=="-1" && sEina) {
alert("The field product is required!!!");
return;
}
if ( activitat.value=="-1" && sEina ) {
alert("The field work is required!!!");
return;
}
if ( eina.value=="-1" && sEina ) {
alert("The field tool is required!!!");
return;
}
if ( especialitat.value=="-1" && pais.value=="-1" && sEmpresa ) {
alert("Specialty or country must be selected!!!");
return;
}
var url="";
if (sEina)
url="fesCerca.asp?eina="+eina.value+"&idioma=en";
else
url="fesCercaEspecialitat.asp?especialitat="+escape(especialitat.value)+"&pais="+escape(pais.value)+"&idioma=en";
var p=objecteAjax();
peticioAjax(p, url, function() {
if (p.readyState == 4) {
eval( p.responseText );
}
} );
return;
}
function objecteAjax() {
var peticion = false;
try {
peticion = new XMLHttpRequest();
} catch (trymicrosoft) { try {
peticion = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) { try {
peticion = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
peticion = false;
}}}
return peticion;
}
function peticioAjax( peticion,url, f ) {
peticion.open('GET', url);
peticion.onreadystatechange = f;
peticion.send(null);
}
/* Funcions del cercadors */
function clearResults() {
var doc=document.getElementById("docs");
doc.innerHTML="
";
s+="
"+unescape(nom)+"
";
s+="
"
s+="
"+unescape(direccio)+"
";
s+="
"+unescape(pais)+"
";
s+="
"+unescape(telefon)+"
";
var w=unescape(web);
if (w.indexOf("http://")==-1) w="http://"+w;
s+="
";
s+="
"+unescape(especialitat)+"
";
s+="
";
s+="
"
disText="%3Cb%3EDesign%3A%20%3C/b%3E%3Cp%3EValoraci%F3%20d%27aspectes%20formals%20i%20d%27accessibilitat.%3C/p%3E";
infText="%3Cb%3EInformation%3A%20%3C/b%3E%3Cp%3EAssessment%20of%20the%20quantity%20and%20accessibility%20of%20content%20that%20allow%20the%20choice%20of%20appropriate%20equipment.%3C/p%3E";
preText="%3Cb%3EPrevention%3A%20%3C/b%3E%3Cp%3EInformation%20and%20support%20for%20safety%20and%20health%20%28rating-specific%20information%20available%20for%20the%20user-related%20issues%20that%20can%20prevent%20accidents%20and%20occupational%20diseases%29.%3C/p%3E";
s+="
"+drawPuntuacio( pDisseny, "dis" )+"
";
s+="
"+drawPuntuacio( pContingut, "inf" )+"
";
s+="
"+drawPuntuacio( pPrevencio, "pre" )+"
";
s+="
"
s+="
";
if ( document.getElementById("seleccionaEina").checked ) {
tabResultats.getContent(3).innerHTML+=s;
} else {
doc.innerHTML+=s;
}
}
function afegeixFitxa( nom, tipus, funcio, descripcio, udisseny, tipAccidents, cPrev, imatge, cequip, accidents, desviacions, fcontacte, tlesio, pcritics, PRL, tecseguraid, itecseg,caccidents,cusuaris ) {
var doc=document.getElementById("docs");
var s="";
tabResultats.getContent(0).innerHTML+="";
if ( unescape(nom)!="" ) s+="
Name
"+unescape(nom);
if ( unescape(tipus)!="" ) s+="
Type
"+unescape(tipus);
/*if ( unescape(funcio)!="" ) s+="
Funcio
"+unescape(funcio);*/
if ( unescape(descripcio)!="" ) s+="
Description
"+unescape(descripcio);
if ( unescape(udisseny)!="" ) s+="
Design Units
"+unescape(udisseny);
p1Text="%3Cp%3EClassification%20of%20the%20computer%20system%20Delta%20%28Annex%20IV%2C%20Classification%20material%20agent%20disaggregated%20to%204%20levels%20ORDER%20TAS/2926/2002%2C%2019%20November%2C%20which%20establishes%20a%20new%20model%20for%20the%20notification%20of%20occupational%20accidents%20and%20the%20possible%20transmission%20through%20electronic%20voting.%20OSG.%20279%2C%2021%20November%202002%29%3C/p%3E";
p2Text="%3Cp%3ENumber%20of%20accidents%20where%20the%20agent%20material%20has%20been%20included%20above.%3C/p%3E";
p3Text="%3Cp%3EThe%20classification%20of%20abnormal%20deviation%20describes%20the%20fact%20that%20breaks%20the%20normal%20development%20and%20continuity%20of%20the%20work%3A%20for%20example%2C%20total%20or%20partial%20loss%20of%20control%20of%20a%20machine%20or%20a%20fall%20on%20something%20or%20from%20something.%20%28Gencat%202006%29%3C/p%3E";
p4Text="%3Cp%3EThe%20classification%20of%20the%20contact%20form%20/%20type%20of%20injury%20%28which%20causes%20injury%20or%20action%29%20described%20how%20the%20victim%20was%20injured%20and%20how%20it%20came%20into%20contact%20with%20the%20object%20%28material%20agent%29%20that%20caused%20the%20injury.%20%28Gencat%202006%29%3C/p%3E";
p5Text="%3Cp%3EThe%20classification%20of%20the%20contact%20form%20/%20type%20of%20injury%20%28which%20causes%20injury%20or%20action%29%20described%20how%20the%20victim%20was%20injured%20and%20how%20it%20came%20into%20contact%20with%20the%20object%20%28material%20agent%29%20that%20caused%20the%20injury.%20%28Gencat%202006%29%3C/p%3E";
if ( unescape(cequip)!="" ) tabResultats.getContent(1).innerHTML+="
Tool code (Delta)
"+unescape(cequip);
if ( unescape(caccidents)!="" ) tabResultats.getContent(1).innerHTML+="
Accident code (delta)
"+unescape(caccidents);
if ( unescape(accidents)!="" ) tabResultats.getContent(1).innerHTML+="
Accidents recorded
"+unescape(accidents);
if ( unescape(tlesio)!="" ) tabResultats.getContent(1).innerHTML+="
Type of injury
"+unescape(tlesio);
if ( unescape(tipAccidents)!="" ) tabResultats.getContent(1).innerHTML+="
Types of accident
"+unescape(tipAccidents);
if ( unescape(desviacions)!="" ) tabResultats.getContent(1).innerHTML+="
Deviations
"+unescape(desviacions);
if ( unescape(fcontacte)!="" ) tabResultats.getContent(1).innerHTML+="
Contact forms
"+unescape(fcontacte);
if ( unescape(cPrev)!="" ) tabResultats.getContent(2).innerHTML+="
Prevention tips
"+unescape(cPrev);
if ( unescape(cusuaris)!="" ) tabResultats.getContent(2).innerHTML+="
User tips
"+unescape(cusuaris);
if ( unescape(pcritics)!="" ) tabResultats.getContent(2).innerHTML+="
Security critical points
"+unescape(pcritics);
if ( unescape(PRL)!="" ) tabResultats.getContent(2).innerHTML+="
Choice according to the LRP
"+unescape(PRL);
if ( unescape(tecseguraid)!="" ) tabResultats.getContent(2).innerHTML+="
Tecnologia más segura identificada
"+unescape(tecseguraid);
if ( unescape(itecseg)!="" ) tabResultats.getContent(2).innerHTML+="
Technological innovations for safety and health
"+unescape(itecseg);
s+="
";
document.getElementById("nomEina").innerHTML=unescape(nom);
tabResultats.getContent(0).innerHTML+=s;
initLightbox();
}
function afegeixModel( nom, model, proveidor, caracteristiques, observacions ) {
var s="";
s+="";
s+="
"+unescape(model)+"
";
if ( unescape(proveidor)!="" ) s+="
Supplier
"+unescape(proveidor);
if ( unescape(caracteristiques)!="" ) s+="
Features
"+unescape(caracteristiques);
if ( unescape(observacions)!="" ) s+="
Comment
"+unescape(observacions);
s+="
"
tabResultats.getContent(4).innerHTML+=s;
initLightbox();
}
function drawPuntuacio( puntuacio, imatge ) {
var s="";
for (var i=0;i