function MM_openBrWindow(theURL,winName,features) { //v2.0
  var win = window.open(theURL,winName,features);
  win.moveTo((((screen.width-450)/2)), ((screen.height - 465)/2));
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function addItem(){
	
	var product;
	var quantity;
	var basketString;
	var x = 0;
	var addedTo = "no";
	var query = window.location.search.substring(1);
 	var vars = query.split("&");
	
	if (query != ""){
		for (var i=0; i<vars.length; i++) {
	
    	var pair = vars[i].split("=");
		
			
			if (pair[1] != "") {
				
				if (pair[1] == "order") {
			
					product = pair[0];
				
				}else{
					
					quantity = pair[1];
					
				}
			}
		} 
	
		product = product.replace(/order/, "");
		
		if (quantity == null){
			alert("you need to enter a quantity");
			return;
		}
		
		basketString = get_cookie("basket");
		
		if (basketString != ""){
			
			var currentBasket = basketString.split(",");
			
			basketString = "";
			
			while(x < currentBasket.length){
			
				var productNumber = Left(currentBasket[x], currentBasket[x].indexOf("a"));
				
				if (productNumber == product){
					
					var quantityOf = Right(currentBasket[x], currentBasket[x].indexOf("a"));
					
					quantityOf = Number(quantityOf) + Number(quantity);
					
					currentBasket[x] = productNumber + "a" + quantityOf;
					
					addedTo = "yes";
					
				}
				
				if (currentBasket[x] != ""){
					basketString = basketString + currentBasket[x] + ",";
				}
				x++;
			
			}
			
	
			if (addedTo == "no"){
				//if (minOrder(product, quantity) == "no") return;
				
				basketString = 	basketString + product + "a" + quantity + ",";
			
			}
	
		}else{
			
			//if (minOrder(product, quantity) == "no") return;
			
			basketString =  product + "a" + quantity + ",";
			
		}
		document.cookie = "basket=" + basketString;

	}
}


function minOrder(prod, quan){
	if ((Number(prod) == 5) && (Number(quan) < 36)){
		alert("minimum order for this product is 36");
		return "no";
	}
	if ((Number(prod) == 6) && (Number(quan) < 36)){
		alert("minimum order for this product is 36");
		return "no";
	}
	if ((Number(prod) == 7) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	if ((Number(prod) == 8) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	if ((Number(prod) == 12) && (Number(quan) < 6)){
		alert("minimum order for this product is 6");
		return "no";
	}
	if ((Number(prod) == 13) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	if ((Number(prod) == 28) && (Number(quan) < 200)){
		alert("minimum order for this product is 200");
		return "no";
	}
	if ((Number(prod) == 29) && (Number(quan) < 120)){
		alert("minimum order for this product is 120");
		return "no";
	}
	if ((Number(prod) == 30) && (Number(quan) < 120)){
		alert("minimum order for this product is 120");
		return "no";
	}
	if ((Number(prod) == 31) && (Number(quan) < 50)){
		alert("minimum order for this product is 50");
		return "no";
	}
	if ((Number(prod) == 32) && (Number(quan) < 25)){
		alert("minimum order for this product is 25");
		return "no";
	}
	if ((Number(prod) == 33) && (Number(quan) < 25)){
		alert("minimum order for this product is 25");
		return "no";
	}
	if ((Number(prod) == 25) && (Number(quan) < 50)){
		alert("minimum order for this product is 50");
		return "no";
	}
	if ((Number(prod) == 26) && (Number(quan) < 50)){
		alert("minimum order for this product is 50");
		return "no";
	}
	if ((Number(prod) == 27) && (Number(quan) < 50)){
		alert("minimum order for this product is 50");
		return "no";
	}
	if ((Number(prod) == 38) && (Number(quan) < 10)){
		alert("minimum order for this product is 10");
		return "no";
	}
	if ((Number(prod) == 39) && (Number(quan) < 28)){
		alert("minimum order for this product is 28");
		return "no";
	}
	if ((Number(prod) == 40) && (Number(quan) < 60)){
		alert("minimum order for this product is 60");
		return "no";
	}
	if ((Number(prod) == 41) && (Number(quan) < 3)){
		alert("minimum order for this product is 3");
		return "no";
	}
	if ((Number(prod) == 43) && (Number(quan) < 30)){
		alert("minimum order for this product is 30");
		return "no";
	}
	if ((Number(prod) == 9) && (Number(quan) < 6)){
		alert("minimum order for this product is 6");
		return "no";
	}
	if ((Number(prod) == 10) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	if ((Number(prod) == 11) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	if ((Number(prod) == 44) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	if ((Number(prod) == 45) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	if ((Number(prod) == 46) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	if ((Number(prod) == 47) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	if ((Number(prod) == 48) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	if ((Number(prod) == 49) && (Number(quan) < 12)){
		alert("minimum order for this product is 12");
		return "no";
	}
	return "yes";
}

//Get cookie routine by Shelley Powers 
function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    // if cookie exists
    if (offset != -1) { 
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1) end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}

function Right(str, n){
	if (n <= 0)     // Invalid bound, return blank string
	   return "";
	else if (n > String(str).length)   // Invalid bound, return
	   return str;                     // entire string
	else { // Valid bound, return appropriate substring
	   var iLen = String(str).length - 1;
	   return String(str).substring(iLen + 1, n + 1);
	}
}

function getDescription(productNo){
	if (Number(productNo) == 1){
		return "<p><span class=title>storepak - 1-2 bedroom</span><br>Outer box size 930L x 175W x 1030H mm<br>5 x small cartons - 355L x 255W x 355H mm<br>7 x medium cartons - 405L x 405W x 405H mm<br>3 X Large cartons - 455L x 455W x 550H mm<br>2 x Rolls of Tape - 48mm wide x 66m Long<br>1 x Packing knife - with retractable safety blade<br>1 x Marker Pen - waterproof and smearproof<br>1 Roll of Bubblewrap - 500mm wide x 5m long<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 2){
		return "<p><span class=title>storepak - 3-4 bedroom</span><br>Outer box size 930L x 245W x 1030H mm<br>8 x Small Cartons - 355L x 255W x 355H mm<br>10 Medium Carons - 405L x 405W x 405H mm<br>3 x Large Cartons - 455L x 455W x 550H mm<br>2 x Rolls of Tape - 48mm Wide x 66m Long<br>1 x Packing Knife - with retractable safety blade<br>1 x Marker Pen - waterproof and smearproof<br>2 Rolls of Bubblewrap - each 500mm wide x 5m long<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 3){
		return "<p><span class=title>storepak - student </span><br>Outer box size 930L x 175W x 1030H mm<br>2 x Small Cartons - 355L x 255W x 355H mm<br>3 x Medium Cartons - 405L x 405W x 405Hmm<br>2 x Large Cartons - 455L x 455W x 550H mm<br>2 x Medium Archive boxes – 380L x 335W x 250H mm<br>1 Roll of Tape - 48mm Wide x 66m Long)<br>1 Roll of Bubblewrap - 500mm Wide x 5m Long<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 4){
		return "<p><span class=title>storepak - value </span><br>Outer box size 930L x 210W x 1030H mm<br>5 x Small Cartons - 355L x 255W x 355 H mm<br>10 x Medium Cartons - 405L x 405W x 405H mm<br>3 x Large Cartons - 455L x 455W x 550H mm<br>2 x Rolls of Tape - 48mm Wide x 66m Long<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 5){
		return "<p><span class=title>parcel tape </span><br>48mm wide x 66m long<br>Essential when packing boxes.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 6){
		return "<p><span class=title>fragile tape </span><br>48mm wide x 66m long<br>Perfect for highlighting the fragile item just packed.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 7){
		return "<p><span class=title>black marker pen </span><br>Waterproof and smearproof.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 8){
		return "<p><span class=title>tape measure </span><br>5m length <br>&nbsp;</p>"
	}
	else if (Number(productNo) == 9){
		return "<p><span class=title>stretchwrap</span><br>400mm wide x 300m long<br>Designed with extended hand holds to ensure ease of application. Packed in a reusable box.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 10){
		return "<p><span class=title>double bed mattress cover </span><br>Designed to protect from dust, dirt or rain during transit  of moving or storing. Packed in a reusable box.</p>"
	}
	else if (Number(productNo) == 11){
		return "<p><span class=title>three seater sofa cover </span><br>Protects sofas from dust, dirt or rain during transit of moving or storing. Packed in a reusable box.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 12){
		return "<p><span class=title>tape gun </span><br>Designed to be used with tape up to 50mm wide. <br>Saves time  when taping up large volumes of items.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 13){
		return "<p><span class=title>safety packing knife</span><br>Made with a retractable safety blade.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 14){
		return "<p><span class=title>38mm Key Laminated Steel Padlocks</span><br>Standard size suitable for most storage requirements. Strong quality padlocks, ideal for indoor and outdoor use. British made with 10 year guarantee by Henry Squire & Sons.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 15){
		return "<p><span class=title>50mm Key Laminated Steel Padlocks</span><br>Larger size option. Strong quality padlocks, ideal for indoor and outdoor use. British made with 10 year guarantee by Henry Squire & Sons.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 16){
		return "<p><span class=title>45mm Recodable Combination Padlock</span><br>Over 4000 recodable combinations.  No keys to loose. Double locking for extra security . Ideal for indoor or outdoor use. British made with 10 year guarantee by Henry Squire & Sons.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 17){
		return "<p><span class=title>plastic box - 3 litre</span><br>External size 245L x 180W x 160D mm.<br>Perfect storage for 18 CDs or 10 DVDs.<br>Strong quality plastic boxes ideal for storage and stacking, manufactured by ‘Really Useful’.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 18){
		return "<p><span class=title>plastic box - 9 litre</span><br>External size 395L x 255W x 205D mm.<br>Store A4 sheets comfortably, 40 CDs or 20 DVDs, shoes fit well.<br>Strong quality plastic boxes ideal for storage and stacking, manufactured by ‘Really Useful’.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 19){
		return "<p><span class=title>plastic box - 18 litre</span><br>External size 480L x 390W x 200D mm.<br>Stores 93 CDs or 44 DVDs.<br>Strong quality plastic boxes ideal for storage and stacking, manufactured by ‘Really Useful’.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 20){
		return "<p><span class=title>plastic box - 35 litre</span><br>External size 480L x 390W x 345D mm.<br>Stores A4 and foolscap files.<br>Strong quality plastic boxes ideal for storage and stacking, manufactured by ‘Really Useful’<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 21){
		return "<p><span class=title>plastic box - 42 litre</span><br>External size 520L x 440W x 310D mm.<br>Stores foolscap files and ideal for all home and business uses.<br>Strong quality plastic boxes ideal for storage and stacking,  manufactured by ‘Really Useful’.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 22){
		return "<p><span class=title>plastic box - 50 litre</span><br>External size 710L x 440W x 230D mm.<br>Perfect for under bed storage.<br>Strong quality plastic boxes ideal for storage and stacking, manufactured by ‘Really Useful’<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 23){
		return "<p><span class=title>plastic box - 64 litre</span><br>External size 710L x 440W x 310D mm.<br>Ideal for storing sports equipment, even long enough for tennis rackets.<br>Strong quality plastic boxes ideal for storage and stacking, manufactured by ‘Really Useful’<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 24){
		return "<p><span class=title>plastic box - 84 litre</span><br>External size 710L x 440W x 380D mm.<br>Clothes and bedding fit well.<br>Strong quality plastic boxes ideal for storage and stacking, manufactured by ‘Really Useful’<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 25){
		return "<p><span class=title>small archive box </span><br>380L x 260W x 260H mm<br>Available shrink wrapped in 5s<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 26){
		return "<p><span class=title>medium archive box</span><br>380L x 335W x 250H mm<br>Available shrink wrapped in 5s<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 27){
		return "<p><span class=title>large archive box</span><br>450L x 380W x 290H mm<br>Available shrink wrapped in 5s<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 28){
		return "<p><span class=title>small storage box</span><br>355L x 255W x 355H mm<br>Available shrink wrapped in 5s for ease of carrying.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 29){
		return "<p><span class=title>medium storage box</span><br>405L x 405W x 405H mm<br>Available shrink wrapped in 5s for ease of carrying.<br>&nbsp;</P>"
	}
	else if (Number(productNo) == 30){
		return "<p><span class=title>large storage box</span><br>455L x 455W x 550H mm<br>Available shrink wrapped in 5s for ease of carrying.<br>&nbsp;</P>"
	}
	else if (Number(productNo) == 31){
		return "<p><span class=title>extra large  storage box</span><br>600L x 600W x 800H mm<br>&nbsp;</P>"
	}
	else if (Number(productNo) == 32){
		return "<p><span class=title>wardrobe box</span><br>510L x 455W x 1225H mm<br>Separate lid and two doors for access to clothes and saves re-taping whenever opened.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 33){
		return "<p><span class=title>jumbo box</span><br>1200L x  600W x 800H  mm<br>Designed to concertina down in order to carry and drive away.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 34){
		return "<p><span class=title>bottle dividers </span><br>Perfect storage for 12 bottles. Dividers fit into the small storage box (355L x 255W x 355H mm).<br>Supplied flat packed and shrink wrapped to keep clean.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 35){
		return "<p><span class=title>plate dividers </span><br>Ideal for storing 6 large dinner plates.  Dividers fit into the small storage box (355L x 255W x 355H mm)<br>Supplied flat packed and shrink wrapped to keep clean.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 36){
		return "<p><span class=title>glass dividers </span><br>Specially designed for storing 32 glasses in two layers, but can be used for any small items such as ornaments.  Dividers fit into the medium storage box (405L x 405W x 405H mm).<br>Supplied flat packed and shrink wrapped to keep clean.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 37){
		return "<p><span class=title>crockery dividers </span><br>Carefully store 27 cups, mugs  or any  fragile items in 3 layers.  Dividers fit into the medium storage box ( 405L x 405W x 405H mm).<br>Supplied flat packed and shrink wrapped to keep clean.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 38){
		return "<p><span class=title>polychips</span><br>1.25 cubic feet.<br>Designed to fill voids within boxes to reduce movement of contents.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 39){
		return "<p><span class=title>foamwrap</span><br>2mm thick foam, 500mm wide x 10m long.<br>Versatile	 foam, ideal for wrapping fragile items of all shapes and sizes.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 40){
		return "<p><span class=title>bubblewrap</span><br>500mm wide x 5m long<br>Extra protection when wrapping fragile items of all shapes and sizes.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 41){
		return "<p><span class=title>bubblewrap</span><br>500mm wide x 100m long<br>Perfect for larger home and business use.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 42){
		return "<p><span class=title>bubblewrap</span><br>1200mm wide x 100m long<br>Perfect for larger home and business use.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 43){
		return "<p><span class=title>bubblewrap</span><br>1200mm wide x 5m long<br>Ideal size for larger items requiring protection.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 44){
		return "<p><span class=title>acid free tissue paper</span><br>450w x 700mm long. 50 sheets packed in a reusable box.<br>Ideal for wrapping silverware to reduce tarnishing, or for wrapping fragile items.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 45){
		return "<p><span class=title>foam corner protectors </span><br>25mm x 8 corners.<br>Easy to use, foam corner protectors which slip onto the corners of picture frames with a thickness of up to 25mm. Perfect solution when moving or storing. Packed in a reusable box.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 46){
		return "<p><span class=title>foam corner protectors </span><br>45mm x 8 corners<br>Easy to use, foam corner protectors which slip onto the corners of  picture frames with a thickness of up to 45mm. Perfect solution when moving or storing. Packed in a reusable box.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 47){
		return "<p><span class=title>foam glass/mirror corners </span><br>8 per pack.<br>Slimmer foam protectors to ensure they grip around glass and mirrors. Packed in a reusable box.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 48){
		return "<p><span class=title>foam pouches </span><br>150W x 300L mm. 50 pouches packed in a reusable box.<br>Designed to slip in ornaments and fragile items providing protection during storage.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 49){
		return "<p><span class=title>foam sheets </span><br>300W x 300L mm. 100 sheets packed in a reusable box.<br>Ideal for plate dividers and general wrapping of fragile items.<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 1001){
		return "<p><span class=title>storepak – kitchen</span><br>Outer box size 930L x 245W x 1030H mm<br>8 x Small Cartons – 355L x 255W x 355H mm<br>8 x Medium Cartons – 405L x 405W x 405H mm<br>3 x Large Cartons – 455L x 455W x 550H mm<br>2 x Bottle Dividers – storage for 24 bottles - fit perfectly into 2 small cartons<br>2 x Glass Dividers - storage for 36 glasses – fit perfectly into medium cartons<br>2 x Crockery Dividers – storage for 54 cups, mugs or fragile items – fit perfectly into medium cartons<br>2 x Plate Dividers – storage for 12 large dinner plates – fit perfectly into small cartons<br>1 x Acid Free Tissue Paper – 450w x 700L mm 50 sheets ideal for wrapping silverware to reduce tarnishing, or wrapping fragile items<br>1 x Foam Sheets – 300W x 300L mm – 100 sheets perfect for plate dividers and wrapping fragile items<br>1 x bubblewrap – 500mm wide  x  5m long<br>1 x Foamwrap – 2mm thick, 500mm wide x 10m long<br>2 x Brown Tape – 48mm wide x 66m long<br>1 x  Black Marker Pen – waterproof and smearproof<br>1 x Safety Packing Knife – made with a retractable safety blade<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 1002){
		return "<p><span class=title>storepak – small and medium boxes</span><br>Overall pack size 830L x 840W x 190H  mm<br>10 x small boxes – 355L x 255W x 355H mm<br>15 x medium boxes – 405L x 405W x 405H mm<br>Packed with corner protectors and double shrink wrapping to keep clean and dry<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 1003){
		return "<p><span class=title>storepak – small and large boxes</span><br>Overall pack size 1040L x 940W x 145H mm<br>10 x small boxes – 355L x 255W x 355H mm<br>10 x large boxes – 455L x 455W x 550H mm<br>Packed with corner protectors and double shrink wrapping to keep clean and dry<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 1004){
		return "<p><span class=title>storepak – medium and large boxes</span><br>Overall pack size 1040L x 955W x 130H mm<br>8 x medium boxes – 405L x 405W x 405H mm<br>8 x large boxes – 455L x 455W x 550H mm<br>Packed with corner protectors and double shrink wrapping to keep clean and dry<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 1005){
		return "<p><span class=title>storepak – large boxes</span><br>Overall pack size 1040L x 950W x 125H mm<br>15 x large boxes – 455L x 455W x 550H mm<br>Packed with corner protectors and double shrink wrapping to keep clean and dry<br>&nbsp;</p>"
	}
	else if (Number(productNo) == 1006){
		return "<p><span class=title>storepak – medium archive boxes</span><br>Overall pack size 750L x 540W x 200H mm<br>15 x archive boxes with lids – 380L x 335W x 250H mm<br>Assemble in seconds with easy click base. Designed with extra strength for archiving files and documents.<br>Packed with corner protectors and double shrink wrapping to keep clean and dry<br>&nbsp;</p>"
	}
	else{
		return "<p><span class=title>error not an item </span><br>&nbsp;</p>"
	}
}

function getPrice(productNo){
	if (Number(productNo) == 1){
		return "54.00"
	}
	else if (Number(productNo) == 2){
		return "74.00"
	}
	else if (Number(productNo) == 3){
		return "34.00"
	}
	else if (Number(productNo) == 4){
		return "52.00"
	}
	else if (Number(productNo) == 5){
		return "2.00"
	}
	else if (Number(productNo) == 6){
		return "2.00"
	}
	else if (Number(productNo) == 7){
		return "2.00"
	}
	else if (Number(productNo) == 8){
		return "3.50"
	}
	else if (Number(productNo) == 9){
		return "7.50"
	}
	else if (Number(productNo) == 10){
		return "3.50"
	}
	else if (Number(productNo) == 11){
		return "3.50"
	}
	else if (Number(productNo) == 12){
		return "7.50"
	}
	else if (Number(productNo) == 13){
		return "3.50"
	}
	else if (Number(productNo) == 14){
		return "8.00"
	}
	else if (Number(productNo) == 15){
		return "11.00"
	}
	else if (Number(productNo) == 16){
		return "13.00"
	}
	else if (Number(productNo) == 17){
		return "3.00"
	}
	else if (Number(productNo) == 18){
		return "6.00"
	}
	else if (Number(productNo) == 19){
		return "8.00"
	}
	else if (Number(productNo) == 20){
		return "14.00"
	}
	else if (Number(productNo) == 21){
		return "13.00"
	}
	else if (Number(productNo) == 22){
		return "13.00"
	}
	else if (Number(productNo) == 23){
		return "14.00"
	}
	else if (Number(productNo) == 24){
		return "17.00"
	}
	else if (Number(productNo) == 25){
		return "2.50"
	}
	else if (Number(productNo) == 26){
		return "3.25"
	}
	else if (Number(productNo) == 27){
		return "4.25"
	}
	else if (Number(productNo) == 28){
		return "2.00"
	}
	else if (Number(productNo) == 29){
		return "3.00"
	}
	else if (Number(productNo) == 30){
		return "4.00"
	}
	else if (Number(productNo) == 31){
		return "5.50"
	}
	else if (Number(productNo) == 32){
		return "10.00"
	}
	else if (Number(productNo) == 33){
		return "10.00"
	}
	else if (Number(productNo) == 34){
		return "2.00"
	}
	else if (Number(productNo) == 35){
		return "3.25"
	}
	else if (Number(productNo) == 36){
		return "3.75"
	}
	else if (Number(productNo) == 37){
		return "3.25"
	}
	else if (Number(productNo) == 38){
		return "5.00"
	}
	else if (Number(productNo) == 39){
		return "5.00"
	}
	else if (Number(productNo) == 40){
		return "3.50"
	}
	else if (Number(productNo) == 41){
		return "36.00"
	}
	else if (Number(productNo) == 42){
		return "60.00"
	}
	else if (Number(productNo) == 43){
		return "7.00"
	}
	else if (Number(productNo) == 44){
		return "3.25"
	}
	else if (Number(productNo) == 45){
		return "3.75"
	}
	else if (Number(productNo) == 46){
		return "5.50"
	}
	else if (Number(productNo) == 47){
		return "3.00"
	}
	else if (Number(productNo) == 48){
		return "7.00"
	}
	else if (Number(productNo) == 49){
		return "5.00"
	}
	else if (Number(productNo) == 1001){
		return "83.00"
	}
	else if (Number(productNo) == 1002){
		return "58.00"
	}
	else if (Number(productNo) == 1003){
		return "54.00"
	}
	else if (Number(productNo) == 1004){
		return "51.00"
	}
	else if (Number(productNo) == 1005){
		return "54.00"
	}
	else if (Number(productNo) == 1006){
		return "48.00"
	}
	else{
		return "0.00"
	}
}

function subTotal(productNo, quant){
	var price = getPrice(productNo);
	
	return ((Number(price).toFixed(2)) * (Number(quant).toFixed(2)));
}

function removeItem(){
	
	var product2;
	var basketString;
	var x = 0;
	var query = window.location.search.substring(1);
 	var vars = query.split("&");
	var itemToRemove;
	
	if (query != ""){
		for (var i=0; i<vars.length; i++) {
	
    	var pair = vars[i].split("=");
		
			if (pair[1] != "") {
				
				if (pair[1] == "remove") {
			
					product2 = pair[0];
				
				}else{
					return;
				}
			}
		}
		
		product2 = product2.replace(/remove/, "");
		
		if (document.cookie != ""){
			
			basketString = get_cookie("basket");
			
			var currentBasket = basketString.split(",");
			
			while(x < currentBasket.length){
				
				var productNumber2 = Left(currentBasket[x], currentBasket[x].indexOf("a"));
				var quantityOf2 = Right(currentBasket[x], currentBasket[x].indexOf("a"));
				
				if (productNumber2 == product2){

					itemToRemove = product2 + "a" + quantityOf2 + ",";
					
				}
				
				x++;
			
			}
	
		}

		var re = new RegExp(itemToRemove, 'gi');
		
		basketString = basketString.replace(re, "");
		
		document.cookie = "basket=" + basketString;

	}
	
}

function recalculateItem(){
	
	var product;
	var quantity1;
	var basketString;
	var x = 0;
	var query = window.location.search.substring(1);
 	var vars = query.split("&");
	
	if (query != ""){
		for (var i=0; i<vars.length; i++) {
	
    	var pair = vars[i].split("=");
		
			
			if (pair[1] != "") {
				
				if (pair[1] == "recalculate") {
			
					product = pair[0];
				
				}else if (pair[1] == "remove") {
					return;
				}else{
					
					quantity1 = pair[1];
				}
			}
		}
	
		product = product.replace(/recalculate/, "");
		
		if (quantity1 == null){
			alert("you need to enter a quantity");
			return;
		}
		
		//if (minOrder(product, quantity1) == "no") return;
		
		if (document.cookie != ""){
			
			basketString = get_cookie("basket");
			
			var currentBasket = basketString.split(",");
			
			basketString = "";
			
			while(x < currentBasket.length){
				
				var productNumber1 = Left(currentBasket[x], currentBasket[x].indexOf("a"));
				
				if (productNumber1 == product){

					currentBasket[x] = productNumber1 + "a" + quantity1;
					
				}
				
				if (currentBasket[x] != ""){
					basketString = basketString + currentBasket[x] + ",";
				}
				x++;
			
			}
	
		}
		
		document.cookie = "basket=" + basketString;

	}
	
}
