function SupportChangeDiv(bool) 
{
    var auth = document.all['auth'];
    var forgot = document.all['forgot'];
    if (auth != null && forgot != null) 
    {
        if (bool) 
        {
            auth.style.display = '';
            forgot.style.display = 'none';
            if (document.all['ctl00_content_login'] != null) document.all['ctl00_content_login'].focus();
        }
        else 
        {
            auth.style.display = 'none';
            forgot.style.display = '';
            if (document.all['ctl00_content_login_mail'] != null) document.all['ctl00_content_login_mail'].focus();
        }
    }
}
function OpenMenu(obj) 
{
	var doc = document.getElementById(obj);
	if (doc != null) 
	{
		if (doc.style.display == "none") doc.style.display=""; 
		else doc.style.display="none";
	}
}
function SeoRequestJS(request)
{   
    var doc = document.getElementById('seo_request');     
    if (doc != null) 
    {
        doc.style.top = (ClientHeight()/2 + ClientScrollTop() - 100) + 'px';   
        doc.style.display="";
    }   
    SeoRequest(request,"seo");                       
} 
function Waiting()
{
    var div = document.getElementById('result_seo_request');
    if (div != null) div.innerHTML = '<img src="style/loading.gif" alt="подождите, пожалуйста..." />';  
}            
function ClientCallback(result,context)          
{
    var div = document.getElementById('result_seo_request');
    if (div != null) 
        div.innerHTML = result;   
}                    
function ClientErrorCallback(error,context)          
{   
    var div = document.getElementById('result_seo_request');
    if (div != null) div.innerHTML = "<p>Ошибка получения данных!<br/>Извините за неубоства.</p>";
} 
function CreateRequest(words, url, mail)
{
    var req = 'send';
    var div = document.getElementById(words);
    if (div != null)
        req = req + '#' + div.value;
    div = document.getElementById(url);
    if (div != null)
        req = req + '#' + div.value;
    div = document.getElementById(mail);
    if (div != null)
        req = req + '#' + div.value;
    SeoRequestJS(req);
}
//высота прокрутки клиентского скола
function ClientScrollTop()
{
    return self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
}
//высота клиентской области
function ClientHeight()
{
    return document.compatMode=='CSS1Compat' ? document.documentElement.clientHeight : document.body.clientHeight;
}
