﻿// JScript File
function ShowPrintTemplate()
{
    var path= NGServerUrl() + "/Webpages/print/PrintTemplateSelection.aspx?PrintType=ROUTE";
    if (window.HandlePrintFrame)
    {
        HandlePrintFrame(path);
    }
    else
    {    
        window.open(NGServerUrl() + "/Webpages/print/PrintTemplateSelection.aspx?PrintType=ROUTE");        
    }
}

var img;
function GetRouteSegmentMap(imageElem, segmentId, directionIndex)
{
  
        if(!sessionExpired)
        {
            PageMethods.GetRouteSegmentMap(segmentId, directionIndex,HandleGetRouteSegmentMap);
            img=imageElem;
        }
        else
        {
            HandleSessionExpired();
        }
        
  
}

function HandleGetRouteSegmentMap(postData)
{
      if(postData  != null )
            {            
                img.src = postData;
            }
}