// Define start time and end time of system downtime.
// Syntax: my_time=new Date(year_(yyyy), month_(0-11), day_(1-31), hr_(0-23), min_(0-59), sec_(0-59) );

// Get Current System Date Time
var v_curr_datetime=get_current_datetime();

// Define Down Time of NOC
var v_noc_downtime_start=new Date(2008,11,30,  6,0,0);
var v_noc_downtime_end  =new Date(2008,11,30,  6,0,0);

// Define Down Time of NOC's "Forget Password" button and "Activate Membership/Registration" button
var v_noc_button_downtime_start=new Date(2008,11,30,  6,0,0);
var v_noc_button_downtime_end  =new Date(2008,11,30,  6,0,0);

// Define Down Time of NOP
var v_nop_downtime_start=new Date(2008,11,30,  4,0,0);
var v_nop_downtime_end  =new Date(2008,11,30,  6,0,0);

// Define Down Time of eBill
var v_ebill_downtime_start=new Date(2011,10,22,  1,00,0);
var v_ebill_downtime_end  =new Date(2011,10,22,  6,00,0);

// Define Down Time of linetest
var v_linetest_downtime_start=new Date(2011,10,22,  1,0,0);
var v_linetest_downtime_end  =new Date(2011,10,22,  6,0,0);


// Define Down Time of 1081 or 1083
var v_1081_downtime_start=new Date(2011,10,22, 1,0,0);
var v_1081_downtime_end  =new Date(2011,10,22, 6,0,0);


// Maintenance Message shown in Maintenance Page (Don't change these messages)
var v_default_msg_e = "The service is currently undergoing maintenance and will resume shortly.<br>We apologize for any inconvenience caused.";
var v_default_msg_c = "由於正在進行系統更新工程，服務將於稍後回復正常。<br>對於任何不便，我們謹此致歉。";

var v_default_noc_msg_e = "The No.1 Club Website is currently undergoing maintenance. The service will resume shortly.<br>We apologize for any inconvenience.";
var v_default_noc_msg_c = "尊尚會網站現正在更新中，服務將於稍後回復正常。對於任何不便，我們謹此致歉。";

// Modifiable Maintenance Message (if not blank, them will be used to overwrite define messages)
var v_special_msg_e = ""; 
var v_special_msg_c = ""; 

var v_special_noc_msg_e = ""; 
var v_special_noc_msg_c = ""; 

// Comment the following special messages if not required !!
//v_special_msg_e = "The service is currently undergoing maintenance and <br>target to resume after 6pm on 6 May 2007.<br>We apologize for any inconvenience caused.";
//v_special_msg_c = "正在進行系統更新工程，預算於2007年5月6日下午6時後回復正常。<br>對於任何不便，我們謹此致歉。";

// Basic Functions ------------------------------------------------------------------------------------------------------
function is_noc_down() { 
	return (v_noc_downtime_start <= v_curr_datetime && v_curr_datetime <= v_noc_downtime_end)? true: false;
}

function is_noc_button_down() { 
	return (v_noc_button_downtime_start <= v_curr_datetime && v_curr_datetime <= v_noc_button_downtime_end)? true: false;
}

function is_nop_down() { 
	return (v_nop_downtime_start <= v_curr_datetime && v_curr_datetime <= v_nop_downtime_end)? true: false;
}

function is_ebill_down() { 
	return (v_ebill_downtime_start <= v_curr_datetime && v_curr_datetime <= v_ebill_downtime_end)? true: false;
}

function is_linetest_down() { 
	return (v_linetest_downtime_start <= v_curr_datetime && v_curr_datetime <= v_linetest_downtime_end)? true: false;
}

function is_1081_down() { 
	return (v_1081_downtime_start <= v_curr_datetime && v_curr_datetime <= v_1081_downtime_end)? true: false;
}

function get_msg_e() {
	return (v_special_msg_e !=null && v_special_msg_e != "")? v_special_msg_e: v_default_msg_e;
}
function get_msg_c() {
	return (v_special_msg_c !=null && v_special_msg_c != "")? v_special_msg_c: v_default_msg_c;
}

function get_noc_msg_e() {
	return (v_special_noc_msg_e !=null && v_special_noc_msg_e != "")? v_special_noc_msg_e: v_default_noc_msg_e;
}
function get_noc_msg_c() {
	return (v_special_noc_msg_c !=null && v_special_noc_msg_c != "")? v_special_noc_msg_c: v_default_noc_msg_c;
}

