/*
*/
var buttState = new Array();
js_mbv_ConfirmActions = 0;
showWarningPopup = 0;
error = 0;
delete_request = 0;
idd = -1;
attribution = 0;
deldeviceid = -1;
imgexpand = new Image();
imgexpand.src = '/images/menu/expand.png';
imgcollapse = new Image();
imgcollapse.src = '/images/menu/collapse.png';
imgarrowrightwhite = new Image();
imgarrowrightwhite.src = '/images/menu/arrowrightwhite.png';
imgarrowrightorange = new Image();
imgarrowrightorange.src = '/images/menu/arrowrightorange.png';
function SwitchMenu(id, sessionid)
{
if (id == 1)
GoPage('index.cgi?page=home&sessionid=' + sessionid);
else if (id == 2)
GoPage('index.cgi?page=game&sessionid=' + sessionid);
else if (id == 3)
GoPage('index.cgi?page=network&sessionid=' + sessionid);
else if (id == 4)
GoPage('index.cgi?page=firewall&sessionid=' + sessionid);
else if (id == 5)
GoPage('index.cgi?page=wifi&sessionid=' + sessionid);
else if (id == 6)
GoPage('index.cgi?page=do_device_disk&sessionid=' + sessionid);
else if (id == 7)
GoPage('index.cgi?page=admin&sessionid=' + sessionid);
else if (id == 8)
GoPage('index.cgi?page=assistance&sessionid=' + sessionid);
else if (id == 9)
GoPage('index.cgi?page=reinitiate&sessionid=' + sessionid);
else if (id == 10)
GoPage('index.cgi?page=dns&sessionid=' + sessionid);
else if (id == 11)
GoPage('index.cgi?page=dhcp&sessionid=' + sessionid);
else if (id == 12)
GoPage('index.cgi?page=natpat&sessionid=' + sessionid);
else if (id == 13)
GoPage('index.cgi?page=dmz&sessionid=' + sessionid);
else if (id == 14)
GoPage('index.cgi?page=upnp&sessionid=' + sessionid);
else if (id == 15)
GoPage('index.cgi?page=wifi&sessionid=' + sessionid);
else if (id == 16)
GoPage('index.cgi?page=wifi&sessionid=' + sessionid);
else if (id == 17)
GoPage('index.cgi?page=tr69&sessionid=' + sessionid);
else if (id == 18)
GoPage('index.cgi?page=sip_general&sessionid=' + sessionid);
else if (id == 19)
GoPage('index.cgi?page=sip_advanced&sessionid=' + sessionid);
else if (id == 20)
GoPage('index.cgi?page=sip_line0&sessionid=' + sessionid);
else if (id == 21)
GoPage('index.cgi?page=sip_line1&sessionid=' + sessionid);
else if (id == 22)
GoPage('index.cgi?page=sip_call_history&sessionid=' + sessionid);
}
function OpenHelp(help, sessionid)
{
var x = 590;
var y = 650;
var px = screen.width - x - 10;
var py = (screen.height - y) / 2;
if (document.all || document.getElementById)
options = "scrollbars=yes, resizable=yes, width="+x+", height="+y+", left="+px+", top="+py;
if (document.layers)
options = 'scrollbars=yes,resizable=yes,outerWidth='+x+',outerHeight='+y+',screenX='+px+',screenY='+py;
window.open('index.cgi?page=help&help=' + help + '&sessionid=' + sessionid, 'HelpEmbedded', options);
}
function ButtonGoPage(buttName, url)
{
if (buttState[buttName] == 0)
return;
GoPage(url);
}
function GoPage(url)
{
//alert("Enter to GoPage(" +url +")");
if ((js_mbv_ConfirmActions==1) && (showWarningPopup) && (document.getElementById('modal') != null) && (window.parent.LB_popup)) {
popupContent1 = "";
popupContent1 += js_esp_ConfirmDialogText;
popupContent1 += "";
window.parent.LB_popup(window.parent.document.getElementById ("GUI_master"),
js_esp_ConfirmDialogTitle,
300, 200,
popupContent1,
function() { GoPageConfirm(url); },
function() { GoPageUnConfirm(url); },
js_esp_ConfirmDialogYes,js_esp_ConfirmDialogNo);
}
else
GoPageConfirm(url);
}
function ErrorSubmit(url)
{
//alert("Enter to GoPage(" +url +")");
if ((js_mbv_ConfirmActions==1) && (showWarningPopup) && (document.getElementById('modal') != null) && (window.parent.LB_popup)) {
popupContent1 = "";
popupContent1 += js_esp_ConfirmDialogText;
popupContent1 += "";
window.parent.LB_popup(window.parent.document.getElementById ("GUI_master"),
js_esp_ConfirmDialogTitle,
300, 200,
popupContent1,
function() { Exit(); },
function() { Exit(url); },
js_esp_ConfirmDialogYes,js_esp_ConfirmDialogNo);
}
else
GoPageConfirm(url);
}
function Exit()
{
if (window.parent.LB_popup) {
window.parent.LB_hidePopup();
}
}
function ButtonGoPageConfirm(buttName, url)
{
if (buttState[buttName] == 0)
return;
GoPageConfirm(url);
}
function GoPageConfirm(url)
{
document.location.href = url;
}
function GoPageUnConfirm(url)
{
if (window.parent.LB_popup) {
window.parent.LB_hidePopup();
}
FTDialogDisplayed=false;
doingAConfirmedCancel = false;
confirmedOK = false;
}
function ShowObject(liste)
{
var i;
var obj;
for (i=0; i 0)
minutes = "0" + minutes;
if( parseInt(hours) >0 ) {
if(document.all)
document.all["PTS"].innerText = hours + " hr " + minutes + " mn " + seconds + " s";
//else
// document.getElementById("PTS").innerHTML = hours + " hr " + minutes + " mn " + seconds + " s";
}
else {
if(document.all)
document.all["PTS"].innerText = minutes + " mn " + seconds + " s";
//else
// document.getElementById("PTS").innerHTML = minutes + " mn "+ seconds + " s";
}
}
function startPPPTimer() {
Update_time_left();
ID = window.setInterval("Update_time_left();" ,1000);
}
function resetObjectSelect(obj) {
var i;
var len;
if (obj) {
len = obj.length;
for(i=0; i