(function() {
if (typeof tweet == 'undefined') {
		tweet = {};
	}
	var src = 'http://platform.twitter.com/widgets/tweet_button.html';
	src += '?url=';

	if ( tweet.url ) {
		src += tweet.url;
	} else {
		src += location.href;
	}	
	if ( tweet.via ) {
		if ( tweet.via == "@" || tweet.via == "") {} else {
	    src += "&via=";
		src += tweet.via;}
	} 
   if ( tweet.text ) {
   if (tweet.text == "")
   {}
   else
		{src += "&text=";
		src += tweet.text;}
	} 
   var buttn = "horizontal";
   if ( tweet.count ) {
	    src += "&count=";
		src += tweet.count;
		buttn = tweet.count;
	} 	
	 var   html = '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="' + src + '" style="';
	
	 if (buttn == "horizontal")
	 {
		html += "width:110px;height:20px;";
	 }
	  if (buttn == "vertical")
	 {
		html += "width:55px;height:63px;";
	 }
	   if (buttn == "none")
	 {
		html += "width:55px;height:20px;";
	 }
	html += '" ></iframe>';
	
	document.write(html);
	
})();
