вот скрипт
спасибо за помощ
Код: Выделить всё
<html><head><script src="http://vkontakte.ru/js/api/openapi.js" type="text/javascript"></script></head> <body><div id="vk_api_transport"></div><script type="text/javascript">var URLnav = "http://domen.ru/";window.vkAsyncInit = function() { VK.Auth.getLoginStatus(function(response) { if (response.session) { window.location = URLnav; } else { VK.UI.button('vk_login'); } }); VK.Observer.subscribe('auth.login', function(response) { window.location = URLnav; });VK.init({ apiId: ....... });VK.UI.button('vk_login'); }; setTimeout(function() { var el = document.createElement("script"); el.type = "text/javascript"; el.src = "http://vkontakte.ru/js/api/openapi.js"; el.async = true; document.getElementById("vk_api_transport").appendChild(el); }, 0);</script> <div id="vk_login" style="margin: 0 auto 20px auto;" onclick="VK.Auth.login();"></div></body></html>