if (typeof document.documentElement.style.maxHeight != "undefined") {/*IE6かどうかの判定*/

function tbadge(account, design, color, side, top)
{
	top = parseInt(top);
	
	box_style='position:fixed; top:'+top+'px; z-index:6000; cursor:pointer; '+side+': 0px;';
	label_style='position:fixed; z-index:7000; cursor:pointer; '+side+': 0px;';

	var designs = new Array();
	
	designs['left'] = new Array(
		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:100px; height:35px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/01_l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+35)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:35px; height:120px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/02_l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+120)+'px; width: 35px; height: 20px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:75px; height:75px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/03_l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+75)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:100px; height:35px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/01_2l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+35)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:35px; height:120px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/02_2l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+120)+'px; width: 35px; height: 20px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:75px; height:75px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/03_2l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+75)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',
		
		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:100px; height:35px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/01_3l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+35)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:35px; height:120px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/02_3l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+120)+'px; width: 35px; height: 20px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:75px; height:75px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/03_3l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+75)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',
		
		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:100px; height:35px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/01_4l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+35)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:35px; height:120px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/02_4l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+120)+'px; width: 35px; height: 20px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:75px; height:75px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/03_4l.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+75)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_l1.png) no-repeat;">&nbsp;</div>'
		
	);	

	designs['right'] = new Array(

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:100px; height:35px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/01_r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+35)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',
		
		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:35px; height:120px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/02_r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+120)+'px; width: 35px; height: 20px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:75px; height:75px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/03_r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+75)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:100px; height:35px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/01_2r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+35)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',
		
		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:35px; height:120px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/02_2r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+120)+'px; width: 35px; height: 20px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:75px; height:75px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/03_2r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+75)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',
		
		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:100px; height:35px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/01_3r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+35)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',
		
		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:35px; height:120px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/02_3r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+120)+'px; width: 35px; height: 20px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:75px; height:75px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/03_3r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+75)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',
		
		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:100px; height:35px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/01_4r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+35)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',
		
		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:35px; height:120px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/02_4r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+120)+'px; width: 35px; height: 20px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>',

		'<div id="tbadge_box" style="'+box_style+' color: '+color+'; width:75px; height:75px;  background: '+color+' url(http://twitbtn.com/ui/images/tbadge/03_4r.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+75)+'px; width: 35px; height: 30px; background: url(http://twitbtn.com/ui/images/tbadge/copy_r1.png) no-repeat;">&nbsp;</div>'
		
	);	

	if(document.getElementById('tbadge'))
		document.body.removeChild(document.getElementById('tbadge'));

	init = document.createElement('div');
	init.setAttribute('id','tbadge');
	document.body.appendChild(init);
	
	init.innerHTML = designs[side][design-1] + '<style>#tbadge_label{visibility:hidden;} #tbadge:hover #tbadge_label{visibility:visible;}</style>';
	
	document.getElementById('tbadge_box').onclick=function(){
		window.open('http://twitter.com/'+account);
	}
	
	document.getElementById('tbadge_label').onclick=function(){
		window.open('http://twitbtn.com/');
	}

}
tbadge('comingkobe', 11, '#35ccff', 'right', 450);
}