var skin = {
menu: '',
pm_img: '',
pm_link: '',

toggle: function(id){
id.style.display = (id.style.display == 'none')? '' : 'none';
},

banner: function(){
skin.pm_img();
var title = document.title.match(/^(.+?)\s-\s/)? RegExp.$1 : "Message Board";
get('img', TAG, get('welcome_table', ID))[0].src = 'http://skins.vforums.co.uk/blanka/banner/?title=' + title;
get('welcome_table','id').cellSpacing = '0';
skin.menu = get('menu_buttons','id').firstChild.firstChild.firstChild.firstChild.innerHTML.replace(/::/g,' ');

get('welcome_table','id').rows[0].cells[0].width = '220px';
get('welcome_table','id').style.backgroundColor = 'transparent';
var i = document.createElement('img');
i.src = skin.pm_img;
var a = document.createElement('a');

a.href = skin.pm_link;
a.appendChild(i);

with(get('menu_buttons','id')){
innerHTML = '';
appendChild(a);
style.paddingLeft = '100px';
colSpan = '2';
style.backgroundColor = 'transparent';
}

var b = get('welcome_table','id').rows[0].insertCell(1);
with(b){
innerHTML = skin.menu;
className = 'welcome new_menu';
width='100%';
}

},

pm_img: function(){

if(vf_username=='guest'){
skin.pm_img = 'http://skins.vforums.co.uk/blanka/images/login.gif';
skin.pm_link = '/action/register/';
}else{
get('user_table', ID).style.display = 'none';
if(vf_new_pms>0){
skin.pm_img = 'http://skins.vforums.co.uk/blanka/images/new_messages.gif';
skin.pm_link = '/action/pm/';
}else{
skin.pm_img = 'http://skins.vforums.co.uk/blanka/images/no_new_messages.gif';
skin.pm_link = '/action/pm/';
}
}


}

};
skin.banner();