/* Main navigation functions */
/* By Karl Kornel <kornel.1@osu.edu> */

/* IMMEDIATE CODE - Executes when the file is loaded */

/* The stuff to do immediately */
/* Set default status, disable toolbar, and display welcome message */
window.defaultStatus="Welcome to the BCD Group, Inc. web site!";

/* FUNCTION CODE - Executes when called */

/* transit: Performs the URL changes to move a person from source_id to link_id */
function transit(link_id, source_id) {

document.title = "BCD Group, Inc.: " + getTitle(link_id);
window.content.content.location.href = realLocation(getLocation(link_id));
window.content.navigation.location.href = 'http://www.bcdinternational.com/index-nav.php?source=' + source_id + '&dest=' + link_id + '#current_location';

}

/* This function take the navigation page to the history page */
function goHistory(lastPage) {

document.title = "BCD Group, Inc.";
var newWindow = 'http://www.bcdinternational.com/nav/history.php?lastPage=' + lastPage;
window.open(newWindow,"History","dependent=yes,directories=no,height=378,width=544,screenX=10,screenY=10,location=no,menubar=no,resizable=yes,scrollbars=yes,statusbar=yes,status=yes,titlebar=yes,toolbar=no");
window.content.content.location.href = 'http://www.bcdinternational.com/nav/history_pholder.html';
window.content.navigation.location.href = 'http://www.bcdinternational.com/nav/history_holder.html';

}

/* transit_nowhere: Goes nowhere, and says so */
function transit_nowhere() {

window.alert("Sorry, but the button you pushed does not take you anywhere.\nPlease try another button.");

}

/* realLocation: Finds the URL of the given location */
function realLocation(location) {
var data = new String(location);

if ( data.charAt(0) == '!' ) {
   return data.substr(1,data.length - 1);
} else {
   return 'http://www.bcdinternational.com' + location;
}
}
