/*******************************
    This sets up the google
    conversion tracking for
    documents.
*******************************/


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(sitePath) {
    var googleActionPage = '/sites/googleAction.aspx?sitepath=' + sitePath;
    if (xmlhttp) {
        xmlhttp.open("HEAD", googleActionPage, true);
        xmlhttp.send(null);
    } else {
        //alert('no xhmlhttp');
    }
    window.open(sitePath);
}