var ve = navigator.userAgent.indexOf("ozilla/");
var mainv = parseInt( navigator.userAgent.charAt(ve+7) );

 // ------------- class item ----------------
   function callout_item(name)
     { this.name        = name;
       this.img_on      = new Image();
       this.img_on.src  = "../images/"+name+".gif"; 
     }
  
 // ----------------- class obmysh --------------
    function callout_search( name )
       {   if (this._array.length == null) return null;

           for(var i = 0; i < this._array.length; ++i)
              { 
                if ( this._array[i] != null &&
                          this._array[i].name == name ) return i; 
              }
         return null;
       }

   function _callout_load(name)
     { 
        var nextElement = (this._array.length == null) ? 0 : this._array.length;
        this._array[nextElement] = new callout_item(name);
     }

/*----- main ---- */
function callout()
     {
       this._array = new Array();

       this._empty = new Image();
       this._empty.src="../images/c_empty_mat.gif";
       this.load = _callout_load;
       this.search = callout_search;
     }

/*----------------------------*/
_callout  = new callout();

/*----------------------------*/

function callout_msOn(name) 
{
 if ( mainv >= 4 )
 { var q = _callout.search(name);
   if (q != null) document.images[ "callout" ].src = _callout._array[q].img_on.src ;
 }
}

function callout_msOff() 
{
 if ( mainv >= 4 )
 {  document.images[ "callout" ].src = _callout._empty.src;
 }
}

function callout_img(name)
{
  _callout.load(name);
}

