// Time-stamp: <2008-03-03 16:26:35 root>
arrBanObj = [];
arrFonts = [];
arrFonts = {
'8': '8',
'10': '10',
'14': '14',
'16': '16',
'18': '18',
'22': '22'
}
function cmsBannerRegister(banner_id){
if (arrBanObj){
arrBanObj[banner_id] = 1;
return true;
}
return false;
}
function cmsBannerChStatusAll(show){
var obj_layer;
for (var for_key in arrBanObj){
obj_layer = document.getElementById(for_key);
cmsChLayerStatus(obj_layer,show);
}
cmsBannerControlShow(show);
}
function cmsChLayerStatus(obj_layer,show){
if (obj_layer){
if (show == 2){
obj_layer.style.display = 'inline';
}else if (show){
obj_layer.style.display = 'block';
}else{
obj_layer.style.display = 'none';
}
}
}
function cmsBannerControlShow(action){
var obj_layer;
var ban_cont_hide = ''+adv_hide+'';
var ban_cont_show = ''+adv_show+'';
if (action == 0){
obj_layer = document.getElementById('banner_control');
obj_layer.innerHTML = ban_cont_show;
}else if (action == 1){
obj_layer = document.getElementById('banner_control');
obj_layer.innerHTML = ban_cont_hide;
}else if (action == 2){
document.write('' + ban_cont_hide + '');
}
}
function cmsIdDisplay(layer_id, action){
var obj_layer;
obj_layer = document.getElementById(layer_id);
if (obj_layer){
cmsChLayerStatus(obj_layer,action);
}
}
function cmsFontChSize(fontsize){
var obj_layer;
obj_layer = document.getElementById('articlebody');
if (obj_layer){
obj_layer.setAttribute("class", 'txtfont'+fontsize); // for konq
obj_layer.setAttribute("className", 'txtfont'+fontsize); // for IE
}
for (var for_key in arrFonts){
obj_layer = document.getElementById('ctrlfont'+for_key);
if (obj_layer){
if (fontsize==for_key){
obj_layer.setAttribute("class", 'ctrlfontactive'); // for konq
obj_layer.setAttribute("className", 'ctrlfontactive'); // for IE
cmsSetCookie('font_size', fontsize, null, '/');
}else{
obj_layer.setAttribute("class", 'ctrlfont'); // for konq
obj_layer.setAttribute("className", 'ctrlfont'); // for IE
document.getElementById('ctrlfont'+for_key).className='ctrlfont';
}
}
}
}
function cmsFontControlShow(){
for (var for_key in arrFonts){
document.write(' '+for_key+' ');
}
}
function cmsFontRestore(){
var my_font_size = cmsGetCookie('font_size');
if (my_font_size){
cmsFontChSize(my_font_size);
}
}
function cmsSetCookie(name, value, expire, path, domain){
if (expire == null ){
expire = new Date();
expire.setTime(expire.getTime() + 24*3600*1000); // +24 hour
}
document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain));
}
function cmsGetCookie(name){
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ';', len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
function cmsDeleteCookie(name, path, domain){
// if (Get_Cookie(name ) )
document.cookie = name + "=" +
((path) ? ";path=" + path : "") +
((domain) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}