<!--

var forumtitle = (document.title.match(/^(.+?)\s-\s/))? RegExp.$1 : "Message Board";
//var subtitle = ("undefined" != typeof(subtitle))? subtitle : "Message Boards: Reloaded";
var subtitle = ("undefined" != typeof(subtitle))? subtitle : "";

var banner_url = ("undefined" != typeof(banner_url))? banner_url : 'http://skins.vforums.co.uk/slip/banner/?title='+forumtitle+'&subtitle='+subtitle;

var root = 'http://skins.vforums.co.uk/slip/images/';
var sep = ' <img src=http://skins.vforums.co.uk/slip/images/divider.gif> ';
var nav_sep = ' <img src=http://skins.vforums.co.uk/slip/images/nav_sep.gif> ';
var skin = {
   search: function(){
      if(get('search','id').value != '' && get('search','id').value != 'Search...'){
         location.href = '/action/search/search_words/' + get('search','id').value;
      }else{
         get('search','id').value = 'Search...';
      }
   },
   banner: function(){
      var a = get('welcome_table','id').rows[0].insertCell(1);
      with(a){
         className = 'welcome';
         align = 'right';
         innerHTML = '<div class="menu_right" align="right" style="background-image: url(\''+ banner_url +'\');"><div style="position: relative; top: 200px; left: -75px" align="right" width="386px">' + get('menu_buttons','id').firstChild.firstChild.firstChild.firstChild.innerHTML.replace(new RegExp(' :: ', 'g'),sep) + '</div></div>';
         width = '386px';
         
      }
      with(get('welcome_table','id').rows[0].cells[0]){
         width = '378px';
         className = 'welcome';
         align = 'left';
         innerHTML = '<div class="menu_left"></div>';
      }
      get('menu_buttons','id').parentNode.style.display = 'none';
      get('welcome_table','id').cellSpacing = '0';
      for(i=1; i<get('br','tag').length; i++){
         get('br','tag')[i].style.display = 'none';
      }

      for(i=0; i<get('table','tag').length; i++){
         if(get('table','tag')[i].className.match(/(head|base)/i) && get('table','tag')[i].className.match(/welcometable/i)){
            get('table','tag')[i].style.display='none';
         }
      }

   },
   slip_vf: function(){
      var d = document.getElementsByTagName('div');
      for(i=0;i<d.length;i++){
         if(d[i].className == 'slip_bg'){
            d[i].innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" align="center"><tr><td align="left"  style="background: url(http://skins.vforums.co.uk/slip/images/mid_left.png) repeat-y; width:3px;"></td><td vAlign="top" style="background:#EDEFF1 url(http://skins.vforums.co.uk/slip/images/mid_right.png) right repeat-y; padding-right: 3px;">' + d[i].innerHTML + '</td></tr></table>';
         }
      }
   },
   board_fix: function(){
      for(i=0;i<get('td','tag').length;i++){
         if(get('td','tag')[i].innerHTML.match(/New Posts/) && get('td','tag')[i].width=="6%" && get('td','tag')[i+2].width=="25%" && get('td','tag')[i+2].firstChild.innerHTML==''){
            get('td','tag')[i+2].firstChild.innerHTML = 'No Recent Posts'
         }
      }

   },
   slip_vf_head_main: function(){
      for(i=0;i<(get('table','tag').length - 2);i++){
         if(get('table','tag')[i].className.match(/head/)){
			var a = get('table','tag')[i].rows[0].cells[0];
			a.className = 'hb_left';
			 a.innerHTML = '<div style="position: relative; top: -2px; left: 45px" align="left" width="386px">' + get('table','tag')[i+2].rows[0].cells[0].firstChild.innerHTML + '</div>';
			 a.align='left';
			get('table','tag')[i+2].rows[0].style.display='none';
        }
      }
    },
   init: function(){
      this.banner();
   },
   button_class: function(){
      if(vf_username !='guest'){
         if(get('preview','name')[0])
			get('preview','name')[0].className = '_button';
         if(get('post','name')[0])
			get('post','name')[0].className = '_button';
         if(get('modify','name')[0])
			get('modify','name')[0].className = '_button';
      }
      if(get('ubbc_buttons','id')){
         get('ubbc_buttons','id').className = 'ubbc';
      }
   }

};
skin.init();
//-->