Forum Moderators: open
<script type="text/JavaScript">
document.getElementById(''ISI_TopBox'').style.display = ''none'';
var v = checkCookie1();
if (v != null) {
document.getElementById(''ISI_TopBox'').style.display = ''none'';
}
else {
document.getElementById(''ISI_TopBox'').style.display = ''block'';
createCookie1("myname", "myvalue","1");
}
function checkCookie1() {
return (readCookie1(''myname''));
}
function readCookie1(name) {
var nameEQ = name + "=";
var ca = document.cookie.split('';'');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)=='' '') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function createCookie1(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
var expires = "; expires = "+ date.toGMTString();
}
else var expires = "";
document.cookie = name + "="+ value + expires + "; path=/"; // available throughout the directory
}
</script>
window.onload=function() { initDivHider(); };
//
function initDivHider() {
if document.getElementById('ISI_TopBox')) {
document.getElementById('ISI_TopBox').style.display = 'none';
var v = checkCookie1();
if (v != null) {
document.getElementById('ISI_TopBox').style.display = 'none';
}
else {
document.getElementById('ISI_TopBox').style.display = 'block';
createCookie1("myname", "myvalue","1");
}
// This should never trigger - but if it does, it tells you ISI_TopBox
// canot be found, which could indicate a validation error breaking
// the Javascript.
else { alert('ISI_TopBox element cannot be accessed.'); }
}