﻿/*******************************************
    Open window
*******************************************/

function winOpen(w,h,sc,rz,page) {
var win = window.open(page,"Win","width=" + w + ",height=" + h + ",scrollbars=" + sc + ",resizable=" + rz + "menubar=no,status=no");
    win.focus();
}

/*******************************************
    Conversion tracking
*******************************************/

var xmlhttp = false;

try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (error){
    try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (error) {
        xmlhttp = false;
    }
}

if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
        xmlhttp = new XMLHttpRequest();
    } catch (error) {
        xmlhttp = false;
    }
}
if (!xmlhttp && window.createRequest) {
    try {
        xmlhttp = window.createRequest();
    } catch (error) {
        xmlhttp = false;
    }
}

function openDoc(docPath) {
    var actionPage = '/trackconversion.aspx?docPath=' + docPath;
    if (xmlhttp) {
        xmlhttp.open("HEAD", actionPage, true);
        xmlhttp.send(null);
    } else {
        //alert('no xhmlhttp');
    }
    window.open(docPath);
}