﻿// JScript File

function GetPath(np) 
{
    var picPath=document.getElementById("imgPath").value;
    
   
    var picPath=document.getElementById("imgPath").value;
    PageMethods.getPrevNextImg(np,picPath,OnGetMessageSuccess, OnGetMessageFailure); 
//    if(picPath!="#")
//    {
//         document.getElementById("img").src="images/loading.gif";   
//    }
 
   
}

function OnGetMessageSuccess(result, userContext, methodName) 
{
    var img=document.getElementById("img");
    var currentPath=document.getElementById("imgPath");
    if(result != "#")
        {
            currentPath.value=result;
            img.src=result;
        }
//     else
//        {
//            img.src=document.getElementById("imgPath").value;
//        }   
           
} 

  
function OnGetMessageFailure(error, userContext, methodName) 
{
    alert(error.get_message());
}  
        
       

