

function handle_scroll(me, eventinfo)
{
    switch(project.getTag("PRODUCT_SELECTION_SCROLL")){
    case 0:
         project.showDialog("PRODUCT_SELECTION_SCROLL0.jmx");
        
        
        project.closeDialog("PRODUCT_SELECTION_SCROLL1.jmx");
         project.closeDialog("PRODUCT_SELECTION_SCROLL2.jmx");
         project.closeDialog("PRODUCT_SELECTION_SCROLL3.jmx");
          project.closeDialog("PRODUCT_SELECTION_SCROLL4.jmx");
        
        break;
    case 1:
         project.showDialog("PRODUCT_SELECTION_SCROLL1.jmx");
        
        project.closeDialog("PRODUCT_SELECTION_SCROLL0.jmx");
         project.closeDialog("PRODUCT_SELECTION_SCROLL2.jmx");
         project.closeDialog("PRODUCT_SELECTION_SCROLL3.jmx");
          project.closeDialog("PRODUCT_SELECTION_SCROLL4.jmx");
        break;
        
         case 2:
             project.showDialog("PRODUCT_SELECTION_SCROLL2.jmx");
            
            project.closeDialog("PRODUCT_SELECTION_SCROLL0.jmx");
             project.closeDialog("PRODUCT_SELECTION_SCROLL1.jmx");
             project.closeDialog("PRODUCT_SELECTION_SCROLL3.jmx");
              project.closeDialog("PRODUCT_SELECTION_SCROLL4.jmx");
            break;
             
              case 3:
                  project.showDialog("PRODUCT_SELECTION_SCROLL3.jmx");
                 
                 project.closeDialog("PRODUCT_SELECTION_SCROLL0.jmx");
                  project.closeDialog("PRODUCT_SELECTION_SCROLL1.jmx");
                  project.closeDialog("PRODUCT_SELECTION_SCROLL2.jmx");
                   project.closeDialog("PRODUCT_SELECTION_SCROLL4.jmx");
                 break;
                  
              case 4:
                       project.showDialog("PRODUCT_SELECTION_SCROLL4.jmx");
                      
                      project.closeDialog("PRODUCT_SELECTION_SCROLL0.jmx");
                       project.closeDialog("PRODUCT_SELECTION_SCROLL1.jmx");
                       project.closeDialog("PRODUCT_SELECTION_SCROLL2.jmx");
                        project.closeDialog("PRODUCT_SELECTION_SCROLL3.jmx");
                  break;
 default:
     
     project.showDialog("PRODUCT_SELECTION_SCROLL0.jmx");
     
        project.setTag("PRODUCT_SELECTION_SCROLL",0);
     project.closeDialog("PRODUCT_SELECTION_SCROLL1.jmx");
      project.closeDialog("PRODUCT_SELECTION_SCROLL1.jmx");
      project.closeDialog("PRODUCT_SELECTION_SCROLL2.jmx");
       project.closeDialog("PRODUCT_SELECTION_SCROLL3.jmx");

    }
}

function VIEW_UP(me, eventInfo)
{
   var i=  project.getTag("PRODUCT_SELECTION_SCROLL");
    if(i==4){
        i=-1;
    }

    if(i<5){
    i=i+1;
    }
   
    project.setTag("PRODUCT_SELECTION_SCROLL",i);
     sleepFor(0.1);
 handle_scroll();
}
function VIEW_DOWN(me, eventInfo)
{
    var i=  project.getTag("PRODUCT_SELECTION_SCROLL");
    if(i==0){
        i=5;
    }

    if(i>0){
     i=i-1;
    }
   
     project.setTag("PRODUCT_SELECTION_SCROLL",i);
       sleepFor(0.1);
  handle_scroll();
}
function close()
{
        project.closeDialog("PRODUCT_SELECTION_SCROLL0.jmx");
    project.closeDialog("PRODUCT_SELECTION_SCROLL1.jmx");
     project.closeDialog("PRODUCT_SELECTION_SCROLL2.jmx");
     project.closeDialog("PRODUCT_SELECTION_SCROLL3.jmx");
      project.closeDialog("PRODUCT_SELECTION_SCROLL4.jmx");
    
}
function sleepFor(sleepDuration){
    var now = new Date().getTime();
    while(new Date().getTime() < now + sleepDuration){ /* Do nothing */ }
}
function handlescroll(me, eventInfo)
{
    
}