Problem with array script
<p>i want to give anchor tag to an image while checking the condition in slide show where my slide show is displayed using script</p>

<pre><code>    &lt;script type="text/javascript"&gt;

    var res; 
    var hdnvalue = a = document.getElementById('HiddenField4').value;
    var imgArr = hdnvalue.split(';'); 

    var sp = [];

    for (var count = 0; count &lt; imgArr.length; count++) {    
         sp.push([imgArr[count], "", "", ""]);    
    }  

    var mygallery2 = new fadeSlideShow({    
      wrapperid: "fadeshow2",    
      dimensions: [568, 313],    
      imagearray: sp,    

      displaymode: {    
        type: 'auto',    
        pause: 2500,    
        cycles: 0,    
        wraparound: false    
    },

    persist: false,    
    fadeduration: 500,    
    descreveal: "always",    
    togglerid: "fadeshow2toggler"

  })

&lt;/script&gt;
</code></pre>

<p>in this script i want to check the condition</p>

<pre><code>   'hdnLink' value-&gt;http://dev1.maxnet-tech.com/royalindustries/ProductList.aspx?s=4&amp;sss1=17&amp;sss2=3;;;

    var cnLink = document.getElementById('hdnLink').value;        
    var cnSplit = cnLink.split(';');        
    var b = a.split(';');


if (cnSplit[0] != "") {    
       then add &lt;a&gt;tag th that image which is redirected to plroduclist page    
}    
else {    
       add img     
}
</code></pre>

<p>how can i add  tag to  image acc to condition in an array like above script</p>
