﻿///<reference name="PanSoftware.WebClient.JS.TypeExtension.js" assembly="PanSoftware.WebClient"/>
if ($get('tblS2Main')) {
    $('body').height("100%");
    $('#tblS2Main').height('auto');
    $('#divS2LeftCol').height('100%');
    $('.pop_wrapper').height('100%');
    document.body.style.overflow = 'hidden';
    function initBodyHeight() {
        var h = $('body').height();
        if ((h - 157) < 0) return;
        if ((h - 88) < 0) return;
        $('#divS2ContentWrapper').height(h - 157);
        $('#divS2Content').height(h - 157);
        $('#divS2Body').height(h - 88);
    }
    initBodyHeight();
    $addHandler(window, 'resize', initBodyHeight);
    $(document).click(function(e) {
        CloseContactUs();
    });
}
var _divContactUs = null;
function ShowContactUs() {
    var w = $(document).width();
    var h = $(document).height();
    if ($PAN$PRODUCTNAME != 'eduSafe') {
        if (!_divContactUs) {
            var html = '<div id="divContactUs"><img id="imgCloseContact" onclick="CloseContactUs()" src="' + pan_close_url + '"/>';
            html += '<dl><dt><img class="pan_logo" src="' + pan_logo_url + '" alt="Pansoftware"/><h1>Contact us</h1></dt>';
            html += '<dd class="address"><addr>Level 1<br/>537 Malvern Road, Toorak<br/>Victoria, 3142</addr></dd>';
            html += '<dd><label>t:</label> +61 3 9823 1499</dd>';
            html += '<dd><label>f:</label> +61 3 9823 0137</dd>';
            html += '<dd><label>e:</label> support@pansoftware.com.au</dd>';
            html += '<dd><label>w:</label> www.pansoftware.com.au</dd>';
            html += '</dl></div>';
            _divContactUs = $(html).appendTo('#divS2Main');
        }
    }
    else {
        if (!_divContactUs) {
            var html = '<div id="divContactUs" style="background-color:#236ab4; background-image:none"><img id="imgCloseContact" onclick="CloseContactUs()" src="' + pan_close_url + '"/>';
            html += '<dl><dt><img class="pan_logo" src="' + doe_logo_url + '" alt="Pansoftware"/></dt>';
            html += '<dd><font color="White"><h3><b><label style=" margin-left:10px;">eduSafe Support:</label> 1300 074 715</b></h3></font></dd>';
//            html += '<dd class="address"><addr>Level 1<br/>537 Malvern Road, Toorak<br/>Victoria, 3142</addr></dd>';
//            html += '<dd><label>t:</label> +61 3 9823 1499</dd>';
//            html += '<dd><label>f:</label> +61 3 9823 0137</dd>';
//            html += '<dd><label>e:</label> support@pansoftware.com.au</dd>';
//            html += '<dd><label>w:</label> www.pansoftware.com.au</dd>';
            html += '</dl></div>';
            _divContactUs = $(html).appendTo('#divS2Main');
        }
    }
    _divContactUs.css({ top: (h / 2 - 100), left: (w / 2 - 250) });
    _divContactUs.show();
}
function CloseContactUs() {
    if (_divContactUs) _divContactUs.hide();
}

