//コピーライト
function wCopy(){
document.write("copyright &copy; 2008 WebCrew Inc. All rights reserved.&nbsp;")
}


//クッキー
function cookieWin() {
	newwin =window.open('http://www.webcrew.co.jp/browser/','help','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=550,height=400,left=0,top=0');
	newwin.focus();
}

//*****************************************************
//クッキーチェック START
//*****************************************************
function cookieWin2(){
	newwin =window.open('http://www.bang.co.jp/cgi-bin/cookie/cookie_check.pl','help','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=550,height=400,left=0,top=0');
	newwin.focus();
}

//クッキー設定
function SetCookie(name, value){
  var argv        = SetCookie.arguments;
  var argc        = SetCookie.arguments.length;
  var expires     = (argc > 2) ? argv[2] : null;
  var path        = (argc > 3) ? argv[3] : null;
  var domain      = (argc > 4) ? argv[4] : null;
  var secure      = (argc > 5) ? argv[5] : false;

  document.cookie = name + "=" + escape(value)
          + ((expires     == null) ? "" : ("; expires="   + expires))
          + ((path        == null) ? "" : ("; path="    + path))
          + ((domain      == null) ? "" : ("; domain="  + domain))
          + ((secure      == true) ? "; secure" : "");
}

//クッキー取得
function GetCookie(name){
  var arg  = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var cookie_value = "";
  var i = 0;
  
  while (i < clen){
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg) cookie_value = GetCookieValue(j);        
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }        
  return cookie_value;       
}

//クッキー初期化
function clearCookie(key){
document.cookie = key + "=" + "xx; expires=1-Jan-1997 00:00:00;";
}

function GetCookieValue(offset){
  var endstr = document.cookie.indexOf(";", offset);
  if (endstr == -1) endstr = document.cookie.length;        
  return unescape(document.cookie.substring(offset, endstr));        
}

//*****************************************************
//クッキーチェック END
//*****************************************************


