//****** jsfunc.js *******//

function f_ReadCookie(cookieName)
{
if (cookieName == "" )
{
return;
}
var theCookie=""+document.cookie+(("/") ? "; path=" + "/" : "") ;
var ind=theCookie.indexOf(cookieName);
if (ind==-1 || cookieName=="") return "";
var ind1=theCookie.indexOf(';',ind);
if (ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
/**** read cookie ****/

/***** Cookie Check function call  ****/
f_WriteCookie("ckTmp","Y"); // write temp. cookie
sVal = f_ReadCookie("ckTmp"); // read this value again
if (sVal != "Y")
{
return false;
}
return true;
}

function f_WriteCookie(name, value)
{
if (name == "")
{
return false;
}

if (value != null)
{
var curCookie = name + "=" + escape(value) + (("/") ? "; path=" + "/" :
"") //+
document.cookie = curCookie;
}
}// write cookie


function f_CheckBrowserCookie()
{
// Cookie Check function call
f_WriteCookie("ckTmp","Y"); // write temp. cookie
sVal = f_ReadCookie("ckTmp"); // read this value again
if (sVal != "Y")
{
return false;
}
return true;
}
