subroutines.
It is beyond the scope of the next 10 minutes I have. It will be several days before I am back, but....
#1 is if you had renamed images as I suggested:
This could be used for ALL your images without having to write out theimage name for each one.
document.getElementById('cardTemplate').style.back groundImage='url(designer/images/pics/backgrounds/'+this.value+'.jpg)';
Until then...