//
// This chunk is for the summery box
//

var emsExp = /[$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\`\~\=\|\;\:\'\~\/\,\.\"\!\-\<\>\?\ĴabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ£]/; // *shrug*
var timerID = null ;
var timerRunning = false ;

function stop() {
	if(timerRunning) clearTimeout(timerID);  timerRunning = false;
}

function start() {
	stop(); show();
}

function show() {
	if (document.FrmSendDet.summary.value.length > 120) {
		document.FrmSendDet.summary.value=document.FrmSendDet.summary.value.substring(0,120);
		alert("Sorry! Item Summary can contain a maximum of 120 characters.");
	}
	document.FrmSendDet.txtCount.value = 120 - document.FrmSendDet.summary.value.length;
	timerID = setTimeout('show()',120);   timerRunning = true;
}

// for the sms sender

function showSMS() {
	if(document.SendSMS.smsmsg.value.length > 450) {
		document.SendSMS.smsmsg.value=document.SendSMS.smsmsg.value.substring(0,450);
		alert("Sorry! Message can contain a maximum of 450 characters.");
	}
	document.SendSMS.txtCount.value = 450 - document.SendSMS.smsmsg.value.length;
   document.SendSMS.txtUsedCount.value = document.SendSMS.smsmsg.value.length;
	timerID = setTimeout('showSMS()',450);   timerRunning = true;
}


function blockChars(obj,allowAt) {
	var str = obj.value;
	for(var i = 0; i < str.length; i++) {
		var lastChar = str.substr(i,1);
		if (lastChar == "£" || lastChar == "&" || lastChar == "+" || lastChar == '$' || lastChar == '"' || (lastChar == "@" && !allowAt)) {
			str = str.substring(0,i) + str.substr(i+1);
			i--;
		}
	}
	obj.value = str;
}

//
// not sure if this chunk is actually used!
//

function stopRemaining() {
	if(timerRunning) clearTimeout(timerID);  timerRunning = false;
}

function startRemaining() {
	stopRemaining(); showRemaining();
}

function showRemaining() {
   document.paymentForm.d.value = Math.round((document.paymentForm.it.value - document.paymentForm.s.value) * 100) / 100;
}

//
// popup maker
//

function popitup(url) {
	newwindow=window.open(url,'name','height=550,width=400');
	if (window.focus) {newwindow.focus()}
	return false;
}

// call this using
// <a href="popupex.html" onclick="return popitup('popupex.html')">Link to popup</a>

//
// count messages for client
//

var t;
var timer_is_on = 0;

function getMsgNumbers() {
   var myUrl = 'getnumbermessages.php';
   var myTarget = 'msg';
   if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
   } else {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }

   xmlhttp.onreadystatechange=function() {
   if (xmlhttp.readyState == 4 && xmlhttp.status==200) {
         document.getElementById(myTarget).innerHTML=xmlhttp.responseText;
      }
   }
   xmlhttp.open("GET",myUrl,true);
   xmlhttp.send(null);
   // start snoop
   // what is being moderated
   var pattmodscript=new RegExp("modenq.php");
   var myModEnq = 0;
   var myModRep = 0;
   if (pattmodscript.test(window.location.pathname)) {
      var queryString = new String();
      queryString = window.location.search;
      queryString = queryString.substring(1);
      var arr1 = new Array();     
      arr1 = queryString.split("&");
      for(var i = 0; i<arr1.length; i++)
         {
         var pattmevar=new RegExp("^e=");
         var pattmrvar=new RegExp("^i="); // do we need to store the related enquiry or just the followup?
         if (pattmevar.test(arr1[i])) {
            myModEnq = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            }
         else if (pattmrvar.test(arr1[i])) {
            myModRep = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            }
         }
      }
   // what transaction
   var patttranscript=new RegExp("transaction");
   var myPageTran = 0;
   if (patttranscript.test(window.location.pathname)) {
      var queryString = new String();
      queryString = window.location.search;
      queryString = queryString.substring(1);
      var arr1 = new Array();     
      arr1 = queryString.split("&");
      for(var i = 0; i<arr1.length; i++)
         {
         var patttrvar=new RegExp("^t=");
         if (patttrvar.test(arr1[i])) {
            myPageTran = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            }
         }
      }
   // what item
   var pattitemscript=new RegExp("item.php");
   var myPageItem = 0;
   if (pattitemscript.test(window.location.pathname)) {
      var queryString = new String();
      queryString = window.location.search;
      queryString = queryString.substring(1);
      var arr1 = new Array();     
      arr1 = queryString.split("&");
      for(var i = 0; i<arr1.length; i++)
         {
         var pattitvar=new RegExp("^item=");
         if (pattitvar.test(arr1[i])) {
            myPageItem = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            }
         }
      }
   // what enquiry
   var pattmessscript=new RegExp("message.php");
   var myPageMsg = 0;
   if (pattmessscript.test(window.location.pathname)) {
      var queryString = new String();
      queryString = window.location.search;
      queryString = queryString.substring(1);
      var arr1 = new Array();     
      arr1 = queryString.split("&");
      for(var i = 0; i<arr1.length; i++)
         {
         var pattmsgvar=new RegExp("^enq=");
         if (pattmsgvar.test(arr1[i])) {
            myPageMsg = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            }
         }
      }
   // what item update
   var patteiupdscript=new RegExp("modupdate.php");
   var myUpdate = 0;
   if (patteiupdscript.test(window.location.pathname)) {
      var queryString = new String();
      queryString = window.location.search;
      queryString = queryString.substring(1);
      var arr1 = new Array();     
      arr1 = queryString.split("&");
      for(var i = 0; i<arr1.length; i++)
         {
         var pattupdvar=new RegExp("^e=");
         if (pattupdvar.test(arr1[i])) {
            myUpdate = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            }
         }
      }
   // send the info to the server
   var myModUrl = 'setpageview.php?me=' + myModEnq + '&mr=' + myModRep + '&tr=' + myPageTran + '&it=' + myPageItem + '&eq=' + myPageMsg + '&eu=' +myUpdate;
   if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlmodhttp=new XMLHttpRequest();
   } else {// code for IE6, IE5
      xmlmodhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   xmlmodhttp.open("GET",myModUrl,true);
   xmlmodhttp.send(null);
   // end snoop
   // perform wait and run again
   t=setTimeout('getMsgNumbers()',30000);
}

function doGetMsgNumbers() {
if (!timer_is_on) {
  timer_is_on = 1;
  getMsgNumbers(); // getMsgNumbers(myUrl,myTarget);
  }
}

//
// count messages for moderators and return XML!!
//

var mt;
var nt;
var it;
var ct;
var et;
var oldActions = 0;
var totActions = 0;
var mtimer_is_on = 0;

// NUMBERS
function getModNumbers() {
   var myModUrl = 'getmodxml.php';
   if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
      modxmlhttp=new XMLHttpRequest();
   } else {// code for IE6, IE5
      modxmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   modxmlhttp.onreadystatechange=gotXML;
   modxmlhttp.open("GET",myModUrl,true);
   modxmlhttp.send(null);
   // perform wait and run again
   mt=setTimeout('getModNumbers()',30000);
}

function gotXML() {
   if (modxmlhttp.readyState == 4 && modxmlhttp.status==200) {
   xmlDoc = modxmlhttp.responseXML;
   totActions = xmlDoc.getElementsByTagName("notot")[0].childNodes[0].nodeValue;
   document.getElementById("notot").innerHTML=xmlDoc.getElementsByTagName("notot")[0].childNodes[0].nodeValue;
   document.getElementById("toenqs").innerHTML=xmlDoc.getElementsByTagName("toenqs")[0].childNodes[0].nodeValue;
   document.getElementById("notra").innerHTML=xmlDoc.getElementsByTagName("notra")[0].childNodes[0].nodeValue;
   document.getElementById("noshi").innerHTML=xmlDoc.getElementsByTagName("noshi")[0].childNodes[0].nodeValue;
   document.getElementById("noupd").innerHTML=xmlDoc.getElementsByTagName("noupd")[0].childNodes[0].nodeValue;
   document.getElementById("nonew").innerHTML=xmlDoc.getElementsByTagName("nonew")[0].childNodes[0].nodeValue;
   document.getElementById("noupl").innerHTML=xmlDoc.getElementsByTagName("noupl")[0].childNodes[0].nodeValue;
   if (oldActions == 0) {
      oldActions = totActions;
      }
   else if (totActions > oldActions) {
      oldActions = totActions;
      var playThisSound = getMetaContents('BBAUDAL');
      if (playThisSound == 1) MsgSound('Audio2');
      }
   else if (totActions < oldActions) {
      oldActions = totActions;
      }
   }
}

// NAMES
function getModNames() {
   var myModNamesUrl = 'getnamesxml.php?';
   // build the correct query
   var getTheNames = 0;
   // Moderating Enquiry or Reply?
   var pattpageme=new RegExp("modenq.php");
   var pageModEnq = 0;
   var pageModRep = 0;
   if (pattpageme.test(window.location.pathname)) {
      var queryString = new String();
      queryString = window.location.search;
      queryString = queryString.substring(1);
      var arr1 = new Array();     
      arr1 = queryString.split("&");
      for(var i = 0; i<arr1.length; i++)
         {
         var pageme=new RegExp("^e=");
         var pagemr=new RegExp("^i="); // do we need to store the related enquiry or just the followup?
         if (pageme.test(arr1[i])) {
            pageModEnq = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            myModNamesUrl += 'me=' + pageModEnq;
            getTheNames = 1;
            }
         else if (pagemr.test(arr1[i])) {
            pageModRep = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            myModNamesUrl += 'mr=' + pageModRep;
            getTheNames = 1;
            }
         }
      }
   // Item
   var pattpageit=new RegExp("item.php");
   var pageItem = 0;
   if (pattpageit.test(window.location.pathname)) {
      var queryString = new String();
      queryString = window.location.search;
      queryString = queryString.substring(1);
      var arr1 = new Array();     
      arr1 = queryString.split("&");
      for(var i = 0; i<arr1.length; i++) {
         var pageit=new RegExp("^item=");
         if (pageit.test(arr1[i])) {
            pageItem = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            myModNamesUrl += 'it=' + pageItem;
            getTheNames = 1;
            }
         }
      }
   // Enquiry
   var pattpageenq=new RegExp("message.php");
   var pageEnq = 0;
   if (pattpageenq.test(window.location.pathname)) {
      var queryString = new String();
      queryString = window.location.search;
      queryString = queryString.substring(1);
      var arr1 = new Array();     
      arr1 = queryString.split("&");
      for(var i = 0; i<arr1.length; i++) {
         var pageeq=new RegExp("^enq=");
         if (pageeq.test(arr1[i])) {
            pageEnq = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            myModNamesUrl += 'eq=' + pageEnq;
            getTheNames = 1;
            }
         }
      }
   // Purchase
   var pattpagetra=new RegExp("transaction");
   var pageTran = 0;
   if (pattpagetra.test(window.location.pathname)) {
      var queryString = new String();
      queryString = window.location.search;
      queryString = queryString.substring(1);
      var arr1 = new Array();     
      arr1 = queryString.split("&");
      for(var i = 0; i<arr1.length; i++) {
         var pagetr=new RegExp("^t=");
         if (pagetr.test(arr1[i])) {
            pageTran = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            myModNamesUrl += 'tr=' + pageTran;
            getTheNames = 1;
            }
         }
      }
   // Item Update
   var pattpageupd=new RegExp("modupdate.php");
   var pageUpdate = 0;
   if (pattpageupd.test(window.location.pathname)) {
      var queryString = new String();
      queryString = window.location.search;
      queryString = queryString.substring(1);
      var arr1 = new Array();     
      arr1 = queryString.split("&");
      for(var i = 0; i<arr1.length; i++) {
         var pageud=new RegExp("^e=");
         if (pageud.test(arr1[i])) {
            pageUpdate = arr1[i].toString().substring(arr1[i].toString().indexOf("=") + 1);
            myModNamesUrl += 'ud=' + pageUpdate;
            getTheNames = 1;
            }
         }
      }
   // now get and display the names if we are on the correct page
   if (getTheNames == 1) {
      if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
         modnamesxmlhttp=new XMLHttpRequest();
      } else {// code for IE6, IE5
         modnamesxmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
      modnamesxmlhttp.onreadystatechange=gotNamesXML;
      modnamesxmlhttp.open("GET",myModNamesUrl,true);
      modnamesxmlhttp.send(null);
      }
   // perform wait and run again
   nt=setTimeout('getModNames()',2000);
}

function gotNamesXML() {
   var myNames = '';
   if (modnamesxmlhttp.readyState == 4 && modnamesxmlhttp.status==200) {
   xmlNamesDoc = modnamesxmlhttp.responseXML;
   myNames = xmlNamesDoc.getElementsByTagName("names")[0].childNodes[0].nodeValue;
   myNames = myNames.replace(/\n/gi, "<br>");
   document.getElementById("modenqnames").innerHTML = '<b>Page Viewers Are:</b><br>' + myNames;
   }
}

// GET MOD INFO
function getModInfo() {
   var myModInfoUrl = 'getmodsinfoxml.php?';
   // now get and display the names if we are on the correct page
   if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
      modinfoxmlhttp=new XMLHttpRequest();
   } else {// code for IE6, IE5
      modinfoxmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   modinfoxmlhttp.onreadystatechange=gotModInfoXML;
   modinfoxmlhttp.open("GET",myModInfoUrl,true);
   modinfoxmlhttp.send(null);
   // perform wait and run again
   it=setTimeout('getModInfo()',1000);
}

function gotModInfoXML() {
   // alert('got this far 2!');
   var baseURL = 'https://www.bblist.co.uk/';
   var myModInfo = '';
   var myModUserInfo = '';
   if (modinfoxmlhttp.readyState == 4 && modinfoxmlhttp.status==200) {
   xmlModInfoDoc = modinfoxmlhttp.responseXML;
   // deal with those pesky moderators
   myModInfo = xmlModInfoDoc.getElementsByTagName("mods")[0].childNodes[0].nodeValue;
   myModInfo = myModInfo.replace(/\n/gi, "<br>");
   // now deal with those lovely clients
   if (xmlModInfoDoc.getElementsByTagName("users")[0].hasChildNodes) {
      // second stab at this
      x = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes;
      // if (x.length >= 20) myModUserInfo = '<font color=red>YAY, ' + pages + ' Pages being viewed!</font><br>';
      var pageViewer = '';
      var enqPage = '';
      var itemPage = '';
      var tranPage = '';
      var menqPage = '';
      var mmsgPage = '';
      var mitemPage = '';
      var extraHTML = '';
      // alert('viewers ' + x.length);
      for (p=0; p < x.length; p++) {
         var bver=new RegExp("MSIE");
         if (navigator.appName == 'Microsoft Internet Explorer' && bver.test(navigator.appVersion)) { // CHECK IE
            pageViewer = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[p].getAttribute("person");
            enqPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[p].getAttribute("enq"); 
            itemPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[p].getAttribute("item");
            tranPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[p].getAttribute("tran");
            menqPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[p].getAttribute("menq");
            mmsgPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[p].getAttribute("mmsg");
            mitemPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[p].getAttribute("mitem");
            }
         else { // Decent Browser?
            pp = p + 1;
            try {
               pageViewer = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[pp].attributes.getNamedItem("person").nodeValue;
               enqPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[pp].attributes.getNamedItem("enq").nodeValue;
               itemPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[pp].attributes.getNamedItem("item").nodeValue;
               tranPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[pp].attributes.getNamedItem("tran").nodeValue;
               menqPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[pp].attributes.getNamedItem("menq").nodeValue;
               mmsgPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[pp].attributes.getNamedItem("mmsg").nodeValue;
               mitemPage = xmlModInfoDoc.getElementsByTagName("users")[0].childNodes[pp].attributes.getNamedItem("mitem").nodeValue;
               }
            catch (er) {
               pageViewer = 'Barff';
               enqPage = 0;
               itemPage = 0;
               tranPage = 0;
               }
            }
         if (enqPage != 0) extraHTML = 'Enquiry <a href="' + baseURL + 'message.php?enq=' + enqPage + '">' + enqPage + '</a>';
         else if (itemPage != 0) extraHTML = 'Item <a href="' + baseURL + 'item.php?item=' + itemPage + '">' + itemPage + '</a>';
         else if (tranPage != 0) extraHTML = 'Transaction <a href="' + baseURL + 'transactionm.php?t=' + tranPage + '">' + tranPage + '</a>';
         else if (mitemPage != 0) extraHTML = '<font color=red>Updating</font> <a href="' + baseURL + 'modupdate.php?e=' + mitemPage + '">' + mitemPage + '</a>';
         else if (mmsgPage != 0 && menqPage != 0) extraHTML = '<font color=red>Mod Reply</font> <a href="' + baseURL + 'modenq.php?m=' + menqPage + '&i=' + mmsgPage + '">' + menqPage + '</a>';
         else if (mmsgPage == 0 && menqPage != 0) extraHTML = '<font color=red>Mod Enquiry</font> <a href="' + baseURL + 'modenq.php?e=' + menqPage + '">' + menqPage + '</a>';
         else extraHTML = '';
         if (pageViewer != 'Barff') myModUserInfo = myModUserInfo + pageViewer + ' - ' + extraHTML + '<br>';
         }
      }
   else {
      myModUserInfo = 'None Active! Gahhh!';
      }
   // this puts it all in place
   document.getElementById("modallinfo").innerHTML = '<b>Logged in active moderators are:</b><br>' + myModInfo + '<br><b>Logged in and active Users are:</b><br>' + myModUserInfo;
   }
}

function getModClock() {
   var eDate = getMetaContents('BBDATE')
   var enqDate = Number(eDate);
   enqDate = enqDate * 1000;
   // var enqDate = new Date(eDate);
   var todayDate = Number(new Date().getTime());
   var ageDate = todayDate - enqDate;
   var age = new Date(ageDate);
   // alert('eDate: ' + eDate + ' enqDate: ' + enqDate + ' todayDate: ' + todayDate + ' ageDate: ' + ageDate + ' age: ' + age);
   var d = age.getDate();
   var h = age.getHours();
   var m = age.getMinutes();
   var s = age.getSeconds();
   m=checkTime(m);
   s=checkTime(s);
   d = d - 1;
   document.getElementById("modetime").innerHTML = '<p><center><b>Enquiries Age:</b><br><span class=clockr>Days: '+ d + ', ' + h + ':' + m + ':' + s + '</span></center></p>';
   // perform wait and run again
   ct=setTimeout('getModClock()',1000);
}

function checkTime(i)
{
//i=i.toNumber();
if (i<10)
  {
  // i = i.toString();
  i = "0" + i;
  }
return i;
}

function getModZeroClock() {
   document.getElementById("modetime").innerHTML = '<p><center><b>Enquiries Age:</b><br><span class=clockb>Days: 0, 00:00:00</span></center></p>';
}

var myVis = 1;

function getModEnq() {
   // alert('got this far!!');
   var modEnqNumber = getMetaContents('BBENQMOD');
   var modEnqNumberType = getMetaContents('BBENQMODT'); // i / f
   var myMEUrl = 'getmodenq.php?msgid=' + modEnqNumber + '&msgt=' + modEnqNumberType;
   if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
      mexmlhttp=new XMLHttpRequest();
   } else {// code for IE6, IE5
      mexmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }

   mexmlhttp.onreadystatechange=gotModEnqXML;
   mexmlhttp.open("GET",myMEUrl,true);
   mexmlhttp.send(null);
   if (myVis == 1) et=setTimeout('getModEnq()',1000);
   }

function gotModEnqXML() {
   if (mexmlhttp.readyState == 4 && mexmlhttp.status==200) {
   mexmlDoc = mexmlhttp.responseXML;
   var meExist = mexmlDoc.getElementsByTagName("enq")[0].childNodes[0].nodeValue;

   if (meExist == '0' && myVis ==1) {
      // alert('Gone from queue!');
      toggleVis('mod01');
      toggleVis('mod02');
      myVis = 0;
      }
   }
}

function doGetModNumbers() {
if (!mtimer_is_on) {
   mtimer_is_on=1;
   getModNumbers(); // getMsgNumbers(myUrl,myTarget);
   getModNames(); // this will fill the names
   // if mod is on home page then show the Mods Info
   if (getMetaContents('BBENQMOD') != 0) {
      // alert('yma');
      getModEnq();
      }
   if (getMetaContents('BBMX') != 0) {
      getModInfo();
      if (getMetaContents('BBSEC') == 0) {
         getModZeroClock();
         }
      else {
         getModClock();
         }
      }
   }
}
//
// array the Meta Tag's and get the one called for
//
function getMetaContents(mn){
  var m = document.getElementsByTagName('meta');
  for(var i in m){
      if(m[i].name == mn){
         return m[i].content;
         }
      }
   return 0;
   }

//
// staff chit chat
//

// routine to show the messages

var cht;
var chtMessagesHTML = '';
var ch_timer_is_on = 0;
var last_cht_id = 0

function getChitChat() {
   var myChatUrl = 'getchatxml.php?lid=' + last_cht_id;
   if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
      chatxmlhttp=new XMLHttpRequest();
   } else {// code for IE6, IE5
      chatxmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   chatxmlhttp.onreadystatechange=gotChitChatXML;
   chatxmlhttp.open("GET",myChatUrl,true);
   chatxmlhttp.send(null);
   // perform wait and run again
   cht=setTimeout('getChitChat()',6000);
}

function gotChitChatXML() {
if (chatxmlhttp.readyState == 4 && chatxmlhttp.status==200) {
   var msgHTML = '';
   var theChat = '<table border=0 cellspacing=1 cellpadding=3>';
   xmlChatDoc = chatxmlhttp.responseXML;
   // parase the chat messages
   if (xmlChatDoc.getElementsByTagName("chat")[0].hasChildNodes) {
      // second stab at this
      mx = xmlChatDoc.getElementsByTagName("chat")[0].childNodes;
      var msgID = '';
      var msgName = '';
      var msgTime = '';
      var msgText = '';
      var msgLI = '';
      for (mp=0; mp < mx.length; mp++) {
         var mbver=new RegExp("MSIE");
         if (navigator.appName == 'Microsoft Internet Explorer' && mbver.test(navigator.appVersion)) { // CHECK IE
            msgID = xmlChatDoc.getElementsByTagName("chat")[0].childNodes[mp].getAttribute("id");
            msgName = xmlChatDoc.getElementsByTagName("chat")[0].childNodes[mp].getAttribute("name");
            msgTime = xmlChatDoc.getElementsByTagName("chat")[0].childNodes[mp].getAttribute("time"); 
            msgText = xmlChatDoc.getElementsByTagName("chat")[0].childNodes[mp].getAttribute("msg");
            msgLI = xmlChatDoc.getElementsByTagName("chat")[0].childNodes[mp].getAttribute("li");
            }
         else { // Decent Browser?
            mpp = mp + 1;
            try {
               msgID = xmlChatDoc.getElementsByTagName("chat")[0].childNodes[mpp].attributes.getNamedItem("id").nodeValue;
               msgName = xmlChatDoc.getElementsByTagName("chat")[0].childNodes[mpp].attributes.getNamedItem("name").nodeValue;
               msgTime = xmlChatDoc.getElementsByTagName("chat")[0].childNodes[mpp].attributes.getNamedItem("time").nodeValue;
               msgText = xmlChatDoc.getElementsByTagName("chat")[0].childNodes[mpp].attributes.getNamedItem("msg").nodeValue;
               msgLI = xmlChatDoc.getElementsByTagName("chat")[0].childNodes[mpp].attributes.getNamedItem("li").nodeValue;
               }
            catch (er) {
               msgName = 'Barff';
               // msgID = 0;
               msgTime = 0;
               msgText = 0;
               }
            }
         // process msgText to look for URL
         var patturl=new RegExp("://");
         if (patturl.test(msgText)) {
            // now we look for the url strip before, the url, and after. and rebuild as one with the link anew
            // find begining of http(s)://...
            var split1 = msgText.search(/http/i);
            var msgBegin = msgText.slice(0,split1);
            var msgRest = msgText.slice(split1);
            var split2 = msgRest.search(/\s/i);
            if (split2 != -1) {
               var msgURL = msgRest.slice(0,split2);
               var msgEnd = msgRest.slice(split2);
               }
            else {
               var msgURL = msgRest;
               var msgEnd = '';
               }
            // now build it again with the url as a hyperlink
            msgText = msgBegin + '<a href=' + msgURL + ' target=main>' + msgURL + '</a>' + msgEnd;
            }
         if (msgName != 'Barff' && msgLI == 'yes') msgHTML = msgHTML + '<tr><td class=msgfrmli valign=top nowrap>' + msgName + '</td><td valign=top>' + msgText + '</td></tr>';
         else if (msgName != 'Barff' && msgLI == 'no') msgHTML = msgHTML + '<tr><td class=msgfrmlo valign=top nowrap>' + msgName + '</td><td valign=top>' + msgText + '</td></tr>';
         }
      // check the latest message id
      if (msgID > last_cht_id) {
         last_cht_id = msgID;
         MsgSound('Audio1');
         // alert('new message!');
         // boing?
         }
      }
   /*
   else {
      msgHTML = '<tr><td>No messages! Gahhh!</td></tr>';
      }
   */
   chtMessagesHTML = chtMessagesHTML + msgHTML;
   // return the messages here
   theChat = theChat + chtMessagesHTML; // '<tr><td class=msgfrm>name</td><td>msg</td></tr>'
   // end the HTML to be returned and send it to the browser
   theChat = theChat + '</table>';
   document.getElementById("chitchat").innerHTML= theChat;
   // scroll?
   scrollme();
   /*
   scrollitup = document.getElementById('chfrm');
   scrollitup.scrollTop = scrollitup.scrollHeight;
   */
   }
}

function doGetChitChat() {
if (!ch_timer_is_on) {
  ch_timer_is_on = 1;
  getChitChat(); // getMsgNumbers(myUrl,myTarget);
  }
}

// routine to database messages
function sendModMsg() {
   // document.formModChat.mymsg.value
   var modMessage = document.formModChat.mymsg.value;
   // make this uri safe for GET
   var modMessageEnq=escape(modMessage);
   modMessageEnq = modMessageEnq.replace("+", "%2B");
   modMessageEnq = modMessageEnq.replace("/", "%2F");
   // send the info to the server
   var myModMsgUrl = 'savemodmsg.php?msg=' + modMessageEnq;
   if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlmodmsghttp=new XMLHttpRequest();
   } else {// code for IE6, IE5
      xmlmodmsghttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   xmlmodmsghttp.open("GET",myModMsgUrl,true);
   xmlmodmsghttp.send(null);
   document.formModChat.mymsg.value = '';
}

/*
function MsgSound(soundobj) {
 var thissound= eval("document."+soundobj);
 try {
     thissound.Play();
 }
 catch (e) {
     thissound.DoPlay();
 }
}
*/

function MsgSound(soundobj) {
  var thissound=document.getElementById(soundobj);
  thissound.Play();
}

//
// Scrolling for the frame
//
var fft;
var ff_timer_is_on = 0;

function scrollme(){
   dh=document.body.scrollHeight;
   ch=parent.window.document.getElementById("chfrm").height;
   if(dh>ch){
      moveme=dh-ch
      window.scrollTo(0,moveme)
      }
   }

function fixFrame() {
   // get some vars
   if (parseInt(navigator.appVersion)>3) {
      if (navigator.appName=="Netscape") {
         winW = window.innerWidth-16;
         winH = window.innerHeight-16;
         }
      if (navigator.appName.indexOf("Microsoft")!=-1) {
         winW = document.body.offsetWidth-20;
         winH = document.body.offsetHeight-20;
         }
      }
   // mh = window.document.body.height;
   // alert('my height = ' + winH + ' width = ' + winW);
   window.document.getElementById("chfrm").height = winH - 170;
   fft=setTimeout('fixFrame()',500);
   }

function doFixFrame() {
// this puppy did not work!
if (!ff_timer_is_on) {
  ff_timer_is_on = 1;
  fixFrame();
  }
}

// logged in staff stuff

var sst;
var ssHTML = '';
var ss_timer_is_on = 0;

function staffStuff() {
   var mySSUrl = 'getstaffxml.php';
   if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
      ssxmlhttp=new XMLHttpRequest();
   } else {// code for IE6, IE5
      ssxmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   ssxmlhttp.onreadystatechange=gotStaffStuffXML;
   ssxmlhttp.open("GET",mySSUrl,true);
   ssxmlhttp.send(null);
   // perform wait and run again
   sst=setTimeout('staffStuff()',5000);
   }

function gotStaffStuffXML(){

if (ssxmlhttp.readyState == 4 && ssxmlhttp.status==200) {
   var theStaff = '<b>Logged in:</b>';
   xmlStaffDoc = ssxmlhttp.responseXML;
   // parase the chat messages
   if (xmlStaffDoc.getElementsByTagName("staff")[0].hasChildNodes) {
      // second stab at this
      sx = xmlStaffDoc.getElementsByTagName("staff")[0].childNodes;
      var stID = '';
      var stName = '';
      for (mp=0; mp < sx.length; mp++) {
         var mbver=new RegExp("MSIE");
         if (navigator.appName == 'Microsoft Internet Explorer' && mbver.test(navigator.appVersion)) { // CHECK IE
            stID = xmlStaffDoc.getElementsByTagName("staff")[0].childNodes[mp].getAttribute("id");
            stName = xmlStaffDoc.getElementsByTagName("staff")[0].childNodes[mp].getAttribute("name");
            }
         else { // Decent Browser?
            mpp = mp + 1;
            try {
               stID = xmlStaffDoc.getElementsByTagName("staff")[0].childNodes[mpp].attributes.getNamedItem("id").nodeValue;
               stName = xmlStaffDoc.getElementsByTagName("staff")[0].childNodes[mpp].attributes.getNamedItem("name").nodeValue;
               }
            catch (er) {
               stName = 'Barff';
               }
            }
         if (stName != 'Barff') {
            if (theStaff == '<b>Logged in:</b>') theStaff = theStaff + '&nbsp;'
            else theStaff = theStaff + ',&nbsp;'
            theStaff = theStaff + stName;
            }
         }
      }
   // return the messages here
   ssHTML = theStaff;
   document.getElementById("staffstrap").innerHTML= ssHTML;
   }
   }

function doStaffStuff() {
   if (!ss_timer_is_on){
      ss_timer_is_on =1;
      staffStuff();
      }
   }

//
// math functions for forms
//

function CalcPayment() {
   if (document.paymentForm.surp.checked == true){
      document.paymentForm.s.value = Math.round((document.paymentForm.it.value - document.paymentForm.escf.value)*100)/100;
   }
   else {
      document.paymentForm.s.value = Math.round((document.paymentForm.it.value)*100)/100;
   }
}

function checkBuyerSum() {
   if (Math.round(document.paymentForm.bs.value * 100) >= Math.round(document.paymentForm.ft.value * 100)){
      document.paymentForm.bs.value = document.paymentForm.ft.value;
   }
}

function showCalcComm() {
   document.paymentForm.commtotal.value = Math.round(((document.paymentForm.itemnet.value * document.paymentForm.commrate.value) / 100)*100)/100;
   document.paymentForm.commission.value = Math.round((document.paymentForm.commtotal.value)*100)/100;
   document.paymentForm.totaldue.value = Math.round((document.paymentForm.totalfunds.value - document.paymentForm.commission.value)*100)/100;
}

function showCalcComm2() {
   document.paymentForm.commrate.value = Math.round((document.paymentForm.commtotal.value / document.paymentForm.itemnet.value * 100)*100)/100;
   document.paymentForm.commission.value = Math.round((document.paymentForm.commtotal.value)*100)/100;
   document.paymentForm.totaldue.value = Math.round((document.paymentForm.totalfunds.value - document.paymentForm.commission.value)*100)/100;
}

function showCalcComm3() {
   document.paymentForm.totaldue.value = Math.round((document.paymentForm.totalfunds.value - document.paymentForm.commission.value)*100)/100;
}

// non escrow

function showCalcComm4() {
   document.paymentForm.commtotal.value = Math.round(((document.paymentForm.itemnet.value * document.paymentForm.commrate.value) / 100)*100)/100;
}

function showCalcComm5() {
   document.paymentForm.commrate.value = Math.round((document.paymentForm.commtotal.value / document.paymentForm.itemnet.value * 100)*100)/100;
}

//

function refundCalc1() {
/*for (i=0;i<document.paymentForm.bclf.length;i++){
if (document.paymentForm.bclf[i].checked==true) alert(i);
}*/
   // buyer cleared funds first
   if (document.paymentForm.bclf[0].checked==true){
      document.paymentForm.bref.value = Math.round((document.paymentForm.refundsum.value)*100)/100;
      if (document.paymentForm.ts.value == 'Completed') {
         document.paymentForm.vpay.value = - Math.round(document.paymentForm.refundsum.value*100)/100;
      } else {
         document.paymentForm.vpay.value = Math.round((document.paymentForm.fp.value - document.paymentForm.refundsum.value)*100)/100;
      }
   } else {
      if (document.paymentForm.ts.value == 'Completed') {
         document.paymentForm.vpay.value = - Math.round((document.paymentForm.fp.value - document.paymentForm.refundsum.value)*100)/100;
      } else {
         document.paymentForm.vpay.value = Math.round((document.paymentForm.refundsum.value)*100)/100;
      }
      document.paymentForm.bref.value = Math.round((document.paymentForm.fp.value - document.paymentForm.refundsum.value)*100)/100;
   }
   // alert if refund too much
   if (parseFloat(document.paymentForm.refundsum.value) > parseFloat(document.paymentForm.fp.value)) {
      alert("You have entered too high a sum: " + document.paymentForm.refundsum.value);
   }
   // original shipping costs next
   if (document.paymentForm.oshc[0].checked==true){
      document.paymentForm.bosc.value = Math.round((document.paymentForm.refship.value)*100)/100;
      if (document.paymentForm.ts.value == 'Completed') {
         document.paymentForm.vosc.value = - Math.round(document.paymentForm.refship.value*100)/100;
      } else {
         document.paymentForm.vosc.value = Math.round((document.paymentForm.oship.value - document.paymentForm.refship.value)*100)/100;
      }
   } else {
      if (document.paymentForm.ts.value == 'Completed') {
         document.paymentForm.vosc.value = - Math.round((document.paymentForm.oship.value - document.paymentForm.refship.value)*100)/100;
      } else {
         document.paymentForm.vosc.value = Math.round((document.paymentForm.refship.value)*100)/100;
      }
      document.paymentForm.bosc.value = Math.round((document.paymentForm.oship.value - document.paymentForm.refship.value)*100)/100;
   }
   // alert if refund ship too much
   if (parseFloat(document.paymentForm.refship.value) > parseFloat(document.paymentForm.oship.value)) {
      alert("You have entered too high a shipping sum: " + document.paymentForm.refship.value);
   }
   // bank charges
   if (document.paymentForm.bchrg.checked==true){
      document.paymentForm.bbc.value = document.paymentForm.bankch.value;
      document.paymentForm.vbc.value = -document.paymentForm.bankch.value;
   } else {
      document.paymentForm.vbc.value = '0.00';
      document.paymentForm.bbc.value = '0.00';
   }
   // other charges
   if (document.paymentForm.ochrg.checked==true){
      document.paymentForm.boc.value = document.paymentForm.otherch.value;
      document.paymentForm.voc.value = -document.paymentForm.otherch.value;
   } else {
      document.paymentForm.voc.value = '0.00'; // 0
      document.paymentForm.boc.value = '0.00';
   }
   // return shipping
   // NB we should check that this exists first or we will have errors
   if (document.paymentForm.reti){
      if (document.paymentForm.rshc.checked==true && document.paymentForm.reti[1].selected==true){ // also need to check if the item IS to be returned! Done! (I THINK)
         document.paymentForm.brs.value = document.paymentForm.retship.value;
         document.paymentForm.vrs.value = -document.paymentForm.retship.value;
      } else {
         document.paymentForm.vrs.value = '0.00';
         document.paymentForm.brs.value = '0.00';
      }
   }
   // if vendor has paid we now need to bring commission into the equation
   if (document.paymentForm.comm){
      if (document.paymentForm.vcom.checked==true){
         document.paymentForm.vcp.value = document.paymentForm.comm.value;
      } else {
         document.paymentForm.vcp.value = '0.00';
      }
      // alert if refund too much
      if (parseFloat(document.paymentForm.comm.value) > parseFloat(document.paymentForm.vcomp.value)) {
         alert("You have entered too high a commission sum: " + document.paymentForm.comm.value);
      }
   }
   // buyer / vendor sub-totals
   document.paymentForm.bstot.value = Math.round((parseFloat(document.paymentForm.bref.value) + parseFloat(document.paymentForm.bosc.value) + parseFloat(document.paymentForm.bbc.value) + parseFloat(document.paymentForm.boc.value))*100)/100;
   document.paymentForm.vstot.value = Math.round((parseFloat(document.paymentForm.vpay.value) + parseFloat(document.paymentForm.vosc.value) + parseFloat(document.paymentForm.vbc.value) + parseFloat(document.paymentForm.voc.value))*100)/100;

   // buyer / vendor totals
   if (document.paymentForm.reti && document.paymentForm.comm){
      document.paymentForm.btot.value = Math.round((parseFloat(document.paymentForm.bref.value) + parseFloat(document.paymentForm.bosc.value) + parseFloat(document.paymentForm.bbc.value) + parseFloat(document.paymentForm.boc.value) + parseFloat(document.paymentForm.brs.value))*100)/100;
      document.paymentForm.vtot.value = Math.round((parseFloat(document.paymentForm.vpay.value) + parseFloat(document.paymentForm.vosc.value) + parseFloat(document.paymentForm.vbc.value) + parseFloat(document.paymentForm.voc.value) + parseFloat(document.paymentForm.vrs.value) + parseFloat(document.paymentForm.vcp.value) + parseFloat(document.paymentForm.vech.value))*100)/100;
   } else if (document.paymentForm.reti){
      document.paymentForm.btot.value = Math.round((parseFloat(document.paymentForm.bref.value) + parseFloat(document.paymentForm.bosc.value) + parseFloat(document.paymentForm.bbc.value) + parseFloat(document.paymentForm.boc.value) + parseFloat(document.paymentForm.brs.value))*100)/100;
      document.paymentForm.vtot.value = Math.round((parseFloat(document.paymentForm.vpay.value) + parseFloat(document.paymentForm.vosc.value) + parseFloat(document.paymentForm.vbc.value) + parseFloat(document.paymentForm.voc.value) + parseFloat(document.paymentForm.vrs.value) + parseFloat(document.paymentForm.vech.value))*100)/100;
   } else {
      document.paymentForm.btot.value = Math.round((parseFloat(document.paymentForm.bref.value) + parseFloat(document.paymentForm.bosc.value) + parseFloat(document.paymentForm.bbc.value) + parseFloat(document.paymentForm.boc.value))*100)/100;
      document.paymentForm.vtot.value = Math.round((parseFloat(document.paymentForm.vpay.value) + parseFloat(document.paymentForm.vosc.value) + parseFloat(document.paymentForm.vbc.value) + parseFloat(document.paymentForm.voc.value) + parseFloat(document.paymentForm.vech.value))*100)/100;
   }
   // vendor balance due
   document.paymentForm.vbal.value = Math.round((parseFloat(document.paymentForm.vtot.value) + parseFloat(document.paymentForm.vavb.value))*100)/100;
   //
   // calculate the invoiced commission
   //
   if (document.paymentForm.invcomm){
      // document.paymentForm.icsvp.value = document.paymentForm.vpay.value;
      if (document.paymentForm.invcomm[1].selected==true){ // check if commission is to be invoiced
         if (document.paymentForm.v.value == 'VAT') {
            var refrate = 100 + parseFloat(document.paymentForm.vr.value);
            var refundnet = Math.round((document.paymentForm.bref.value / refrate * 100)*100)/100; // 115 
         } else {
            var refundnet = Math.round(parseFloat(document.paymentForm.bref.value)*100)/100;
         }
         // alert (document.paymentForm.bref.value + ' - ' + document.paymentForm.vr.value + ' - ' + refundnet + ' - ' + refrate);
         document.paymentForm.icsvp.value = document.paymentForm.itn.value - refundnet;
         if (document.paymentForm.icco[1].checked==true){
            document.paymentForm.ictc.value = Math.round(((document.paymentForm.icsvp.value * document.paymentForm.iccr.value) / 100)*100)/100;
         } else {
            document.paymentForm.ictc.value = Math.round(((document.paymentForm.icos.value * document.paymentForm.iccr.value) / 100)*100)/100;
         }
      } else {
         document.paymentForm.ictc.value = 0;
      }
   }
}

//
// toggle visability of objects
//

function toggleVis(obj){
        with(document.getElementById(obj).style){
                if(display != 'none'){
                        display = 'none';
                }else{
                        display = '';
                }
        }
}

//
// toggle visability of notes
//

function toggleNoteHide(obj){
        with(document.getElementById(obj).style){
                        display = 'none';
        }
}

function toggleNoteShow(obj){
        with(document.getElementById(obj).style){
                        display = '';
        }
}

//
// show / hide disclaimer
//

function toggleDisclaimerShow(obj){
   with(document.getElementById(obj).style){
      display = '';
   }
   document.formShipSel.mi.value = 'No';
}
 
function toggleDisclaimerHide(obj){
   with(document.getElementById(obj).style){
      display = 'none';
   }
   document.formShipSel.mi.value = 'Yes';
}

//
// switch between sub menu bars...
//

function displaySubHome() {
   with(document.getElementById('homesub').style){
      display = '';
   }
   with(document.getElementById('equipsub').style){
      display = 'none';
   }
   with(document.getElementById('mybbsub').style){
      display = 'none';
   }
   with(document.getElementById('modssub').style){
      display = 'none';
   }
}

function displaySubEquip() {
   with(document.getElementById('homesub').style){
      display = 'none';
   }
   with(document.getElementById('equipsub').style){
      display = '';
   }
   with(document.getElementById('mybbsub').style){
      display = 'none';
   }
   with(document.getElementById('modssub').style){
      display = 'none';
   }
}

function displaySubMyBB() {
   with(document.getElementById('homesub').style){
      display = 'none';
   }
   with(document.getElementById('equipsub').style){
      display = 'none';
   }
   with(document.getElementById('mybbsub').style){
      display = '';
   }
   with(document.getElementById('modssub').style){
      display = 'none';
   }
}

function displaySubMods() {
   with(document.getElementById('homesub').style){
      display = 'none';
   }
   with(document.getElementById('equipsub').style){
      display = 'none';
   }
   with(document.getElementById('mybbsub').style){
      display = 'none';
   }
   with(document.getElementById('modssub').style){
      display = '';
   }
}

function stockPhrase(a) {
   if (a == 1) document.msg.reply.value = document.msg.stock01.value;
   if (a == 2) document.msg.reply.value = document.msg.stock02.value;
   if (a == 3) document.msg.reply.value = document.msg.stock03.value;
   if (a == 4) document.msg.reply.value = document.msg.stock04.value;
   if (a == 5) document.msg.reply.value = document.msg.stock05.value;
   if (a == 6) document.msg.reply.value = document.msg.stock06.value;
   if (a == 7) document.msg.reply.value = document.msg.stock07.value;
   if (a == 8) document.msg.reply.value = document.msg.stock08.value;
   if (a == 9) document.msg.reply.value = document.msg.stock09.value;
   if (a == 10) document.msg.reply.value = document.msg.stock10.value;
   if (a == 11) document.msg.reply.value = document.msg.stock11.value;
   if (a == 12) document.msg.reply.value = document.msg.stock12.value;
   if (a == 13) document.msg.reply.value = document.msg.stock13.value;
   if (a == 14) document.msg.reply.value = document.msg.stock14.value;
   if (a == 15) document.msg.reply.value = document.msg.stock15.value;
   if (a == 16) document.msg.reply.value = document.msg.stock16.value;
   if (a == 17) document.msg.reply.value = document.msg.stock17.value;
   if (a == 18) document.msg.reply.value = document.msg.stock18.value;
   if (a == 19) document.msg.reply.value = document.msg.stock19.value;
   if (a == 20) document.msg.reply.value = document.msg.stock20.value;
   if (a == 21) document.msg.reply.value = document.msg.stock21.value;
   if (a == 22) document.msg.reply.value = document.msg.stock22.value;
   if (a == 23) document.msg.reply.value = document.msg.stock23.value;
   if (a == 24) document.msg.reply.value = document.msg.stock24.value;
   if (a == 25) document.msg.reply.value = document.msg.stock25.value;
   if (a == 26) document.msg.reply.value = document.msg.stock26.value;
   if (a == 27) document.msg.reply.value = document.msg.stock27.value;
   if (a == 28) document.msg.reply.value = document.msg.stock28.value;
   if (a == 29) document.msg.reply.value = document.msg.stock29.value;
   if (a == 30) document.msg.reply.value = document.msg.stock30.value;
   if (a == 31) document.msg.reply.value = document.msg.stock31.value;
   if (a == 32) document.msg.reply.value = document.msg.stock32.value;
   if (a == 33) document.msg.reply.value = document.msg.stock33.value;
   if (a == 34) document.msg.reply.value = document.msg.stock34.value;
   if (a == 35) document.msg.reply.value = document.msg.stock35.value;
   if (a == 36) document.msg.reply.value = document.msg.stock36.value;
   if (a == 37) document.msg.reply.value = document.msg.stock37.value;
   if (a == 38) document.msg.reply.value = document.msg.stock38.value;
   if (a == 39) document.msg.reply.value = document.msg.stock39.value;
   if (a == 40) document.msg.reply.value = document.msg.stock40.value;
   document.msg.reply.value += '\n\n';
   document.msg.reply.value += document.msg.sig.value;
}

function addSig() {
   document.msg.reply.value += '\n\n';
   document.msg.reply.value += document.msg.sig.value;
}

// http://www.track-trace.com/
// https://www.parcel2go.com/parcel-tracking.aspx
// http://cgi.tnt.co.uk/trackntrace/trackntrace.asp
// http://wwwapps.ups.com/etracking/tracking.cgi?TypeOfInquiryNumber=T&commit=Track!&InquiryNumber1=
// http://www.royalmail.com/portal/rm/track?trackNumber=
// http://www.parcelforce.com/portal/pw/track?trackNumber=
// http://www.fedexuk.net/accounts/QuickTrack.aspx?consignment=
// http://www.dhl.co.uk/content/gb/en/express/tracking.shtml?brand=DHL&AWB=
// http://www.interparcel.com/tracking.php?action=dotrack&trackno=

function show_mod_name_alert()
{
alert("Names are included in the message! Please edit!");
}

