function vk_button_insert(button_text, link){
	start_tmpl = function(link){return '<div class="vk_generated_button" style="font-family:tahoma; font-size:10px; overflow: auto; width: 100%">\
	<a target="_blank" style="text-decoration: none; color: auto;" href="'+link+'">\
	<div style="float: left; height: 21px; width: 2px; background: url(\'http://vk.com/images/btns.png\') no-repeat scroll -21px -42px transparent;">&nbsp;</div>'}
	word_tmpl = function(text){return '\
	<div style="float: left; height: 19px; border: 1px solid #3B6798; border-left-width: 0px; border-right-width: 0px; background-color: #6d8fb3">\
		<span style="line-height: 19px; padding: 0 4px 0 4px; color: white; text-shadow: 0px 1px #45688e">'+text+'</span>\
	</div>'}
	B_tmpl = '\
	<div style="float: left; width: 21px; height: 21px; background: url(\'http://vk.com/images/btns.png\') no-repeat scroll 0px -42px transparent">&nbsp;</div>';
	end_tmpl = '\
	<div style="float: left; height: 21px; width: 2px; background: url(\'http://vk.com/images/btns.png\') no-repeat scroll -21px -63px transparent;">&nbsp;</div>\
	<!--<div style="width: auto; height: 0; clear: both;">&nbsp;</div>-->\
	</a>\
</div>\
<!--<div style="width: auto; height: 0; clear: both;">&nbsp;</div>-->';
	 a = button_text.split(/ v /);
	
	content = start_tmpl(link);
	for (i=0; i<a.length; i++){
		content += word_tmpl(a[i]);
		if (i < (a.length -1)){
			content += B_tmpl;
		}
	}
	content += end_tmpl;
	document.write(content);
}	


