﻿//function BrowserDetails() {
//Description : Will record the screenheight and width of the client, then run an ajax function to send to database
//DoAjax("AjaxBrowserDetails.aspx?", "WhatToDo=BrowserDetails&Height=" + screen.height + "&Width=" + screen.width, null, null, null, null, null, null, null);
//}

function BrowserDetails() {
    //Description : Will record the screenheight and width of the client, then run an ajax function to send to database

    var LandingPage = "";

    // if (document.getElementById("txtLandingPage") != undefined) {

    // LandingPage = document.getElementById("txtLandingPage").value;
    //}

    LandingPage = location.href;

    DoAjax("AjaxBrowserDetails.aspx?", "WhatToDo=BrowserDetails&Height=" + screen.height + "&Width=" + screen.width + "&LandingPage=" + LandingPage, null, null, null, null, null, null, null);
}

function Open_Email_Form() {

    var Specs = 'location=no,menubar=no,resizeable=noscrollbars=no,status=no,toolbar=no,titlebar=no';

    OpenWin('Email_Form.aspx', 'Email_Form', Specs, '535', '210');


}

function OpenWin(url, name,Specs, Width, Height) {
    var appName = navigator.appName;
    var ie = (appName.indexOf('Microsoft Internet Explorer') != -1);
    var ff = (appName.indexOf('Netscape') != -1);

    var w = parseInt(Width);
    var h = parseInt(Height);

    w += 32;
    h += 96;
    wleft = (screen.width - w) / 2;
    wtop = (screen.height - h) / 2;
    // IE5 and other old browsers might allow a window that is
    // partially offscreen or wider than the screen. Fix that.
    // (Newer browsers fix this for us, but let's be thorough.)
    if (wleft < 0) {
        w = screen.width;
        wleft = 0;
    }
    if (wtop < 0) {
        h = screen.height;
        wtop = 0;
    }
    var win = window.open(url,
    name,
    'width=' + w + ', height=' + h + ', ' +
    'left=' + wleft + ', top=' + wtop + ', ' +
        Specs);
    // Just in case width and height are ignored
    //win.resizeTo(w, h);
    // Just in case left and top are ignored
    //win.moveTo(wleft, wtop);
    //win.focus();
    //window.open('', '_self', '');
    //window.close();
}

