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:35px; height:120px;  background: '+color+' url(./common/img/twitter.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+120)+'px; width: 35px; height: 20px; background: url(./common/img/twitt_b.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(./common/img/twitter.png) no-repeat;"></div><div id="tbadge_label" style="'+label_style+' top:'+(top+35)+'px; width: 35px; height: 30px; background: url(./common/img/twitt_b.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/');
	}

}




