﻿// This function calls the Web service method and 
// passes the event callback function.  
function BannerPress(brow, idSponsor) {
    Services.SnSkipass.WsSponsor.ClickBanner(brow, idSponsor, SucceededCallback);
}


// This is the callback function invoked if the Web service
// succeeded.
// It accepts the result object as a parameter.
function SucceededCallback(result, eventArgs) {
    window.status = result;
}


//-----------------------------------------------------------------------------------------------------------

function NpImage(idLuogo, CurrentImage, NextPrev) {
   Services.SnSkipass.WsSponsor.WsNpImage(idLuogo, CurrentImage, NextPrev, Okresp);
  // window.alert(CurrentImage);
}

function Okresp(result, eventArgs) {
  // window.alert(ExtractIdLuogo(result));
   //eval('pic' + 1 + '.src=' + result);

   Setlnk(String(result), getData(EstractData(result)));
   eval('pic' + ExtractIdLuogo(result) + '.src= "webcam/' + result + '";');
   
  // pic1.src = 'webcam/' + result;

}

function ExtractIdLuogo(wciImage) {
   return  wciImage.substring(0, wciImage.indexOf('_'));
}

//-----------------------------------------------------------------------------------------------------------

if (typeof (Sys) !== "undefined") Sys.Application.notifyScriptLoaded();


