function getCookie0(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));
}
var smimid = getCookie0("smimid");
var PURGE = getCookie0("PURGE");
if(0==0)
{
var topic_owner = "e518e417-cda6-42f5-99b8-5344349d32e0";
}
if(PURGE==1 || PURGE==2)
{
var obj = document.getElementById("bt_edit_0");
obj.style.display = 'none';
var obj = document.getElementById("bt_delete_0");
obj.style.display = 'none';
$(document).ready(function() {
var obj = document.getElementById("x_class1_0");
obj.style.display = '';
var obj = document.getElementById("x_class2_0");
obj.style.display = '';
});
}
else if(smimid==topic_owner)
{
var obj = document.getElementById("bt_edit_0");
obj.style.display = '';
var obj = document.getElementById("bt_delete_0");
obj.style.display = '';
}
else if(smimid=="e518e417-cda6-42f5-99b8-5344349d32e0")
{
var obj = document.getElementById("bt_edit_0");
obj.style.display = '';
var obj = document.getElementById("bt_delete_0");
obj.style.display = '';
}
$(document).ready(function() {
var obj = document.getElementById("x_class3_0");
obj.style.display = '';
});
Credit:
fw