﻿// Hides the parent div of the element this function is called from and reveals that div's next sibling
function glbswapDisplay(el) {
    var hideMe = el.parentNode;
    var showMe = glbgetNextSibling(hideMe, "DIV");
    hideMe.style.display = "none";
    //alert(showMe)
    showMe.style.display = "block";
}


// Call this function from the onclick event of any link/element we wish to track
function glbclickConvert1() {
    CQtracker.set_CLEQ_transtype('3');
    CQtracker.set_CLEQ_transid(new Date().getTime() + '-' + Math.floor(Math.random() * 9876543));
    CQtracker.set_CLEQ_total('0');
    CQtracker.log_CLEQ_conversion();
} 

    
function glbcheckNode(node, filter){
         var trueVal = (node.nodeName.toUpperCase() == filter.toUpperCase());
         return trueVal;
     //return (filter == null || node.nodeType == Node[filter] || node.nodeName.toUpperCase() == filter.toUpperCase());
}
    
function glbgetNextSibling(node, filter){
    for(var sibling = node.nextSibling; sibling != null; sibling = sibling.nextSibling){
        if(glbcheckNode(sibling, filter))
        {
          return sibling;
        }
    }
    return null;
}

