    var intColors = 4;
    var imgFlag = 0;
    var again=null;
    var videoContent = "";
                
    function scrollside(side, src, amount) {    
        if (amount==null){ 
            amount=10;
        }
        if (side=="left") {
            document.getElementById(src).scrollLeft-=amount;
        }else {
            document.getElementById(src).scrollLeft+=amount;
        }
        if (again==null) {
            again = setInterval("scrollside('"+side+"','"+src+"',"+amount+")",50);
        }
        return false;
    }

    function changeImage(fpicid,intLoc){
        if (fpicid==-1){
            fpicid = intOther;
        } else if (fpicid+intLoc==0){
            fpicid = 1;
        } else {
            if (imagelist[fpicid+intLoc][4]=='product_images'){
                if (fpicid < 1){
                    fpicid = intOther;
                } else if (fpicid > intOther) {
                    fpicid = 1;
                }
            } else {
                if (fpicid < intOther+1){
                    fpicid = intOther+intDetails+intColors;
                } else if (fpicid > intOther+intDetails+intColors) {
                    fpicid = intOther+1;
                }
            }
        }
        
        imgFlag = fpicid;
        //mainimage,previewimage,thumbimage,alt,imgclass,imgID,imgType
        var visual_img = document.getElementById("prod_img");
        document.getElementById("prod_img").innerHTML = "";
        var newImage = document.createElement("img");
             
        newImage.src = imagelist[fpicid][1];
        newImage.alt = imagelist[fpicid][3];
        newImage.title = imagelist[fpicid][3];
        newImage.className = imagelist[fpicid][4];
//        document.getElementById("imgcomment").innerHTML = arrComList[fpicid-1];
        visual_img.appendChild(newImage);
        for (i=1;i<imagelist.length;i++){
            if (document.getElementById(imagelist[i][5])) {
                     document.getElementById(imagelist[i][5]).className='';
            }
        }
        document.getElementById(imagelist[fpicid][5]).className= 'nav_img_active'; 
	document.getElementById("gcomment").innerHTML = comlist[fpicid];
    }

