﻿// JScript File

var GetServerInfoUrl = "/GetServerInfo.aspx";



function GetResolution()
{
    var rWidth;
    var rHeight;
    if( typeof( window.innerWidth ) == 'number' ) 
    {
        //Non-IE
        rWidth = window.innerWidth;
        rHeight = window.innerHeight;
    } 
    else if( document.documentElement &&( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
    {
        //IE 6+ in 'standards compliant mode'
        rWidth = document.documentElement.clientWidth;
        rHeight = document.documentElement.clientHeight;
    }
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
    {
        //IE 4 compatible
        rWidth = document.body.clientWidth;
        rHeight = document.body.clientHeight;
    }
    return rWidth + " x " + rHeight;
}






function GetServerInfo()
{
    var requestUrl=GetServerInfoUrl;
    var methode="POST";
    var isAsynchrone = false;

    var propResolution = new property();
    propResolution.Name = "resolution"
    propResolution.Value = GetResolution();
    
    var propNavName = new property();
    propNavName.Name = "browser"
    propNavName.Value = navigator.appName;
    
    var propNavVersion = new property();
    propNavVersion.Name = "browserVersion"
    propNavVersion.Value = navigator.appVersion;
    
    
    
    var propAnserName = new property();
    propAnserName.Name = "anserName";
    propAnserName.Value = "test";

    AjaxRequest(requestUrl, methode, isAsynchrone,new Array(ResponseGetServerInfo), propAnserName, propResolution, propNavName, propNavVersion);

    
}

function ResponseGetServerInfo(xmlResponse)
{

    var showSecurityTag = xmlResponse.getElementsByTagName("ShowSecurity")[0];
    var showSecurity = showSecurityTag.firstChild.nodeValue;
    if( showSecurity == "true")
    {
        LoadOverlayer('div_security');  
        ShowExitButton('CloseMouseOutSecurity');
    }
    //ShowCompanyType();
    
    
    
}