// JavaScript Document
// E-Way JS Functions

var vpath="/ce/eway/";
var secureURL="https://www.eway.com/ce/eway/";
var imgDir = "/images/";
function check_and_save_header() {
if (parent.eway_header_flag) { 
	parent.main.f_save_order("GLOBALNAV");
}
}
function f_help_window () {
window2=open("/corp/ewaytutorial/tutor_start.html","helpwindow","height=500,width=750,scrollbars=yes,resizable=yes,toolbar=yes,location=no,menubar=no")
}
function appbull(title){
check_and_save_header();
if (title == "" || title == null) { 
	parent.main.location.href = vpath + "bulletin.b_view";
} else { 
	parent.main.location.href = vpath + "bulletin.b_view?title="+escape(title);
}
}
function order() {
check_and_save_header();
parent.main.location.href = vpath + "order_utility.p_view_current_order";
}
function search() {
check_and_save_header();
parent.main.location.href  = vpath + "ord_search.p_orders_search_results"
}
function order_approvals() {
check_and_save_header();
parent.main.location.href = vpath + "approvals.p_approvals";
}
function profile() {
check_and_save_header();
parent.main.location.href = vpath + "user_profile.p_personal_info";
}
function express() {
check_and_save_header();
parent.location.href = vpath + "shopping_list.p_sl_lists_search_results"
}
function support() {
check_and_save_header();
parent.main.location.href = vpath + "contact.p_mysupport"
}
function catalog() {
check_and_save_header();
parent.main.location.href = vpath + "eway_catalog.p_super_categories";
}
function logoff_standard() {
if (parent.corder.document.form_iway_current_order.order_count.value > 0) {
	if (parent.corder.document.form_iway_current_order.pl_order_modified_flag.value == "Y") {
				if (confirm("Your order has not been saved.  Click OK to save your order or Cancel to continue without saving.")) {
							parent.invisible.location.href  = vpath + "order_utility.p_copy_iway_order?update_current_ordr_flag=N&leaving_flag=Y&pl_save_alert=Y"
				} else { 
							parent.invisible.location.href  = vpath + "p_exit_eway"
				}
	} else {
				parent.invisible.location.href  = vpath + "p_exit_eway"
	}
} else { 
	parent.invisible.location.href  = vpath + "p_exit_eway"
}
}
function logoff_non_standard() {
parent.window.location = document.nav.exit_url.value;
}