var Utility = {
    fx:{
        fade:null            
    },
    turnOff:function(ObjNode)
    {
        if($(ObjNode)) $(ObjNode).style.display = "none";
    },
    turnOn:function(ObjNode)
    {
       if($(ObjNode)) 
       {
           //alert(ObjNode);
           //var myFx = new Fx.Style(ObjNode, 'opacity').set(0);
           $(ObjNode).style.display = "block";
           //var myFx1 = new Fx.Style(ObjNode, 'opacity').start(0,1);
       }
       else alert("ID not found");
    },
    turnOnInline:function(ObjNode)
    {
        if($(ObjNode)) $(ObjNode).style.display = "inline";
    },
    turnOnAbsolute:function(ObjNode,x,y)
    {
        if($(ObjNode))
		{
			$(ObjNode).style.display = "block";
			$(ObjNode).style.top = y+"px";
			$(ObjNode).style.left = x+"px";
		}
    },
    swap:function(id1,id2,time)
    {
		if($(id1)) $(id1).style.display = "none";
        if($(id2)) $(id2).style.display = "block";
    },
    setBounds:function(id,x,y)
    {
        $(id).style.top = x+"px";
        $(id).style.left = y+"px";
    },
    fadeIn:function(id)
    {
        this.fx.fade = new Fx.Style(id, 'opacity',{
            duration: 500, 
            wait: true,
            onStart:function(id)
            {
                var temp = new Fx.Style(id,'opacity').set(0);
                Utility.turnOn(id);
            }
        }).start(0,1);
    },
    fadeOut:function(id)
    {
        this.fx.fade = new Fx.Style(id, 'opacity',{
            duration: 500, 
            wait: false,
            onComplete: function(id)
            {
                Utility.turnOff(id);
            }
        }).start(1,0);
    },
    fadeInOut:function(id1,id2)
    {
        
        this.fadeOut(id2);
        setTimeout("Utility.fadeIn('"+id1+"')",500);
    }
}