
function removefrombasket(basketid)
{
window.location.href='eshop/ecom_data.php?dw=removefrombasket&basketid=' + basketid;
}


var _w = null;
function createNew(thispic) {
mypic = thispic;
  _w = window.open();
  _w.document.open();
_w.document.write('<html><head><title>Full Image Preview</title></head><body><a href="javascript:window.close();">Close Window</a><br>');
  _w.document.write('<img src = "');
  _w.document.write (mypic);
  _w.document.write ('">');
  
  _w.document.write('</body></html>');
  _w.document.close();
}

function LargePic(pic, x, y, prodid) {
  if (!x) x=800;
  if (!y) y=600;
  var settings="location=no,scrollbars=no,status=no,resizeable=no,top=30,left=100,width="+x+",height="+y;
  window.open("/eshop/ecom_largepic.php?pic="+pic+"&productid="+prodid, "", settings);
}


function chkcheckout1()
{
fieldlist=new Array();
fielderrorlist=new Array();

fieldlist = ["clientfname","clientsname","clientaddress1","clienttown","clientpostcode","clientemail"];
fielderrorlist = ["First Name","Surname","Address","Town","Postcode","Email"];

for (i=0; i < fieldlist.length; i++){
formitem=fieldlist[i];
if (document.forms.theform[formitem].value.length<3){
alert("Please ensure " + fielderrorlist[i] + " is entered!");
document.forms.theform[formitem].focus();
return false;
break;
}
}
}
function countryselect(thisone)
{
  var inc=document.searchbox.searchcountry.selectedIndex;
  var itemc=document.searchbox.searchcountry.options[inc].value;
parent.location.href=("index.php?p=<?php echo $p?>&opt=getcountys&searchcountry=" + itemc);
}
function countyselect(thisone)
{
  var inc=document.searchbox.searchcountry.selectedIndex;
  var itemc=document.searchbox.searchcountry.options[inc].value;
  var ind=document.searchbox.searchcounty.selectedIndex;
  var item=document.searchbox.searchcounty.options[ind].value;
if(item != ''){
parent.location.href=("index.php?p=<?php echo $p?>&op=gettowns&searchcounty=" + item + "&searchcountry=" + itemc );
}
}
