1function load_default(step)
2{
3    if (parent.stepframe != null)
4        parent.stepframe.load_default(step);
5}
6
7function reset_init_scale()
8{
9    var viewport;
10    viewport = parent.document.getElementById("viewport");
11    if (viewport)
12        viewport.content = "initial-scale=1.0"
13}
14
15function get_browser()
16{
17        if(navigator.userAgent.indexOf("MSIE") != -1)
18                return "IE";
19        else if(navigator.userAgent.indexOf("Firefox") != -1)
20                return "Firefox";
21        else if(navigator.userAgent.indexOf("Chrome") != -1 )
22                return "Chrome";
23        else if(navigator.userAgent.indexOf("Safari") != -1 )
24                return "Safari";
25        else if(navigator.userAgent.indexOf("Camino") != -1)
26                return "Camino";
27        else if(navigator.userAgent.indexOf("Gecko/") != -1)
28                return "Gecko";
29        else if(navigator.userAgent.indexOf("Trident") != -1)
30                return "IE";
31        else
32                return "";
33}
34
35function CloseWindow()
36{
37    var ca_close_window="<%4137%>"
38    if(get_browser() != "Firefox"){
39        if (confirm(ca_close_window)){
40            top.window.opener = null;
41            top.window.open('','_self','');
42            top.window.close();
43        }
44    }
45}
46
47function addfavorite()
48{
49   if (document.all)
50   {
51      window.external.addFavorite('http://www.mywifiext.net','<%12%> Configuration');
52   }
53   else if (window.sidebar)
54   {
55      window.sidebar.addPanel('<%12%> Configuration', 'http://www.mywifiext.net', "");
56   }
57}
58
59function msg_close()
60{
61    var ca_add_bookmark="<%4138%>";
62
63    if( get_browser() == "IE" || get_browser() == "Firefox")
64    {
65        if (confirm(ca_add_bookmark))
66            addfavorite();
67    }
68    /*if( get_browser() == "Firefox")
69        alert(ca_finish);
70    else
71        CloseWindow();*/
72}
73function pc_or_mobile(){
74    var agent = navigator.userAgent.toLowerCase();
75    if (agent.match(/iphone/i) || agent.match(/ipod/i)){
76        if (document.cookie.indexOf("iphone_redirect = false") == -1)
77            return 1;
78    }
79    else if (agent.match(/ipad/i)){
80        return 0;
81    }
82    else if ((agent.match(/android/i) && agent.match(/mobile/i)) ||(agent.match(/android/i) && agent.match(/mozilla/i)) || (agent.match(/android/i)&& agent.match(/opera/i))){
83        return 1;
84    }
85    else if (agent.match(/webos/i) || agent.match(/windows phone/i) || agent.match(/mqqbrowser/i)){
86        return 1;
87    }
88    else if (agent.match(/ucweb/i) || agent.match(/ucbrowser/i)){
89        return 1;
90    }
91    else if ((agent.match(/windows nt/i)) || (agent.match(/macintosh/i))){
92        return 0;
93    }
94    else if (!!agent.match(/applewebkit.*mobile.*/)){
95       return 1;
96    }
97    else
98       return 0;
99}
100
101