<?xml version='1.0'?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="css/style.css" type="text/css"?>
<!DOCTYPE window SYSTEM "/vkontakte.dtd"><window title="&vkontakte.auth.title.loading;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <vbox flex="1" id="container">
        <browser disablehistory="true" flex="1" hide="true" id="browser" type="content"/>
        <vbox flex="1" hide="true" id="error">
            <description>&vkontakte.auth.error.timeout.top;</description>
            <description>&vkontakte.auth.error.timeout.bottom;</description>
        </vbox>
    </vbox>
    <script type="application/x-javascript"><![CDATA[var browser = document.getElementById("browser");
var container = document.getElementById("container");
var error = document.getElementById("error");
var api = {
setWindowTitle: function (title) {
window.document.documentElement.setAttribute("title",title);
}
,
showError: function () {
browser.setAttribute("hide","true");
error.setAttribute("hide","false");
}
,
set contentIsLoaded(value) {
contentLoaded = value;
browser.setAttribute("hide","false");
}
};
var contentLoaded = false;
window.addEventListener("load",function () {
const WAIT_LIMIT = 10;
window.setTimeout(function () {
if (contentLoaded)
{
return;
}

browser.stop();
api.showError();
}
,WAIT_LIMIT * 1000);
}
,false);
window.browser = browser;
window.api = api;]]></script>
</window>
