
function SetDirection(direction){if(direction=='pause'){if(!confirm(lang("I wish to continue later")))return false;}else if(direction=='next'){var x=document.getElementsByTagName('*');var i;var answerA='';for(i=0;i<x.length;i++){if(x[i].id){if(x[i].id.substring(0,4)=='rdiv'){answered=0;for(j=0;j<x.length;j++){if(x[j].id){if(x[j].id.substring(0,16)=='RSPS'+x[i].id.substring(4,16)){switch(x[j].type){case'checkbox':case'radio':if(x[j].checked)answered=1;break;case'text':case'select-one':case'textarea':if(x[j].value)answered=1;break;default:break;}}}}
if(!answered){document.getElementById(x[i].id).className='repdivMandatory';if(!answerA)answerA=x[i].id.substring(4);}else document.getElementById(x[i].id).className='repdiv';}}}}
if(answerA){document.location='#'+answerA;alert(lang("the framed answers are mandatory"));}else{document.outputForm.direction.value=direction;document.outputForm.submit();}}
function validate(special,cpt){str='';for(i=0;i<cpt;i++){eval('flag=document.outputForm.cb_'+special+'_'+i+'.checked');eval('val=document.outputForm.'+special+'_'+i+'.value');if(flag){if(str)str=str+' | ';str=str+val;}}
eval('document.outputForm.'+special+'.value=str');update();}
function update(){return true;}
function form_updated(){return true;}
function zipToCity(foo1,foo2){return true;}
function pourcent_compute(obj){total=0;$$('.'+obj.className).each(function(o){total+=parseInt(o.value);});$(obj.className).style.backgroundColor=total==100?'#9F9':'#F99';$(obj.className).update(total+'%');$(obj.className+'_text').update(total==100?'':'Attention : vérifiez que votre total est égal à 100%');}