
$(document).ready(function(){

// Checkbox functions
chbox={t:'/images/Check.png',f:'/images/UnCheck.png'} //Picture in checkbox. t: on, f: off.
rbox={t:'/images/RCheck.png',f:'/images/RUnCheck.png'} //Picture in radio. t: on, f: off.
// 
$('input[type="checkbox"]').each(function(){this.style.display='none';if(this.checked){$(this).after('<img src="'+chbox.t+'" align="absmiddle">');}else{$(this).after('<img src="'+chbox.f+'" align="absmiddle">');}$(this).bind('click',function(){if(this.checked){$(this).next('img').attr('src',chbox.t)}else{$(this).next('img').attr('src',chbox.f)}});$(this).next('img').bind('click',function(){$(this).prev('input').click();if($(this).prev('input').attr('checked')){this.src=chbox.t;}else{this.src=chbox.f;}});});
$('input[type="radio"]').each(function(){this.style.display='none';if(this.checked){$(this).after('<img src="'+rbox.t+'" align="absmiddle">');}else{$(this).after('<img src="'+rbox.f+'" align="absmiddle">');}var rgroup=this.name;$(this).bind('click',function(){$('input[name="'+rgroup+'"]').each(function(){$(this).next('img').attr('src',rbox.f)});$(this).next('img').attr('src',rbox.t);});$(this).next('img').bind('click',function(){$(this).prev().click();});});

}); 