﻿




// JScript File
var objContentImage;
var timer_t = null;
var cnt = 0;
var objRotator;
var direction = 'L';

function UDscrollMarLeft(divid)
{      
    
    objRotator = document.getElementById(divid);   
    direction = 'L';
    if(timer_t == null)
    {
            timer_t = setTimeout('UstartRotate()',0);
            //alert(timer_t);
            }
}

function UDscrollMarRight(divid)
{       
    
    objRotator = document.getElementById(divid);   
    direction = 'R';
    if(timer_t == null)
    {
            timer_t = setTimeout('UstartRotate()',0);
            //alert(timer_t);
            }
}

function UstartRotate()
{    
   if(direction == 'L')
   {
    if(objRotator.scrollLeft + parseInt(objRotator.style.width,10) < objRotator.scrollWidth)
    {
        objRotator.scrollLeft = objRotator.scrollLeft + 2;    
        timer_t = setTimeout('UstartRotate()',0);       
    }
    else
    {
        clearTimeout(timer_t);
        timer_t = null;
    }   
  }
  else
  {
    if(objRotator.scrollLeft > 0)
    {
        objRotator.scrollLeft = objRotator.scrollLeft - 2;    
        timer_t = setTimeout('UstartRotate()',0);       
    }
    else
    {
        clearTimeout(timer_t);
        timer_t = null;
    }
  }   
}

function Udisp_image(obj,imageid)
{
	var objImg  = document.getElementById(imageid); 
    objImg.src = obj.src;
    
     try
    {
    document.getElementById('imgLarge').href=obj.src;
    }
    catch(e){}

 
 
    try
    {
	    if(obj.title != null)
	    {  
			
		    document.getElementById('tdImageTitle').innerText = obj.title;
		   
		 
	    }
    }
    catch(e)
    {
    	if(obj.alt!=null)
		{
				  
		 document.getElementById('tdImageTitle').innerHTML = obj.alt;

		}

    }
    //alert(document.getElementById('tdImageTitle').innerText );
  
}

function Udisp_imagePrint(obj,imageid)
{
	var objImg  = document.getElementById(imageid); 
    objImg.src = obj.src;
    
    try
    {
    document.getElementById('imgLarge').href=obj.src;
    }
    catch(e){}
    
       
   
  
}


function Udisp_imageList(obj,imageid)
{
	var objImg  = document.getElementById(imageid); 
    objImg.src = obj.src;
    objImg.alt=obj.alt;

}

function UDscrollStop()
{
    if(timer_t != null)
    {
     clearTimeout(timer_t);
     timer_t = null;
    }
}
