function TwittValidateUrl(url) {var v = new RegExp();v.compile("^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=#]+$");if (!v.test(url)) {return false;}return true}
if (typeof twitt_text == 'undefined') {twitt_text = 'Wprowadź tekst retwitta';}
if (typeof twitt_url == 'undefined' || TwittValidateUrl(twitt_url) == false) {twitt_url = window.location.href;} else {twitt_url = encodeURIComponent(twitt_url);}
if (typeof twitt_button_size == 'undefined') {twitt_button_size = 'normal';}
if (typeof twitt_button_label == 'undefined') {twitt_button_label = '';}
if (typeof twitt_button_label_width == 'undefined') {twitt_button_label_width = 0;} else {twitt_button_label_width = parseInt(twitt_button_label_width);}
if (typeof twitt_button_label_css == 'undefined') {twitt_button_label_css = '';}
if (typeof twitt_button_label_class == 'undefined') {twitt_button_label_class = '';}
switch (twitt_button_size){case 'normal':var twitt_frame_width=65+twitt_button_label_width;var twitt_frame_height=66;break; case 'medium':var twitt_frame_width=46+twitt_button_label_width;var twitt_frame_height=31;break; case 'small':var twitt_frame_width=92+twitt_button_label_width;var twitt_frame_height=15;break;default: twitt_button_size='normal';var twitt_frame_width=65+twitt_button_label_width;var twitt_frame_height=66;break;}
document.write('<iframe width="'+twitt_frame_width+'" scrolling="no" height="'+twitt_frame_height+'" frameborder="0" src="http://twitt.pl/twitt-button.js?size='+encodeURIComponent(twitt_button_size)+'&text='+encodeURIComponent(twitt_text)+'&url='+twitt_url+'&label='+encodeURIComponent(twitt_button_label)+'&label_css='+encodeURIComponent(twitt_button_label_css)+'&label_class='+encodeURIComponent(twitt_button_label_class)+'" border="0" allowtransparency="true"></iframe>');

