function explodeArray(item,delimiter, ct) {
  tempArray=new Array(1);
  var Count=0;
  var tempString=new String(item);

  while (tempString.indexOf(delimiter)>0) {
    tempArray[Count]=tempString.substr(0,tempString.indexOf(delimiter));
    tempString=tempString.substr(tempString.indexOf(delimiter)+1,tempString.length-tempString.indexOf(delimiter)+1); 
    Count=Count+1
  }

  tempArray[Count]=tempString;
  var bit=tempArray.length;


var col=0;
document.f.ship.options.length=1;

while(col<bit){

var strthis=tempArray[col];
var strarr=strthis.split(',');
var thisone=strarr[0];
var thistwo=strarr[1];
var thisthree=strarr[2];
var suppid=strarr[3];

if(thistwo!='')
{
var gostr=thisone;
col++;
var optionObj = new Option(thistwo, gostr);
//document.f.ship.options[thisthree] = optionObj;
document.f.ship.options[col] = optionObj;
}

if (thisone==ct) {
var done=1;
//document.bollo.selectman.options[thisthree].selected = true;
}

document.f.supp2.value = suppid;
}

//document.bollo.selectman.options[thisone].selected = true;


var opt = new Option('All Ships', '0');
document.f.ship.options[0] = opt;

if (done!=1)
{
document.f.ship.options[0].selected = true;
}
}



function getTo1(it){
red='itin.php?supp='+it;
location.href=(red);
}

function getTo2(it){
supp=document.f.supp.value;
red='itin.php?ship='+it+'&supp='+supp;
location.href=(red);
}

function jump1(page){aPopUp=window.open(page,'TradeonlyHelp','titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=470,height=300')} 



function jump2(page){aPopUp2=window.open('perspop.php?id='+page,'Contact','titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=240,height=320')} 

function gon(){
if (document.n.eml.value=='') 
{
alert('Please enter your Email Address');
}
else if (document.n.eml.value.indexOf("@") == -1 ||
                             document.n.eml.value == "")
    {
      alert("Please enter a valid email address (you have not entered an @ sign)");
    }
else if (document.n.eml.value.indexOf(".") == -1 ||
                             document.n.eml.value == "")
    {
      alert("Please enter a valid email address (you have not entered a full stop anywhere)");
    }
else {
document.n.submit();
}
}

function binfold() {
if (confirm('Are you sure you want to empty your Folder?'))
{
location.href='actions/bin.php';
}
}
