// JavaScript Document

function doPenPriceFilter(){
	
	var myvalue = document.getElementById("price")[document.getElementById("price").selectedIndex].value;
	
	var valuearray = new Array("(£) To","0.10","0.20","0.30","0.40","0.50","0.60","0.70","0.80","0.90","1.00","1.20","1.40","1.60","1.80","2.00","3.00","4.00","5.00","6.00","7.00","8.00","9.00","10.00");
	
	var removal = document.getElementById("price_to");
	

	if (removal && removal.hasChildNodes && removal.removeChild) {
	while (removal.hasChildNodes()) {
	removal.removeChild(removal.firstChild);
	}
	}

	
	for(i=0; i<=valuearray.length-1; i++)
	{		
	if(myvalue < valuearray[i] || valuearray[i] == '(£) To')
	{
	try { 
	// For IE6 
	var container = document.createElement('option'); 
	} catch (e) { 
	// For other browsers 
	var container = document.createElement('option');
	}
	if(valuearray[i] == '(£) To'){
	container.setAttribute("value","");
	theText=document.createTextNode(valuearray[i]);
	container.appendChild(theText);
	} else {
	container.setAttribute("value",valuearray[i]);
	theText=document.createTextNode("£"+valuearray[i]);
	container.appendChild(theText);
	}
	document.getElementById("price_to").appendChild(container);
	}
	
	}

}
function qtyToQty(qty){

	document.getElementById('quantity').value = qty;

}
