var helpW;
var offsetx;
var offsety;
var nowX;
var nowY;
var e;
var status;
var pad;
var bwidth;
var bcolor;

var nan = navigator.appName;
var isNN = (nan=='Netscape') ? 1 : 0;
var isIE = (nan.substring(0,9)=='Microsoft') ? 1 : 0;
var isN4 = isNN;

if (isN4) {pad = 3}
if (isIE) {
   pad = 6;
   bwidth = 0;
   bcolor = "#0000CC";
}
if (isN4||isNN) {
  if (bwidth > 0 && pad <= 3) {
     pad = 0;
  } else if (bwidth > 0 && pad > 3) {
     pad = pad - 3;
  }
}

function mouseX(evt) {
if (evt.pageX) return evt.pageX;
else if (evt.clientX)
   return evt.clientX + (document.documentElement.scrollLeft ?
   document.documentElement.scrollLeft :
   document.body.scrollLeft);
else return null;
}

function mouseY(evt) {
if (evt.pageY) return evt.pageY;
else if (evt.clientY)
   return evt.clientY + (document.documentElement.scrollTop ?
   document.documentElement.scrollTop :
   document.body.scrollTop);
else return null;
}

var popDiv = null;

function hideMe(x){
   if (popDiv != null) { popDiv.style.visibility = "hidden"; }
}

function showMe(x,e){
   if (popDiv == null)
   {
      popDiv = document.createElement('div');
      popDiv.setAttribute('id', 'popDiv');
      popDiv.className = 'tooltip';
      popDiv.style.position = "absolute";
      document.body.appendChild(popDiv);
   }

   popDiv.innerHTML = getDescrip('s'+x);
   popDiv.style.visibility = "visible";
   popDiv.style.position = "absolute";
   popDiv.style.top = mouseY(e)+'px';
   popDiv.style.left = mouseX(e)+10+'px';
}

function getDescrip(s) {
  d = 'Please contact us for further explanation, code='+s;
  switch (s) {
  case 's005' : d = "Please contact us for further explanation."; break;
  case 's010' : d = "Your order is awaiting processing and validation of payment."; break;
  case 's020' : d = "Your order is awaiting processing and validation of payment."; break;
  case 's030' : d = "Your order is ready for despatch if stock is available."; break;
  case 's040' : d = "Your order is in our warehouse awaiting picking."; break;
  case 's050' : d = "Please contact us for further explanation."; break;
  case 's060' : d = "Your order is ready for shipment"; break;
  case 's070' : d = "Please contact us for further explanation."; break;
  case 's080' : d = "Part of your order has been sent."; break;
  case 's090' : d = "Please contact us for further explanation."; break;
  case 's100' : d = "Please contact us for further explanation."; break;
  case 's200' : d = "Your order has been cancelled, please contact us."; break;
  case 's210' : d = "Your order has been held and is awaiting security checks. We will contact you should there be any problems."; break;
  case 's215' : d = "Your order is awaiting payment approval - please contact customer services."; break;
  case 's217' : d = "Please contact us for further explanation."; break;
  case 's220' : d = "All items have been shipped."; break;
  case 's230' : d = "Please contact us for further explanation."; break;
  case 's300' : d = "Please contact us for further explanation."; break;
  }
  return d;
}
