//------------------------------------------------------------//
SpAction.printCpdRecords = function(){

   var url = "index.php?_spAction=loginStatusAjax" + "&ajaxRequest=1"  + "&showHTML=0";

   var formContent = 'xyz=1';
   XMLHTTP.xmlHttpObj = XMLHTTP.getXMLHTTPObject(function () {SpAction.getLoginStatusHandler(handlerFunction);});
   XMLHTTP.xmlHttpObj.open("POST", url, true);
   XMLHTTP.xmlHttpObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
   XMLHTTP.xmlHttpObj.send(formContent);
}



//**********************************************************************************
function changePageTextSize(size) {

   if (size == "Small"){
      setStyleByClass("TD","text", "fontSize", "11px");
      setStyleByClass("H1","heading", "fontSize", "14px");
      setStyleByTag("li", "fontSize", "11px", 1);
      setStyleByTag("p", "fontSize", "11px", 1);
      setStyleByTag("span", "fontSize", "11px", 1);
      setStyleByTag("font", "fontSize", "11px", 1);
   }

   if (size == "Normal"){
      setStyleByClass("TD","text", "fontSize", "13px");
      setStyleByClass("H1","heading", "fontSize", "16px");
      setStyleByTag("li", "fontSize", "13px", 1);
      setStyleByTag("p", "fontSize", "13px", 1);
      setStyleByTag("span", "fontSize", "13px", 1);
   }

   if (size == "Large"){
      setStyleByClass("TD","text", "fontSize", "15px");
      setStyleByClass("H1","heading", "fontSize", "17px");
      setStyleByTag("li", "fontSize", "15px", 1);
      setStyleByTag("p", "fontSize", "15px", 1);
      setStyleByTag("span", "fontSize", "15px", 1);
   }

   if (size == "Larger"){
      setStyleByClass("TD","text", "fontSize", "16px");
      setStyleByClass("H1","heading", "fontSize", "18px");
      setStyleByTag("li", "fontSize", "16px", 1);
      setStyleByTag("p", "fontSize", "16px", 1);
      setStyleByTag("span", "fontSize", "16px", 1);
   }

   setCookie("pilotStyleSize" , size , "1");
} 

//**********************************************************************************//
function refreshAntiSpamImg() {
   var captchaImgObj = document.getElementById("captchaImg");
   var imgUrl = "/cmspilotv29/www/include/lib_local/captcha_image.php";
   var date1 = new Date();
   captchaImgObj.src = imgUrl + "?rnd=" + date1;
   
}


//**********************************************************************************//

$(function() {
    //*** open all the .pdfs / images links in new window
    $("a[href$='.pdf'], a[href$='.jpg'], a[href$='.jpeg'], a[href$='.gif']")
    .attr('target', '_blank');

    //*** cart buttons
    $('a.removeAll').click(function(e) {
        e.preventDefault();
        window.location.href = 'index.php?_room=cart&_action=emptyCart&shopType=ecpdSignup';
    });
    $('a.backToSeminars').click(function(e) {
        e.preventDefault();
        //Forthcoming ECPD Seminars
        window.location.href = 'index.php?_room=9&_subRoom=41';
    });
    $('a.confirmRegistration').click(function(e) {
        e.preventDefault();
        window.location.href = 'index.php?_room=cart&_action=confirmOrder&shopType=ecpdSignup';
    });
});


