﻿
function ShowElement(classname) {
    $(classname).css("display", "block");
}

function HideElement(classname) {
    $(classname).css("display", "none");
}

function ShowCallBackForm() {
    ShowElement('.opaqueBackground'); 
    ShowElement('.callbackFormOverlay');
}

function HideCallBackForm() {
    HideElement('.opaqueBackground');
    HideElement('.callbackFormOverlay');
}


function ShowWeAreHiringForm() {
    ShowElement('.opaqueBackground');
    ShowElement('.weAreHiringFormOverlay');
}

function HideWeAreHiringForm() {
    HideElement('.opaqueBackground');
    HideElement('.weAreHiringFormOverlay');
    var ThankYouPanel = document.getElementById('ThankYouPanel');
    if (ThankYouPanel == null) {
    } else {
        ThankYouPanel.style.display = "none";
    } 
}


function ShowLargeMap() {
    ShowElement('.opaqueBackground');
    ShowElement('.largeMap');
    initializeMap();
}

function HideLargeMap() {
    HideElement('.opaqueBackground');
    HideElement('.largeMap');
}

function HideContactForm() {
    HideElement('.opaqueBackground');
    HideElement('.contactFormOverlay');
}

function ShowContactForm() {
    ShowElement('.opaqueBackground');
    ShowElement('.contactFormOverlay');
}

function IncludeJavaScript(jsFile) {
    document.write('<script type="text/javascript" src="' + jsFile + '"></script>');
}

function LoadJsFile(filename) {
    var fileref = document.createElement('script')
        fileref.setAttribute("type", "text/javascript")
        fileref.setAttribute("src", filename)
    
        document.getElementsByTagName("head")[0].appendChild(fileref)
}
