str = navigator.appName.toUpperCase();
if (str.indexOf("NETSCAPE") >= 0){
document.write('<link rel="stylesheet" href="http://www.igosso.jp/css/style_nn.css" type="text/css" />');
}

function qs(el){
	if(window.RegExp && window.encodeURIComponent){
		var ue=el.href,qe=encodeURIComponent(document.search.q.value);
		if(ue.indexOf("q=")!=-1){
			el.href=ue.replace(new RegExp("q=[^&$]*"),"q="+qe);
		}else if(qe){
			el.href=ue+"?q="+qe;
		}else if(!qe){
			el.href=ue;
		}else{
			el.href=ue+"&q="+qe;
		}
	}
	return 1;
}

function backToTop() {
  var x1 = x2 = x3 = 0;
  var y1 = y2 = y3 = 0;
  if (document.documentElement) {
      x1 = document.documentElement.scrollLeft || 0;
      y1 = document.documentElement.scrollTop || 0;
  }
  if (document.body) {
      x2 = document.body.scrollLeft || 0;
      y2 = document.body.scrollTop || 0;
  }
  x3 = window.scrollX || 0;
  y3 = window.scrollY || 0;
  var x = Math.max(x1, Math.max(x2, x3));
  var y = Math.max(y1, Math.max(y2, y3));
  window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));
  if (x > 0 || y > 0) {
      window.setTimeout("backToTop()", 25);
  }
}

function sbookmarks(){

    str = location.href;
    if(str.match(/^https/)){
		var imgfld = 'https://www.igosso.jp/image';
		str = str.replace("https", "http");
    }else{
		 var imgfld = 'http://www.igosso.jp/image';
    }


 // はてなにブックマーク
 document.write("<a href='http://b.hatena.ne.jp/append?" + str + "' ><img src='" + imgfld + "/append.gif' alt='はてなにブックマーク'/></a>&nbsp;");

 // このエントリーを含むはてなブックマーク
  document.write("<a href='http://b.hatena.ne.jp/entry/" + str + "' ><img src='" + imgfld + "/b_entry.gif' alt='このエントリをはてなブックマークに登録' /></a>&nbsp;");

 // del.icio.us
 href_address = "http://del.icio.us/post?url=" + encodeURIComponent(str) + "&title=" + encodeURIComponent(document.title) ;
 document.write("<a href='" + href_address + "' rel='nofollow'><img src='" + imgfld + "/delicious.small.gif' alt='Save This Page to del.icio.us' /></a>&nbsp;");

 // livedoorクリップ
 document.write("<a href='http://clip.livedoor.com/clip/add?link=" + str + "&title=" + encodeURIComponent(document.title) + "&jump=myclip'><img src='" + imgfld + "/clip_16_16_b.gif' alt='この記事をクリップ！' /></a>&nbsp;");

 //ニフティクリップ
 document.write("<a href='http://clip.nifty.com/create?url=" + str + "&title=" + encodeURIComponent(document.title) + "'><img src='" + imgfld + "/addclip_icn.gif' alt='このエントリをニフティクリップに登録'></a>&nbsp;");

 //ECナビ人気ニュース
 document.write("<a href='http://news.ecnavi.jp/config/add/confirm?url=" + str + "&title=" + encodeURIComponent(document.title) + "'><img src='" + imgfld + "/icon_pencil.gif' alt='このエントリをECナビ人気ニュースに登録'></a>&nbsp;");

 //BlogPeople Tags に登録
 href_address = "javascript:void(window.open('http://tags.blogpeople.net/tags_addlink.jsp?u=" + escape(str) + "&ti=" + escape(document.title) + "','BlogPeopleTags','scrollbars=no,width=480,height=320,left=100,top=100,status=yes,resizable=yes'))";
 document.write("<a href=\"" + href_address + "\"><img src='" + imgfld + "/tags_ins.gif' alt='このエントリを BlogPeople Tags に登録'></a>&nbsp;");

 //BlogPeople Instant Bookmark に登録
 href_address = "javascript:void(window.open('http://www.blogpeople.net/ib_addlink.jsp?u=" + escape(str) + "&t=" + escape(document.title) + "','blog_ib','scrollbars=no,width=475,height=350,left=100,top=100,status=yes,resizable=yes'))";
 document.write("<a href=\"" + href_address + "\"><img src='" + imgfld + "/tags_ib.gif' alt='このエントリを BlogPeople Instant Bookmark に登録'></a>&nbsp;");

 //PingKingポッケ
 document.write("<a href='http://pingking.jp/bookmark/?url=" + str + "&title=" + encodeURIComponent(document.title) + "'><img src='" + imgfld + "/pingking.gif' alt='PingKingポッケに追加'></a>&nbsp;");
}
