<!--Begin
function cover(form) {
a=eval(form.a.value);
b=eval(form.b.value);

info=form.info.value

x1=Math.round((b-(b*a/100))*.9)/1;
x2=Math.round((b-(b*a/100)-(b*5/100))*.9)/1;
x3=Math.round((b-(b*a/100)-(b*10/100))*.9)/1;
x4=Math.round((b-(b*a/100)-(b*15/100))*.9)/1;

x5=Math.round(((b-(b*a/100))*1)*1)/1;
x6=Math.round(((b-(b*a/100)-(b*5/100))*1)*1)/1;
x7=Math.round(((b-(b*a/100)-(b*10/100))*1)*1)/1;
x8=Math.round(((b-(b*a/100)-(b*15/100))*1)*1)/1;
 
form.info.value = info;
form.info.value="";
if (form.info.value == "NaN") form.info.value="Error";
if (b>5000) form.info.value = "This calculator can only accept a prices over £200 and less than £5000";
if (b<200) form.info.value = "This calculator can only accept a prices over £200 and less than £5000";
if (a<20) form.info.value = "Please select the age of the trailer and the press 'Calculate'";

form.x1.value = x1;
if (form.x1.value == "NaN") form.x1.value="Error";
if (b>5000) form.x1.value = "";
if (b<200) form.x1.value = "";
if (a<20) form.x1.value = "";

form.x4.value = x4;
if (form.x4.value == "NaN") form.x4.value="Error";
if (b>5000) form.x4.value = "";
if (b<200) form.x4.value = "";
if (a<20) form.x4.value = "";

form.x5.value = x5;
if (form.x5.value == "NaN") form.x5.value="Error";
if (b>5000) form.x5.value = "";
if (b<200) form.x5.value = "";
if (a<20) form.x5.value = "";

form.x8.value = x8;
if (form.x8.value == "NaN") form.x8.value="Error";
if (b>5000) form.x8.value = "";
if (b<200) form.x8.value = "";
if (a<20) form.x8.value = "";

}

Xoffset= -125;    // modify these values to ...
Yoffset= 60;    // change the popup position.

var old,skn,iex=(document.all),yyy=-1000;

var ns4=document.layers
var ne6=document.getElementById&&!document.all
var ie4=document.all

if (ns4)
skn=document.dek
else if (ne6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;

function popup(msg,bak){
var content="<TABLE WIDTH=250 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 BGCOLOR=#D6D6D6><TD><FONT COLOR=black SIZE=2>"+msg+"</FONT></TD></TABLE>";
yyy=Yoffset;
 if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
 if(ne6){document.getElementById("dek").innerHTML=content;skn.display=''}
 if(ie4){document.all("dek").innerHTML=content;skn.display=''}
}

function get_mouse(e){
var x=(ns4||ne6)?e.pageX:event.x+document.body.scrollLeft;
skn.left=x+Xoffset;
var y=(ns4||ne6)?e.pageY:event.y+document.body.scrollTop;
skn.top=y+yyy;
}

function kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ne6||ie4)
skn.display="none"
}

//-->
