<!--


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



var historyName;
var cookieName = "page_history";
var cookieInfo;
var showPopup = false;
var arr = new Array();
var http_request;
var response_array;
var stop_toolbar; //=1 when to stop the d2p toolbar
var d2p_url = 'http://www.d2pass.com/';

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showFlash(path, width, height, title) {
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'" tabindex="2" title="'+title+'" STYLE="Z-INDEX:-1"><param name="wmode"value="transparent" /><param name="movie" value="'+path+'" /><param name="quality" value="high" /><embed src="'+path+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed></object>');
}

function setCookie (name, value){
  document.cookie = name + '=' + escape(value) + ";path=/;"
}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function getCookie(cookieName){
  var search = cookieName + '=';
  if (document.cookie.length>0) {
    offset = document.cookie.indexOf(search);
    if (offset != -1){
      offset += search.length;
      end     = document.cookie.indexOf(';',offset);
      if(end == -1)
        end = document.cookie.length;
      return unescape(document.cookie.substring(offset,end));
    }
  }
  return null;
}
var cookieInfo = getCookie("page_history")
/*
function showUserStatus() {
        user_status = getCookie('user_status');
        netia = getCookie('NetiA');
        user_status_name = '';
        if(netia) {
                if(user_status=='1') {
                        user_status_name = '会員';
                } else if(user_status=='3') {
                        user_status_name = 'VIP会員';
                } else if(user_status=='5') {
                        user_status_name = 'SUPERVIP会員';
                }
        }

        if(user_status_name!='') {
                document.write('<td width=100 height="27">ステイタス：' + user_status_name + '</td><td><a href="/logout.php"><img src="/images/header/logout.gif" width="74" height="27" border="0"></a></td></tr><tr><td><a href="/member/vip_express.shtml">ＶＩＰアップグレード>></a></td><td><a href="/member/cc_vip_upgrade.htm">超ＶＩＰアップグレード>></a></td>');
        } else {
                document.write('<td width=80 height="27"><a href="/member/login.php"><img src="/images/header/login.gif" width="74" height="27" border="0"></a></div></td><td><a href="/first.htm">初めての方</a></td></tr><tr><td colspan="2"><a href="https://perldesk.dtiserv.com/cgi-bin/up.cgi" target="_blank">ID/パスワードを忘れた方はこちら>></a></td>');
        }
}

function showD2PToolbar() {
  if (stop_toolbar != 1) {
        netia = getCookie('NetiA');
        ml = '';
        if(netia) {
            cForm = netia.split(":");
            check = /.+@.+\..+/;
            if (cForm[0].match(check)) {
                document.write('<div class="d2_toolbar"><TABLE cellSpacing=0 cellPadding=0 width=100% border=0 ><TBODY><TR><TD height=23><iframe src="' + d2p_url + 'toolbarD2P/www.1pondo.tv');
                document.write('?user_name=' + cForm[0]);
                document.write('" frameBorder=0 width="100%" scrolling=no height=23></iframe></TD></TR></TBODY></TABLE></div>');
            }
        }
  }
}

*/
function showHistory(){
  if(cookieInfo){
    document.write("<table width='100%' height=20 cellspacing=0 cellpadding=2 border=0><tr><td>");
    arr = cookieInfo .split("|")
    for(var i=0; i < arr.length; i++){
      var temp = arr[i].split("::");
      var title = temp[0];
      if(title.length>13) title = title.substring(0, 13)+'...';
				var url = temp[1];
				
				if(i>0) document.write("&nbsp;>&nbsp;");
      document.write("<a href=" + url + " class='kuzu_link'>" + title + "</a>");
    }
    document.write("</td></tr></table>");
  }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////
function checkHistory(arrLocal){
  for(i=0; i<arrLocal.length; i++){
    strHistory = arrLocal[i]
    strHistoryName = (strHistory.split("::"))[0]
    if(strHistoryName.indexOf(historyName) > -1 && strHistoryName.length == historyName.length)
      return false
  }
  return true
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(!historyName)
  historyName = (document.title).replace("1pondo.tv :: ", "")

if(cookieInfo){
  arr = cookieInfo .split("|")
  if(historyName != "" && checkHistory(arr)){
    if(arr.length >= 5)
      arr = (arr.slice(1,5)).concat(new Array(historyName+"::"+document.URL))
    else
      arr = arr.concat(new Array(historyName+"::"+document.URL))
    setCookie(cookieName,  (cookieInfo = arr.join("|")))
  }
} else {
  setCookie(cookieName, historyName+"::"+document.URL)
}

function checkHistory(arrLocal){
	for(i=0; i<arrLocal.length; i++){
  	strHistory = arrLocal[i]
    strHistoryName = (strHistory.split("::"))[0]
    	if(strHistoryName.indexOf(historyName) > -1 && strHistoryName.length == historyName.length)
      return false
  }
  return true
}


//-->


