// JScript File
function RichGigStatus_Control(s_controlID,s_inventoryID,i_daynum,f_localtime) {
        //Note: f_localtime is seconds from epoch for current local time
        //      versus seconds from epoch for current GMT
	this.localtime = f_localtime;
	this.load = function(s_controlID,s_inventoryID,i_daynum) {
	        this.o_container = getObject(s_controlID);
		this.show(this.o_container);
	        this.o_inventory = getObject(s_inventoryID);
		this.o_date = getObject(s_controlID + '_date');
		this.o_statusON = getObject(s_controlID + '_statusON');
		this.o_statusOFF = getObject(s_controlID + '_statusOFF');
//alert(GetNextDateByDayNumber(i_daynum));
		this.o_date.innerHTML = GetNextDateByDayNumber(i_daynum,this.localtime);
//alert(this.o_statusON.id);
		if(this.o_inventory.value==0) {
			this.hide(this.o_statusON);
			this.show(this.o_statusOFF);
		}else {
			this.hide(this.o_statusOFF);
			this.show(this.o_statusON);
		}
	}
    this.heircleanup = function(me) {
        me.o_container=null;
        me.o_inventory=null;
	me.o_date = null;
	me.o_statusON = null;
	me.o_statusOFF = null;
    }
}

RichGigStatus_Control.prototype = new ControlClass;
