var ans = new Array;
var done = new Array;
var yourAns = new Array;
var explainAnswer = new Array;

var score = 0;
ans[1] = "a";
ans[2] = "a";
ans[3] = "a";
ans[4] = "a";
ans[5] = "a";
ans[6] = "a";
ans[7] = "a";
ans[8] = "a";
ans[9] = "a";
ans[10] = "a";

explainAnswer[1]="A written policy is a fundamental to good safety management and essential for compliance with the Health & Safety at Work Act  (Sec2) if you have 5 or more employees. <A href=\"health-safety-management-systems.html\" target=\"_blank\">Find out more!</A>";
explainAnswer[2]="All employers must appoint one or more competent persons to assist with health and safety (Management of Health and Safety at Work Regulations). Many organisations great and small have appointed us! You can appoint us too! <A href=\"envex-safety-advisor.html\" target=\"_blank\">Find out more!</A>";
explainAnswer[3]="Risk assessments must be ‘suitable and sufficient’ in order to comply with the Management of Health & Safety at Work Regulations (Sec 3) Many HSE prosecutions are successful due the lack of a suitable risk assessment. <A href=\"envex-risk-management.html\" target=\"_blank\">Find out more!</A>";
explainAnswer[4]="A risk assessment must be undertaken for manual handling tasks that cannot be avoided and training provided for all employees who handle loads. <A href=\"training-courses-list.html\" target=\"_blank\">Find out more!</A>";
explainAnswer[5]="Our Appointed Safety Advisor Service provides you with regular updates. <A href=\"envex-safety-advisor.html\" target=\"_blank\">Find out more!</A>";
explainAnswer[6]="Employers must make ‘reasonable’ adjustments to their workplace or make other arrangements in order to provide the same service to disabled people. <A href=\"envex-safety-advisor.html\" target=\"_blank\">Find out more!</A>";
explainAnswer[7]="Workplace fire risk assessments are already a legal requirement and will be replacing the existing Fire Certificate. <A href=\"health-safety-fire-risk.html\" target=\"_blank\">Find out more!</A>";
explainAnswer[8]="Provision of training is a key element in an effective safety management system. <A href=\"envex-training-courses.html\" target=\"_blank\">Find out more!</A>";
explainAnswer[9]="An independent and thorough audit of your health & safety management system will identify any areas that need improvement. <A href=\"health-safety-auditing.html\" target=\"_blank\">Find out more!</A>";
explainAnswer[10]="We can assess the impact of these changes within your organisation and advise you on compliance. <A href=\"envex-risk-management.html\" target=\"_blank\">Find out more!</A>";

function Engine(question, answer) {
yourAns[question]=answer;
}

function Score(){
var answerText = "";
answerText=answerText+"<strong>How did you do?<\/strong><BR><HR size=1 noshade>";
for(i=1;i<=10;i++){
   answerText=answerText+"<BR><strong>Question :"+i+"<\/strong>";
  if(ans[i]!=yourAns[i]){
    answerText=answerText+"<BR>"+explainAnswer[i]+"<BR>";
  }
  else{
    answerText=answerText+" <BR><span class=redtext>Congratulations! That's the right answer! <\/span><BR>";
    score++;
  }
}

answerText=answerText+"<BR><HR size=1 noshade><strong>Your total score is: <\/strong>"+score+"<BR>";

answerText=answerText+"<BR>Comment : ";
if(score<=8){
answerText=answerText+"At least you’ve recognised that change is needed.  You would benefit from assistance / advice on health and safety. Call us now without obligation for a chat about how we might help you. We will tailor our advice to fit both your budget and your style.<BR>";
}
if(score>=9 && score <10){
answerText=answerText+"Congratulations! - You are meeting many essential requirements already but you still need to do more to satisfy your duties under legislation. So to find out how to put ticks into those final boxes – or to get us to measure just how well you’ve done in the areas that you have ticked – contact us now for a free no obligation chat!<BR>";
}

if(score>9){
answerText=answerText+"Congratulations! - You have set high standards but you may need help in maintaining them. That’s where Envex can help.<BR>";
}

answerText=answerText+"<BR>For more information on how we can help with all your Health and Safety requirements, please <A href=\"6-envex-contact.html\" target=\"_blank\"><strong>contact us<\/strong></A>";

resultswindow=window.open('', 'popup', 'top=100,left=100,width=600,height=480,scrollbars=yes,menubar=yes,toolbar=no')
resultswindow.document.write("<HTML><HEAD><TITLE>Your Results<\/TITLE><link href=\"envex.css\" rel=\"stylesheet\" type=\"text\/css\"><\/HEAD><BODY onLoad=\"window.focus()\"><div class=\"text\">")
resultswindow.document.write(answerText)
resultswindow.document.write("<\/div><\/BODY>")
answerText = "";

}