

// No Need to Change
var icbCursor='pointer';
if (document.all){ icbCursor='hand'; }


function icbCBoxtoImgCB(icb,icbs,icbT,icbF,icbw,icbh){
  // Create Image Element, Append Before the Check Box, Add OnClick Event & Load Correct Image
var dv=document.getElementById(icb);
var arr=dv.getElementsByTagName("input");
		
		for( i=0;i<arr.length;i++)
		{
			if (arr[i].type=="checkbox"){
				chk=arr[i].id;
			icbNewImg=document.createElement('img');
 icbNewImg.id='icb'+chk;
 icbcb=document.getElementById(chk);
 icbcb.parentNode.insertBefore(icbNewImg,icbcb);
 icbNewImg.style.cursor=icbCursor;
 if (icbw!=null&&icbh!=null){ icbNewImg.width=icbw; icbNewImg.height=icbh; }
 icbNewImg.cb=icbcb;
 icbNewImg.icbT=icbT;
 icbNewImg.icbF=icbF;
 icbNewImg.onclick=function(){ icbImgCBox(this); };
 if (icbs){ icbNewImg.src=icbT; } else { icbNewImg.src=icbF; }
 // Hide the real Check Box
 icbcb.checked=icbs;
 icbcb.style.position='absolute';
 icbcb.style.visibility='hidden';	
			}
			
		}	

 
}

function icbImgCBox(icb){
 if (icb.cb.checked){
  icb.src=icb.icbF;
  icb.cb.checked=false;
 }
 else {
  icb.src=icb.icbT;
  icb.cb.checked=true;
 }

}
