﻿function LoadFaqs(strURL, strID) {

    if (strURL != '') {
        LoadPageIntoDiv('../HTML/' + strURL, strID);
        LoadPageIntoDiv('../HTML/Faqs_Right.htm', 'div_ServicesBackupRight')
    }
    else {
        LoadPageIntoDiv('../HTML/Services_Backup_Left.htm', 'ctl00_cnt_Page_tab_Services_span_BackupLeft');
        LoadPageIntoDiv('../HTML/Services_Backup_Right.htm', 'ctl00_cnt_Page_tab_Services_span_BackupRight')
   
    }
    window.location.hash = 'Top';
 }

function LoadPageIntoDiv(strURL, strID) {
    var pageRequest = false;
    if (window.XMLHttpRequest)
    { pageRequest = new XMLHttpRequest(); }     //firefox
    else if (window.ActiveXObject) {    
        try
            { pageRequest = new ActiveXObject('Msxml2.XMLHTTP'); }  //ie
        catch (e) { }
    }
    else
    { return false; }

    pageRequest.onreadystatechange = function()
    { LoadPage(pageRequest, strID); }

    var intRand = Math.floor(Math.random() * 1000001);
    strURL += (strURL.indexOf("?") != -1) ? "&" + intRand : "?" + intRand;
    pageRequest.open('GET', strURL,  true)
    pageRequest.send(null)
}

function LoadPage(pageRequest, strID) {
    if (pageRequest.readyState == 4 && (pageRequest.status == 200 || window.location.href.indexOf("http") == -1))
    { document.getElementById(strID).innerHTML = pageRequest.responseText; }
    
}

