function skinInput()
{

    var arInputbox = document.getElementsByTagName("input");

    for(var i = 0;i < arInputbox.length;i++)
    {
        e = arInputbox[i];
        if(e.type == "checkbox" && e.style.display != "none")
        {
            var linkelement = document.createElement("a");
            linkelement.setAttribute("id","chk_link_" + e.getAttribute("name") + "_" + i);
            
            e.setAttribute("id","chk_input_" + e.getAttribute("name") + "_" + i);
            
            if(e.disabled && e.checked)
            {
                linkelement.className = "checkbox_disabled_active";
            }
            if(!e.disabled && e.checked)
            {
                linkelement.className = "checkbox_active";
		var onclickfunction = "skininputbox(\"" + e.getAttribute("id") + "\",\"" + linkelement.getAttribute("id") + "\");";
                linkelement.onclick = new Function(onclickfunction);
            }
            if(e.disabled && !e.checked)
            {
                linkelement.className = "checkbox_disabled_nonactive";
            }
            if(!e.disabled && !e.checked)
            {
                linkelement.className = "checkbox_nonactive";
		var onclickfunction = "skininputbox(\"" + e.getAttribute("id") + "\",\"" + linkelement.getAttribute("id") + "\");";
                linkelement.onclick = new Function(onclickfunction);
            }

	    clearDiv = document.createElement("div");
		clearDiv.className = "clearFloat";
            
            e.style.display = "none";
            e.parentNode.insertBefore(linkelement,e);
	    e.parentNode.insertBefore(clearDiv,linkelement);
            
        }

        
        if(e.type == "radio_no" && e.style.display != "none")
        {
            var linkelement = document.createElement("a");
            linkelement.setAttribute("id","chk_link_" + e.getAttribute("name") + "_" + i);
            
            e.setAttribute("id","chk_input_" + e.getAttribute("name") + "_" + i);
            
            if(e.disabled && e.checked)
            {
                linkelement.className = "radio_disabled_active";
            }
            if(!e.disabled && e.checked)
            {
                linkelement.className = "radio_active";
		var onclickfunction = "skininputbox(\"" + e.getAttribute("id") + "\",\"" + linkelement.getAttribute("id") + "\");";
                linkelement.onclick = new Function(onclickfunction);
            }
            if(e.disabled && !e.checked)
            {
                linkelement.className = "radio_disabled_nonactive";
            }
            if(!e.disabled && !e.checked)
            {
                linkelement.className = "radio_nonactive";
		var onclickfunction = "skininputbox(\"" + e.getAttribute("id") + "\",\"" + linkelement.getAttribute("id") + "\");";
                linkelement.onclick = new Function(onclickfunction);
            }

	    clearDiv = document.createElement("div");
		clearDiv.className = "clearFloat";
            
            e.style.display = "none";
            e.parentNode.insertBefore(linkelement,e);
	    e.parentNode.insertBefore(clearDiv,linkelement);
            
        }        

        if(e.type == "radio_no" && e.style.display == "none")
        {
                linkelement = document.getElementById("chk_link_" + e.getAttribute("name") + "_" + i);
                            
                if(e.disabled && e.checked)
                {
                    linkelement.className = "radio_disabled_active";
                }
                if(!e.disabled && e.checked)
                {
                    linkelement.className = "radio_active";
                }
                if(e.disabled && !e.checked)
                {
                    linkelement.className = "radio_disabled_nonactive";
                }
                if(!e.disabled && !e.checked)
                {
                    linkelement.className = "radio_nonactive";
                }        
        }

    }


}

function skininputbox(checkbox_ClientID,custombox_ClientID)
{
//alert(document.getElementById(checkbox_ClientID).checked);
var checkboxobj = document.getElementById(checkbox_ClientID);	
var linkobj = document.getElementById(custombox_ClientID);			    
if(checkboxobj.checked == true)
				    {
				        checkboxobj.checked = false;
				        if(checkboxobj.type == "checkbox")
				        {
				            linkobj.className = "checkbox_nonactive";
				        }
				        if(checkboxobj.type == "radio")
				        {
				            skinInput();
				            linkobj.className = "radio_nonactive";
				        }
				    }
				    else
				    {
				        checkboxobj.checked = true;
				        if(checkboxobj.type == "checkbox")
				        {
				            linkobj.className = "checkbox_active";
				        }
				        if(checkboxobj.type == "radio")
				        {
				            skinInput();
				            linkobj.className = "radio_active";
				        }
				    }
//alert(document.getElementById(checkbox_ClientID).checked);	
}


addLoadEvent(function()
{
try
{
skinInput()
}
catch(err)
{
//supress
}
});

