      function oconit(d,t)
*
*  compute the conductive opacities using the method of itoh et al.
*  see top of program for references.
*
      implicit double precision(a-h,o-z)

      common/je/je
      common/comp/amhyhe,amheca,x(4)
      common/temp/s1,r1,s2,r2,b2,p2,t2,e2,xc2,xo2,fca2,f2,q2,w2,c
      data alac43 /-3.519188/ 
*
*  gamma constants
*
      data gamc3c, gamc3o, gamc2, gamc1 
     1     /3.5772e+06, 5.7782e+06, 573264., 2.275e+05/
*
* compute gamma, and call the appropriate routine (liquid metal or
* crystalline).  if gamma > 5000, then set gamma = 5000.
* This is the suggested proceedure from itoh et al (1984), since
* the results barely change when gamma > 5000.
* NOTE: there is no fit to xtal hydrogen.
*
      if ( je .eq. 3 ) then
         gammac = 10.**(d/3. - t) * gamc3c
         gammao = gammac / gamc3c * gamc3o
         gamma = xc2 * gammac + xo2 * gammao
*
* Carbon contribution
*
         if ( xc2 .gt. 0. ) then
            if ( gamma .lt. 171. ) then 
               condc = cndlc(d,t,gammac)
            elseif ( gamma .ge. 171 ) then
               if ( gammac .gt. 5000.) gammac = 5000.
               condc = cndsc(d,t,gammac)
            endif
         else
            condc = 0.
         endif
*
* Oxygen contribution
*
         if ( xo2 .gt. 0. ) then
            if ( gamma .lt. 171. ) then 
               condo = cndlo(d,t,gammao)
            elseif ( gamma .ge. 171 ) then
               if ( gammao .gt. 5000.) gammao = 5000.
               condo = cndso(d,t,gammao)
            endif
         else
            condo = 0.
         endif
         oconit = alac43 + (t*3. - d - (xc2*condc + xo2*condo) )
*
* Helium contribution
*
      elseif ( je .eq. 2 ) then
         gamma = gamc2 * 10.**(d/3. - t)
         if ( gamma .lt. 171. ) then
            conduct = cndlhe(d,t,gamma)
         elseif ( gamma .ge. 171 ) then 
            if ( gamma .gt. 5000.) gamma = 5000.
            conduct = cndshe(d,t,gamma)
         endif
         oconit = alac43 + (t*3. - d - conduct)
*
* Hydrogen contribution
*
      elseif ( je .eq. 1 ) then
         gamma = gamc1 * 10.**(d/3. - t)
         conduct = cndlhy(d,t,gamma)
         oconit = alac43 + (t*3. - d - conduct)
      endif

      return
      end 

************************************************************************

