﻿var imagetool_array;
var imgcounter = 0;
function nextimage()
{   
    
    var hdnimgcontrol  =document.getElementById("hdnImage");
    var imagebar = document.getElementById("lblImage");
    
    if (imagebar == null)
        imagebar = document.getElementById("ctl00_placeholder_lblImage");
    if (hdnimgcontrol == null)
        hdnimgcontrol  =document.getElementById("ctl00_placeholder_hdnImage");
    var imgarraypath = hdnimgcontrol.value;    
    if (imagetool_array== null)
        imagetool_array = imgarraypath.split(";");
    //var imagebar = document.getElementById("lblImage");    
    if (imagetool_array.length == 0) return;    
    imgcounter = imgcounter + 1;    
    if (imgcounter == imagetool_array.length) imgcounter=0;
    if (imagetool_array.length > 0)
    {        
        imagebar.src = imagetool_array[imgcounter];
    }    
}


function showrelatedpromotionsfordetailpage()
{

    var control  = document.getElementById("hdnpromotionid");
    if (control == null)
    {
        control  = document.getElementById("ctl00_placeholder_hdnpromotionid");
    }
    var promotionid = control.value;    

    //getrelatedpromotions('27B28621-617A-44D6-B39F-00A334254EC5',1);      
    getrelatedpromotions(promotionid,1);      
}
