function widget( $args, $instance ) {
$title = apply_filters( 'widget_title', $instance['title'] );
$appid =@ $instance['appid'];
$limit =@ $instance['limit'];
$width =@ $instance['width'];
echo $args['before_widget'];
if ( ! empty( $title ) ) {
echo $args['before_title'] . $title . $args['after_title'];
}
echo '<div id="vk_comments1"></div>
<script type="text/javascript">
window.onload = function () {
VK.init({apiId: '.$appid.', onlyWidgets: false});
VK.Widgets.CommentsBrowse("vk_comments1", {width: "'.$width.'", limit: '.$limit.', mini: 0});
}
</script>' ;
echo $args['after_widget'];
}