// JavaScript Document

function imageChange(image_name,image_src){
	image_src="images/"+image_src;
	document[image_name].src=image_src;
}

var optionsmenu=document.getElementById("optionsel");
optionsmenu.onchange=function(){
	var chosenoption=this.selectedIndex;
	var chosenvalue=this.options[chosenoption].value;
	if(instockoptions[chosenvalue]=="1"){
		imageChange("stock","in-stock.gif");
	}else{
		imageChange("stock","out-of-stock.gif");
	}
}

var delivery_method=document.getElementById("delivery_method");
delivery_method.onchange=function(){
	document.getElementById("basket").submit();
}

var plush_country_code=document.getElementById("plush_country_code");
plush_country_code.onchange=function(){
	document.getElementById("basket").submit();
}