function Set_Cookie( name, value, expires, path, domain, secure )
{
  // set time, it's in milliseconds
  var today = new Date();
  today.setTime( today.getTime() );

  /*
  if the expires variable is set, make the correct
  expires time, the current script below will set
  it for x number of days, to make it for hours,
  delete * 24, for minutes, delete * 60 * 24
  */
  if ( expires )
  {
    expires = expires * 1000 * 60 * 60 * 24;
  }
  var expires_date = new Date( today.getTime() + (expires) );

  document.cookie = name + "=" +escape( value ) +
  ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
  ( ( path ) ? ";Path=" + path : "" ) +
  ( ( domain ) ? ";domain=" + domain : "" ) +
  ( ( secure ) ? ";secure" : "" );
}


function $(El)
{
  return document.getElementById(El);
}

function objectHover(type)
{
  if(type=='l'){
    $('bd').className = left;
  }
  if(type=='r'){
    $('bd').className = right;
  }
}

function objectOut()
{
	$('bd').className = default_type;
}

function objectSet(type)
{
  if(type=='l'){
    $('bd').className = left;
    Set_Cookie('yahamuha_style', left, 60 , '/');
    default_type = left;
    if(left=='or'){
      left = 'wh';
      right = 'bl';
      return true;
    };
    if(left=='wh'){
      left = 'or';
      right = 'bl';
      return true;
    };
  }
  if(type=='r'){
    $('bd').className = right;
    Set_Cookie('yahamuha_style', right, 60 , '/')
    default_type = right;
    if(right=='bl'){
      left = 'or';
      right = 'wh';
      return true;
    };
    if(right=='wh'){
      left = 'or';
      right = 'bl';
      return true;
    };
  };
}

function H(){
  var html = document.documentElement;
  if ($('bg').clientHeight < html.clientHeight){
    $('bg').style.height = html.clientHeight + 'px';
    $('up').style.display = 'none';
    $('flash').style.height = html.clientHeight + 'px';
  }else{
    $('flash').style.height = $('bg').clientHeight + 'px';
  };
  $('footer').style.display = 'block';
}
function Home(){
  var html = document.documentElement;
  if ($('bg').clientHeight < html.clientHeight){
    $('bg').style.height = html.clientHeight + 'px';
    $('flash').style.height = html.clientHeight + 'px';
  }else{
    $('flash').style.height = $('bg').clientHeight + 'px';
  };
  $('footer').style.display = 'block';
}
