function rbcSetCookie(name,value,expires,path,domain,secure)

{

document.cookie =name + "=" + value

+ ((expires)?"; expires=" + expires :"")

+ ((path)?"; path=" + path :"")

+ ((domain)?"; domain=" + domain :"")

+ ((secure)?"; secure=" + secure :"");

}

function rbcGetCookie(Name,defaultVal)

{

var search =Name + "=";

if (document.cookie.length >0)

{

offset =document.cookie.indexOf(search);

if (offset !=-1)

{

offset +=search.length;

end =document.cookie.indexOf(";",offset);

if (end ==-1)

end =document.cookie.length;

return document.cookie.substring(offset,end);

}

}

return defaultVal;

}

function rbcDeleteCookie(name,path)

{

rbcSetCookie(name,null,"Thu, 03 Jun 1993 00:00:00 GMT",path);

}

