// This will hide the Awakening return button on all screens except
//   those specified. It is put in the footer so the return button
//   can be set as a default panel in order to be visible on the 
//   "contact" page. 

var parm_string, parm_pairs, id_parm, id_name, id_value, return_link
var staff_page = "119430", cvi_page = "767879"
var awake_home = "715037", awake_about = "716104"
var show_return = false

if (location.search) {  // find the page id
    parm_string = location.search.substring(1)
    parm_pairs = parm_string.split("&")
    id_parm = parm_pairs[1].split("=")
    id_name = id_parm[0]
    id_value = id_parm[1]
    
    if (id_name == "PG") { // flag the contact and events pages
        if (id_value == "contact" || id_value == "events") {
            show_return = true
        }
    }
    else if (id_name == "PID") {  //flag selected pages
        if (id_value == staff_page || id_value == cvi_page) {
            show_return = true
        }
    }
    if (id_value == "contact" || id_value == staff_page) {
        return_link = awake_about
    }
    else {
        return_link = awake_home
    }
}

if (show_return) {
    document.write('<div style="text-align: center; "><a href="/templates/default.asp?id=26101&amp;PID=' + return_link + '"><img width="140" height="43" style="border-style:outset" alt="Awakening" title="Return to Awakening" src="/clientimages/26101/awakening/returnto/awakebutton.jpg" /></a></div>')
}