  // JavaScript Document
  /*
  var imageAreas = new Array();
  
  imageAreas[0] = new Array();
  imageAreas[0]['id'] = 'customMadeArea';
  imageAreas[0]['src'] = 'images/coverwithicons_custommade.jpg';
  
  imageAreas[1] = new Array();
  imageAreas[1]['id'] = 'threeXArea';
  imageAreas[1]['src'] = 'images/coverwithicons_3x.jpg';
  
  imageAreas[2] = new Array();
  imageAreas[2]['id'] = 'zipperArea';
  imageAreas[2]['src'] = 'images/coverwithicons_zip.jpg';
  
  imageAreas[3] = new Array();
  imageAreas[3]['id'] = 'personalizeArea';
  imageAreas[3]['src'] = 'images/coverwithicons_personailized.jpg';
  
  imageAreas[4] = new Array();
  imageAreas[4]['id'] = 'hemArea';
  imageAreas[4]['src'] = 'images/coverwithicons_hems.jpg';
  
  imageAreas[5] = new Array();
  imageAreas[5]['id'] = 'orderNowArea';
  imageAreas[5]['src'] = 'images/coverwithicons.jpg';
  
  var lastArea = 7;
  var actualMouseOver = false;
  
  function randomArea()
  {
    var random_num = (Math.round((Math.random()*4)+1)) - 1;
    while(random_num == lastArea)
    {
      random_num = (Math.round((Math.random()*4)+1)) -1;
    }
    lastArea = random_num;
    if(!actualMouseOver)
    {
      if(document.getElementById(imageAreas[random_num]['id']))
      {
        if(document.getElementById(imageAreas[random_num]['id']).onmouseover)
        {
          areaOnOver(document.getElementById(imageAreas[random_num]['id']));
        }
      }  
    }
    setTimeout('randomArea()', 2000);
  }
  
  function areaOnOver(obj)
  {
    if(document.getElementById("coverimage"))
    {
      document.getElementById("coverimage").src = obj.areaArray['src'];
    }
  }
  */
  
  function easeProp(elementId, value, freq, movement, stopAt, accelerate, property, direction)
  {
    var element = document.getElementById(elementId);
    if(element)
    {
      var nextValue = value + movement;
      if(direction == 1)
      {
        if(nextValue > stopAt)
        {
          nextValue = stopAt;
        }
      }
      else
      {
        if(nextValue < stopAt)
        {
          nextValue = stopAt;
        }
      }
      var nextMovement = movement + accelerate;
      
      if(direction == 1)
      {
        if(nextMovement <= 0)
        {
          nextMovement = 1;
        }
      }
      else
      {
        if(nextMovement >= 0)
        {
          nextMovement = -1;
        }
      }
      
      element.style[property] = nextValue + 'px';
      if(direction == 1)
      {
        if(nextValue < stopAt)
        {
          setTimeout('easeProp("' + elementId + '", ' + nextValue + ', ' + freq + ', ' + nextMovement + ',' + stopAt + ', ' + accelerate + ', "' + property + '", ' + direction + ')', freq);
        }
      }
      else
      {
        if(nextValue > stopAt)
        {
          setTimeout('easeProp("' + elementId + '", ' + nextValue + ', ' + freq + ', ' + nextMovement + ',' + stopAt + ', ' + accelerate + ', "' + property + '", ' + direction + ')', freq);
        }
      }
    }
  }
  
  window.onload = function()
  {
   
    //setTimeout('easeProp("upperContent", 0, 1, 5, 254, 0, "height", 1)', 1);
    setTimeout('easeProp("precision", 254, 1, -5, 0, 0, "top", -1)', 1);
    setTimeout('easeProp("deserve", -254, 1, 5, 0, 0, "top", 1)', 1);
    setTimeout('easeProp("upgrade", 254, 1, -5, 0, 0, "top", -1)', 1);
    /*
    if(imageAreas)
    {
      for(var i = 0; i < imageAreas.length; i++)
      {
        if(document.getElementById(imageAreas[i]['id']))
        {
          document.getElementById(imageAreas[i]['id']).areaArray = imageAreas[i];
          document.getElementById(imageAreas[i]['id']).onmouseover = function()
          {
            actualMouseOver = this.id;
            areaOnOver(this);
          }
          document.getElementById(imageAreas[i]['id']).onmouseout = function()
          {
            actualMouseOver = false;
          }       
        }
      }
      setTimeout('randomArea()', 2000);
    }
    */
  }

