﻿// JScript File


//  Code to gray out the Screen
function log_out(strNormal)
{
    ht = document.getElementsByTagName("html");
    bdy = document.getElementsByTagName("body");
    ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
    bdy[0].style.opacity = 0.4;

//    if (confirm('Are you sure you want to log out?'))
//    {
//        window.location="LoginPage.aspx";
//        return true;
//    }
//    else
//    {
//        ht[0].style.filter = "";
//        return false;
//    }
   if (strNormal =="Normal")
   {
        alert('Your session has expired due to a prolonged period of inactivity');
   }
        window.location="LoginPage.aspx";
    
}



//open Reports from specific folder
 function callReportCommon(path,strAcc,strStyle)
    {
        //alert('asjdhasd');
        if (strAcc.toString().indexOf(".pdf")>1)
        {
	    window.open(path + strAcc,"",strStyle);	
        }
        else  if (strAcc.toString().indexOf(".jpg")>1)
        {
         window.open(path + strAcc,"",strStyle);	
        }
        else  if (strAcc.toString().indexOf(".jpeg")>1)
        {
         window.open(path + strAcc,"",strStyle);	
        }
        else  if (strAcc.toString().indexOf(".ksd")>1)
        {
         window.open(path + strAcc,"",strStyle);	
        }
        else
        {
        window.open(path + strAcc + ".pdf","",strStyle);	
        }
    }
  
  function PopupPage(strurl,str,strStyle)
  {
   window.open(strurl,"",strStyle);	
  }

