document.observe("dom:loaded", function() {
	bw_initDetail();
});

function bw_initDetail(){
	try{
		for(var i=1;i<=3;i++){
			if($('id_characteristic_0'+i)){
				var el = $('id_characteristic_0'+i);
				d(el.options[el.selectedIndex].value);
				if(el.selectedIndex==0 && el.options[el.selectedIndex].value==""){
					el.selectedIndex=1;
					updateProduct(i);
				}
				return;
			}
		}
	}catch(any){
		d(any||any.description);
	}
}

function d(el){
	if(typeof(console)!="undefined"){
		if(typeof(console.debug)!="undefined"){
			console.debug(el);
		}
	}
}
