
  whichbgid = 1;
  whichbg = 0;
  
  indexbgs = ['/images/index/1_new.jpg',
              '/images/index/2_new.jpg'];
  
  function changeBG()
    {
      var bgelem = "bodybg";
      
      if(whichbgid == 1)
        {
          fadebgelem = bgelem + '1';
          appearbgelem = bgelem + '2';
          whichbgid = 2;
        }
      else
        {
          fadebgelem = bgelem + '2';
          appearbgelem = bgelem + '1';
          whichbgid = 1;
        }
      
      jQuery("#" + appearbgelem).innerHTML = '<img src="'+ indexbgs[whichbg] +'" />';
      
      whichbg++;
      
      
      
      if(whichbg == indexbgs.length)
        whichbg = 0;
      
    }

/*
    Event.observe(window, 'load', function() {
      //initiate bg
      changeBG();
      window.setInterval(changeBG,7000);
    });
  */

  function showArt(workid) {
    if(workid != "0")
      jQuery("#featuredart").attr("src", "/images_works/ps/" + workid + "_s.jpg"); 
  }
  
  
  
