// -----------------------
// 
// -----------------------

var orgColour ;
var currenttab = null;
var currentpage = null;

function scroll1()
{
 if (document.all)
 {
  if (document.body.scrollTop + menufloat.clientHeight < document.body.scrollHeight)
  {
    menufloat.style.top = document.body.scrollTop;
  }
 }
}

function openWin(s)
{
  window.open(s,"", "width=400,height=300,status=1,resizable=1;");
  return false;
}

function openWorld(s)
{
  window.open(s,"", "width=720,height=500,status=1,resizable=1;");
  return false;
}

function openBigWindow(s)
{
  window.open(s,"", "width=700, height=600, status=1, resizable=1");
  return false;
}

function ShowPage(tab, name)
{
 if (tab != currenttab)
 {
  if (currentpage != null)
  {
   currenttab.disabled = false;
   currenttab.className = 'tabinactive';
   currentpage.className = 'tabbedpage';
   currentpage.style.display = 'none';
  }
  currenttab = tab;
  currenttab.className = 'tabactive';
  currentpage = document.all[name];
  currentpage.className = 'tabbedpageactive';
  currentpage.style.display = '';
 }
}

function LoadPage()
{
  ShowPage(document.getElementById('t1'), 'tab1');
}

function ShowRightPanel(img)
{
  if (document.body.scrollWidth > 1050)
  {
    var h=document.body.scrollHeight;
    if (document.all)
    {
      var newDiv=document.createElement('<div id="testx" style="background-image:url(' + img  + ');position:absolute;top:0px;left:1024px;background-color:#FFF;width:100px;background-color:#FFF;height=' + h + ';" />');
      document.body.appendChild(newDiv);
    }
    else
    {
      // create a new div element and give it some content and a class
      newDiv = document.createElement("div");
      newDiv.className='rightpanel';
      newDiv.innerHTML = " ";
      newDiv.style.height = h;
      newDiv.style.backgroundImage ='url(' + img + ')';
      // add the newly created element and it's content into the DOM
      document.body.appendChild(newDiv);
    }
  }
}
