﻿// JScript File
var AdvanceTxtbox="";
var LookupName = "" ;
function textboxSearch_OnKeyUp(hidSearch)
{
    if(document.getElementById(hidSearch)!=null && event.keyCode!=13)
        {
          var dt=new Date();
        document.getElementById(hidSearch).value=dt.getUTCMilliseconds();

        __doPostBack(document.getElementById(hidSearch).id,''); 
        }
}
var confirmWin=null;





function UpdateHiddenField(objHidFld,psForWhat)
{
var dt=new Date();
    if(document.getElementById(objHidFld)!=null)
    {
     document.getElementById(objHidFld).value=psForWhat;
      __doPostBack(document.getElementById(objHidFld).id,''); 
    }
}
function AsynPostBack(hidField)
{
    //To Solve the problem of smartsearcj in safari
    //We are doing full post back if browser is safari
    //otherwise partial postback
//    var browserName = ""; 
//    var ua = navigator.userAgent.toLowerCase(); 
//    if ( ua.indexOf( "safari" ) != -1 )
//    {
//        __doPostBack('','');
//    }
//    else
//    {
     __doPostBack(document.getElementById(hidField).id,'');
//    }
                   
}
function textbox_onfocus(hidField,psForWhat)
{

 if(document.getElementById(hidField)!=null)
        {
                var dt=new Date();
                if(psForWhat==null)
                {
                document.getElementById(hidField).value=dt.getUTCMilliseconds();
                __doPostBack(document.getElementById(hidField).id,''); 
                }
                else
                {
                    if(document.getElementById(hidField).value!=psForWhat)
                    {
                     document.getElementById(hidField).value=psForWhat;
                     window.setTimeout("AsynPostBack('"+hidField+"');",500);
                    }
                }
        }
}

//function LoadAlteration()
//{
//    window.open('Documentloader.aspx',null,'location=no,resizable=yes,top=0,left=0,width='+screen.availWidth+',height='+screen.availHeight);
//}




