function maxbcc()
{
var color_in=""
var color_out=""
var color_chk=""
var checked=false
var current_obj=0
var attesa=false
var temp_chk="sono un non colore"
this.set_color=function(c_in,c_out){
color_in=c_in
color_out=c_out
}
this.set_color_chk=function(c){
color_chk=c
}
this.ci=function(obj){
current_obj=obj
if(obj.style.background==temp_chk)
{
checked=true
}
obj.style.background=color_in
}
this.co=function(obj){
if(checked)
{
obj.style.background=color_chk
checked=false
}
else
obj.style.background=color_out
}
this.chkwait=function(){
attesa=true
}
this.chk=function(chk_id){
if(attesa)attesa=false;
else
{
$(chk_id).checked=!$(chk_id).checked;
if($(chk_id).checked)
{
current_obj.style.background=color_chk
temp_chk=current_obj.style.background
current_obj.style.background=color_in
checked=true
}
else
{
current_obj.style.background=color_in
checked=false
}
}
}
this.chk_click=function(chk_id){
if(!$(chk_id).checked)
{
current_obj.style.background=color_chk
temp_chk=current_obj.style.background
current_obj.style.background=color_in
checked=true
}
else
{
current_obj.style.background=color_in
checked=false
}
}
}
