﻿
function GetObj(objName)
{if(document.getElementById)
{return eval('document.getElementById("'+objName+'")');}
else if(document.layers)
{return eval("document.layers['"+objName+"']");}
else
{return eval('document.all.'+objName);}}
function GetCookie(name)
{var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;var returnValue;if((!start)&&(name!=document.cookie.substring(0,name.length)))
{returnValue=null;}
if(start==-1)
returnValue=null;var end=document.cookie.indexOf(';',len);if(end==-1)
{end=document.cookie.length;}
return unescape(document.cookie.substring(len,end));}
function writeCookie(name,value)
{var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function DeleteCookie(name)
{var exp=new Date();exp.setTime(exp.getTime()-1);document.cookie=name+"=; expires="+exp.toGMTString();}
function GetXMLHttpObject()
{var A=null;try
{A=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{A=new ActiveXObject("Microsoft.XMLHTTP");}
catch(oc)
{A=null;}}
if(!A&&typeof XMLHttpRequest!="undefined")
{A=new XMLHttpRequest();}
return A;}
function OnTimeOut(arg)
{alert("TimeOut!");}
function OnError(arg)
{alert("Error!");}
function FreshIntelligenceAgency(date,ixNext)
{var pd="d="+date+"&n="+ixNext;$.post("./Ajax/FreshIntelligenceAgency.aspx",pd,function(result)
{if(result.split('|')[0].indexOf("<tr>")!=-1)
{$("#FreshIntelligenceAgencyList1").empty().append(result.split('|')[0]);$("span[id*='Label_Date1']").text(result.split('|')[1]);}});}