/*function RecentlyViewedPopupClickObserver(e)
  {
   if (!Position.within($('rView'),Event.pointerX(e),Event.pointerY(e)))
     {
      Effect.SlideUp('rView', {duration:0.5});
//      Element.hide('rView');
      TearDownRecentlyViewedPopupClickObserver();
     }
  }

function SetupRecentlyViewedPopupClickObserver()
  {
   Event.observe(document,"mousedown",RecentlyViewedPopupClickObserver);
  } 

function TearDownRecentlyViewedPopupClickObserver()
  {
   Event.stopObserving(document,"mousedown",RecentlyViewedPopupClickObserver);
  } 
  
 */ 


var Abstract = new Object();

Object.extend = function(destination, source) {
  for (property in source) {
    destination[property] = source[property];
  }
  return destination;
}

if (!window.Element) {
  var Element = new Object();
}

Object.extend(Element, {
  visible: function(element) {
    return $(element).style.display != 'none';
  },
   
show: function()

 {
    for (var i = 0; i < arguments.length; i++) {
      var element = $(arguments[i]);
      element.style.display = '';
    }
 }
 
 });
 
function $() {
  var elements = new Array();

  for (var i = 0; i < arguments.length; i++) {
    var element = arguments[i];
    if (typeof element == 'string')
      element = document.getElementById(element);

    if (arguments.length == 1)
      return element;

    elements.push(element);
  }

  return elements;
} 
 
// <![CDATA[
/* This is for the Select a Size Popup */
function hideRecentlyViewed()
{ 
  document.getElementById('rView').style.visibility = 'hidden'; 
  //the code below causes the popup to reopen in the same place each time
  //remove the next two lines if we want the popup to open where it was last closed
  document.getElementById('rView').style.top = '215';
  document.getElementById('rView').style.left = '200';  
}

function showRecentlyViewed()
{ 
  document.getElementById('rView').style.top = document.body.scrollTop + 215;
  document.getElementById('rView').style.left = document.body.scrollLeft + 200;
  document.getElementById('rView').style.visibility = 'visible'; 
  document.getElementById('rView').style.zIndex = 300;
} 
/* End this is for the Select a Size Popup */
  // ]]>

  
  
