try
{
    var strImages1="";
    var strlinkslist="";

    function Thumbimagelist()
    {  
	    if(document.getElementById('hdnCID')!=null)
	    {
    	
        var CID = document.getElementById('hdnCID').value;        
        var response = AjaxUtilsMethods.BindProductDetailsByCategoryID(CID);  
        var ds = response.value;    
        var strString="<table cellpadding='0' cellspacing='0' width='100%' border='0'>";
        if(ds != null && typeof(ds) == "object" && ds.Tables != null)
        {   
            if(ds.Tables[0].Rows.length>0)
            {              
                var i=0;                  
                document.getElementById('trCategorySliding').innerHTML="";                                  
                 for(i=0; i<ds.Tables[0].Rows.length; i++)
                {                             
                     if(ds.Tables[0].Rows[i].defaultimage !="")
                     {   
                         if(strImages1.length==0)
					     {
	                       strImages1 += "/" + StrReplace(ds.Tables[0].Rows[i].defaultImage,"_T_","_S_");
					       strlinkslist += "/products/"+ ds.Tables[0].Rows[i].PrdSlugName + '_' + ds.Tables[0].Rows[i].productID + ".aspx";
					     }
					     else
					     {
	                       strImages1 += ",/" + StrReplace(ds.Tables[0].Rows[i].defaultImage,"_T_","_S_");
   					       strlinkslist += ",/products/"+ ds.Tables[0].Rows[i].PrdSlugName + '_' + ds.Tables[0].Rows[i].productID + ".aspx";
					     }					 
                     }  
                                                
               }                                               
               strString =  strString + "<tr><td width='100%' colspan='2' valign='top'><table width='100%' cellspacing='0' cellpadding='0' border='0'>";
		       strString =  strString + "<tr style='position:relative; text-align:right' height='100px' align='right'><td width='5%'><input id='imgscrollleft'  border='0' src='/images/arrow_left.gif' type='image' align='absmiddle' onmouseover=\"zxcScroller(\'h\',\'tst1\',\'start\',-1);\" onclick=\"return false;\" onmouseout=\"zxcScroller(\'h\',\'tst1\',\'stop\');\" value=\"rotate\" /></td><td width='90%' style='padding-left: 1px' align='left'><div id='tst1' style=\"overflow: hidden; position: relative; width: 700px; height: 85px;\" onmouseout=\"this.hrun='start';\" onmouseover=\"this.hrun='stop';\"></div></td>";
               strString =  strString + "<td width='5%'><input id='imgscroll'  border='0' src='/images/arrow.gif' type='image' align='absmiddle' onmouseover=\"zxcScroller(\'h\',\'tst1\',\'start\',1);\" onclick=\"return false;\" onmouseout=\"zxcScroller(\'h\',\'tst1\',\'stop\');\" value=\"rotate\" /></td></tr></table></td><td width='21%'>&nbsp;</td></tr>"
               strString =  strString + "<tr><td colspan='2'>&nbsp;</td></tr>";
               strString=strString + "</table>"     
                   
               document.getElementById('trCategorySliding').innerHTML=strString;            
            }
            else
            {
                document.getElementById('trCategorySliding').innerHTML="";
            }      
        }
        else
        {   
             document.getElementById('trCategorySliding').innerHTML="";
        } 
	    }
	        else
        {   
             document.getElementById('trCategorySliding').innerHTML="";
        }
    }

	function initImageScroller()
	{
		var ImgAry=new Array();

		TempCall=Thumbimagelist();

		strImages1=StrSplit(strImages1,",");
		rotateimagelist1=strImages1;

		strlinkslist = StrSplit(strlinkslist,",");
		linkslist1=strlinkslist;

		for(i=0;i<rotateimagelist1.length;i++)
		{    
			ImgAry[i]=[ImgPath+rotateimagelist1[i],'',linkslist1[i]];
		}
		if(rotateimagelist1.length<=8)
		{   
			 document.getElementById('imgscroll').style.display="none";
			 document.getElementById('imgscrollleft').style.display="none";
		}
		if(strImages1!="")
		{
			zxcScrollContent('tst1',ImgAry,'85*85','82*82','100*50',50);
			zxcScroller('h','tst1','stop');
		}
	}
	addLoadEvent(initImageScroller);

}
catch(ex){}