//
//
//


//SERVER
var server='http://counter2.yaboo.jp';
//REFERER
var referer=document.referrer;
if(referer == parent.document.URL && top.document.referrer){
	referer=top.document.referrer;
}
if( referer =='[unknown origin]' ) {
	referer='';
}

//SCREENSIZE
var swidth=String(screen.width);
var sheight=String(screen.height);
if(swidth.match(/undefined/i) || sheight.match(/undefined/i)){
	swidth='';
	sheight='';
}
//DESIGN
var design;
if(String(design).match(/undefined/i)){
	design='';
}
//FIGURE
var figure;
if(String(figure).match(/undefined/i)){
	figure='';
}
//RELOAD
var reload;
if(String(reload).match(/undefined/i)){
	reload='';
}
//INITIAL
var init_counter;
if(String(init_counter).match(/undefined/i)){
	init_counter='';
}



//AGAIN
var again;
if(String(again).match(/undefined/i)){
	again='';
}
//VCOUNT
vcount=getCookie2("vcount3"+document.URL);
vcount++;
setCookie2("vcount3"+document.URL,vcount);
//VSPAN
vtime=getCookie2("vtime3"+document.URL);
dd=new Date();
vtimeNow=dd.getTime();
if(vtime != ""){
	vspan=Math.floor((vtimeNow-vtime)/1000);
}else{
	vspan="";
}
setCookie2("vtime3"+document.URL,vtimeNow);
//BANNER
var banner;
if(String(banner).match(/undefined/i)){
	banner='';
}
var banner_counter;
if(String(banner_counter).match(/undefined/i)){
	banner_counter='';
}
if( banner_counter ) {
	banner=banner_counter;
}

var URLstr=document.URL;
URLstr=URLstr.replace( /^\w+\:\/\//,"");
URLstr=URLstr.replace( /^www\./,"");
URLstr=URLstr.substring(0,1);

if( URLstr =='a' || URLstr =='f' || URLstr =='s') { // counter3.yaboo.jp
	document.write('<A href="http://counter3.yaboo.jp/analyzer/login.cgi" target="_blank" onMouseOver="Msgs2(1);" onMouseOut="Msgs2(0)"><IMG src="http://counter3.yaboo.jp/counter/?again='+again+'<>swidth='+swidth+'<>sheight='+sheight+'<>vcount='+vcount+'<>vspan='+vspan+'<>design='+design+'<>figure='+figure+'<>reload='+reload+'<>initial='+init_counter+'<>referer='+referer+'<>url='+document.URL+'" border="0"></A>');
	document.write('<SPAN id="counter2yaboojp" style="position:absolute;"></SPAN>');
}else if( URLstr =='g' ) {                                                                                                                                                                                                                                                                                                                                                        
	document.write('<A href="http://counter4.yaboo.jp/analyzer/login.cgi" target="_blank" onMouseOver="Msgs2(1);" onMouseOut="Msgs2(0)"><IMG src="http://counter4.yaboo.jp/counter/?again='+again+'<>swidth='+swidth+'<>sheight='+sheight+'<>vcount='+vcount+'<>vspan='+vspan+'<>design='+design+'<>figure='+figure+'<>reload='+reload+'<>initial='+init_counter+'<>referer='+referer+'<>url='+document.URL+'" border="0"></A>');
	document.write('<SPAN id="counter2yaboojp" style="position:absolute;"></SPAN>');
}else if( URLstr =='c' ) {
	document.write('<A href="http://counter.yaboo.jp/analyzer2/login.cgi" target="_blank" onMouseOver="Msgs2(1);" onMouseOut="Msgs2(0)"><IMG src="http://counter.yaboo.jp/counter2/?again='+again+'<>swidth='+swidth+'<>sheight='+sheight+'<>vcount='+vcount+'<>vspan='+vspan+'<>design='+design+'<>figure='+figure+'<>reload='+reload+'<>initial='+init_counter+'<>referer='+referer+'<>url='+document.URL+'" border="0"></A>');
	document.write('<SPAN id="counter2yaboojp" style="position:absolute;"></SPAN>');
}else if( URLstr =='b' || URLstr =='h' || URLstr =='m' ) {
	document.write('<A href="http://counter5.yaboo.jp/analyzer/login.cgi" target="_blank" onMouseOver="Msgs2(1);" onMouseOut="Msgs2(0)"><IMG src="http://counter5.yaboo.jp/counter/?again='+again+'<>swidth='+swidth+'<>sheight='+sheight+'<>vcount='+vcount+'<>vspan='+vspan+'<>design='+design+'<>figure='+figure+'<>reload='+reload+'<>initial='+init_counter+'<>referer='+referer+'<>url='+document.URL+'" border="0"></A>');
	document.write('<SPAN id="counter2yaboojp" style="position:absolute;"></SPAN>');
}else if( URLstr =='y' || URLstr =='t' || URLstr =='p' || URLstr =='n' ) {
	document.write('<A href="http://counter6.yaboo.jp/analyzer/login.cgi" target="_blank" onMouseOver="Msgs2(1);" onMouseOut="Msgs2(0)"><IMG src="http://counter6.yaboo.jp/counter/?again='+again+'<>swidth='+swidth+'<>sheight='+sheight+'<>vcount='+vcount+'<>vspan='+vspan+'<>design='+design+'<>figure='+figure+'<>reload='+reload+'<>initial='+init_counter+'<>referer='+referer+'<>url='+document.URL+'" border="0"></A>');
	document.write('<SPAN id="counter2yaboojp" style="position:absolute;"></SPAN>');
}else if( URLstr =='w' || URLstr =='i' || URLstr =='d' ) { // >counter7.yaboo.jp
	document.write('<A href="http://counter7.yaboo.jp/analyzer/login.cgi" target="_blank" onMouseOver="Msgs2(1);" onMouseOut="Msgs2(0)"><IMG src="http://counter7.yaboo.jp/counter/?again='+again+'<>swidth='+swidth+'<>sheight='+sheight+'<>vcount='+vcount+'<>vspan='+vspan+'<>design='+design+'<>figure='+figure+'<>reload='+reload+'<>initial='+init_counter+'<>referer='+referer+'<>url='+document.URL+'" border="0"></A>');
	document.write('<SPAN id="counter2yaboojp" style="position:absolute;"></SPAN>');
}else {
	document.write('<A href="http://counter2.yaboo.jp/analyzer/login.cgi" target="_blank" onMouseOver="Msgs2(1);" onMouseOut="Msgs2(0)"><IMG src="http://counter2.yaboo.jp/counter/?again='+again+'<>swidth='+swidth+'<>sheight='+sheight+'<>vcount='+vcount+'<>vspan='+vspan+'<>design='+design+'<>figure='+figure+'<>reload='+reload+'<>initial='+init_counter+'<>referer='+referer+'<>url='+document.URL+'" border="0"></A>');
	document.write('<SPAN id="counter2yaboojp" style="position:absolute;"></SPAN>');                                                                                                                                                                                                                                                                                           
}

//////////////////////////////
//FUNCTION
//////////////////////////////
//ONMOUSE
function Msgs2(ptNM){
	if(navigator.userAgent.indexOf("Win")>=0){
		var msg;
		if(ptNM){
			if( banner==2 ) {
				msg="<IMG src=\"http://counter6.yaboo.jp/counter/banner2.gif\">";
			}else if( banner==3 ) {
				msg="<IMG src=\"http://counter6.yaboo.jp/counter/banner3.gif\">";
			}else if( banner==4 ) {
				msg="<IMG src=\"http://counter6.yaboo.jp/counter/banner4.gif\">";
			}else if( banner==5 ) {
				msg="<IMG src=\"http://counter6.yaboo.jp/counter/banner5.gif\">";
			}else if( banner==6 ) {
				msg="<IMG src=\"http://counter6.yaboo.jp/counter/banner6.gif\">";
			}else if( banner==10 ) {
				msg="<IMG src=\"http://counter6.yaboo.jp/counter/banner10.gif\">";
			}else if( banner==11 ) {
				msg="<IMG src=\"http://counter6.yaboo.jp/counter/banner11.gif\">";
			}else {
				msg="<IMG src=\"http://counter6.yaboo.jp/counter/banner1.gif\">";
			}
			var url=new String(document.URL);
			if( url.match(/^file:\/\//i) || url.match(/^\w:/i) ) {
				window.open("http://counter2.yaboo.jp/yab/popup.html","counter2","toolbar=no,menubar=no,scrollbars=no,width=200,height=150,resizable=yes");
			}

		}else{
			msg="";
		}
		if(navigator.userAgent.indexOf("MSIE 4.")>=0){
			counter2yaboojp.innerHTML=msg;
		}else if(navigator.userAgent.indexOf("MSIE 5.")>=0 || navigator.userAgent.indexOf("MSIE 6.")>=0){
			counter2yaboojp.innerHTML=msg;
		}else if(document.layers){
			document.counter2yaboojp.document.open();
			document.counter2yaboojp.document.write(msg);
			document.counter2yaboojp.document.close();
		}
	}
}

//GETCOOKIE
function getCookie2(key,tmp1,tmp2,xx1,xx2,xx3){
	tmp1=" "+document.cookie+";";
	xx1=xx2=0;
	len=tmp1.length;
	while(xx1 < len){
		xx2=tmp1.indexOf(";",xx1);
		tmp2=tmp1.substring(xx1+1,xx2);
		xx3=tmp2.indexOf("=");
		if(unescape(tmp2.substring(0,xx3)) == key){
			return(unescape(tmp2.substring(xx3+1,xx2-xx1-1)));
		}
		xx1=xx2+1;
	}
	return("");
}
//SETCOOKIE
function setCookie2(key,val,tmp){
	key=escape(key);
	tmp=key+"="+escape(val)+"; ";
	tmp+="expires=Fri, 31-Dec-2030 23:59:59; ";
	document.cookie=tmp;
}
