//-------------------------------------------------------------------------------------------------------------------------------
// Define global variables
//-------------------------------------------------------------------------------------------------------------------------------
var strCurrentFilterType  = ''
var intCurrentPageSize = 10
var intCurrentPageIndex = 0
//-------------------------------------------------------------------------------------------------------------------------------
//     ________________________________
//____/           MOOTOOLS INIT        \_________________________________________________________________________________________
//-------------------------------------------------------------------------------------------------------------------------------
window.addEvent('domready', function() 
{
    var blnLeftScroll = false;
    var blnRightScroll = false;

   initScrollbox();
});

function initScrollbox()
{
   var scroll = new Fx.Scroll('scrollareadiv', {
      wait: false,
      duration: 40000,
      transition: Fx.Transitions.Elastic.easeOut
  });
   
   if (($('leftarrowdiv') !== null) && ($('rightarrowdiv') !== null))
   {
       $('leftarrowdiv').addEvent('mouseleave', function(event) {
           if (blnLeftScroll) { blnLeftScroll = true; scroll.stop(); }
       });

       $('leftarrowdiv').addEvent('mouseover', function(event) {
           blnLeftScroll = true;
           event = new Event(event).stop();
           scroll.toElement('begindiv');
           $('viewportdiv').setStyles({
               margin: '0px'
           }); 
       });

      $('rightarrowdiv').addEvent('mouseleave', function(event) {
        if (blnRightScroll) { blnRightScroll = true; scroll.stop(); }
      });

      $('rightarrowdiv').addEvent('mouseover', function(event) {
         blnRightScroll = true;
         event = new Event(event).stop();
         scroll.toElement('enddiv');
//         $('viewportdiv').setStyles({
//             margin: '0px'
//         }); 
     });
    
   }
}
//-------------------------------------------------------------------------------------------------------------------------------
//     ________________________________
//____/       LOADPRINTPAGE            \_________________________________________________________________________________________
//-------------------------------------------------------------------------------------------------------------------------------
function loadPrintPage(intRecordID)
{
    
    var newwindow = window.open("print.aspx?page=print&id=" + intRecordID, "print_product", "location=no")
    if (newwindow != null)
    {
    newwindow.moveTo(0,0)
    }
}
//-------------------------------------------------------------------------------------------------------------------------------
