function getCookie(name) {
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
} else
begin += 2;
var end = document.cookie.indexOf(";", begin);
if (end == -1)
end = dc.length;
return unescape(dc.substring(begin + prefix.length, end));
}
function userNameWrite() {
var uname = getCookie('CN_UR_FIRST_NAME');
if(uname == null) {
uname = getCookie('CN_UR_FNAME');
}
if(uname !=null) {
var cnnameTag = document.getElementById('cnurfirstname');
for(var x=0; cnnameTag.childNodes[x]; x++) {
areaTag.removeChild(areaTag.childNodes[x]);
}
var bNode = document.createElement('B');
var nText = document.createTextNode(uname);
bNode.appendChild(nText);
cnnameTag.appendChild(bNode);
}
}