(function(){	
	var scripts = document.getElementsByTagName('script'),
		src = scripts[ scripts.length - 1 ].src.split('?')[1],
		width = get('width', src) || 200,
		height = Math.max(get('height', src) || 100, 60),
		label = get('label', src),
		content = get('content', src),
		s = 'width=' + width + '&height=' + height + '&sourceLink=' + encodeURIComponent(location.href);
		
	if (label) s += '&label=' + label;
	if (content) s += '&content=' + content;
	
	document.write('<iframe src="http://rutvit.ru/tools/widgets/write/embed?'+s+'" width="'+width+'px" height="'+height+'px" frameborder="0" scrolling="no"></iframe>')

	function get(p, source) {
		var params = (source || location.search.substr(1)).split('&');
		for (var i = 0; i < params.length; i++)
			if (params[i].split('=')[0] == p) break;
		return params[i] ? params[i].split('=')[1] : false;
	}
})();