Okej.. Men här kommer lite js isf.
Kod:
SWF0=0;SWF1=1;SWF2=2;SWF3=3;SWF4=4;SWF5=5;SWF6=6;SWF7=7;SWF8=8;SWF9=9;SWF10=10;SWF11=11;SWF12=12;SWF 13=13;
SWMDEF=0;SWMVPN=1;
SWIP0="0.0.0.0";DPASS="***************";
var menuItems = new Array(new Array(1, 'Welcome', 'Home.html'), new Array(0, 'Control_Panel', 'Control.html'),
new Array(1, 'Reports', 'frame.html?0'), new Array(1 , 'Security', 'frame.html?1'), new Array( 1 , 'Services', 'frame.html?2'), new Array( 1 , 'Setup', 'frame.html?3'), new Array(0, 'VPN', 'frame.html?4'),
new Array(1, 'Help', 'menuOpenHelp'), new Array(showPass(), 'Logout', 'doLogout'));
var menuAdvItems = new Array(new Array(1, 'Internet', 'Network.html'), new Array(1, 'My_Network', 'Network_Int.html'), new Array(1, 'Firmware', 'Firmware.html'), new Array((showPass()), 'Password', 'Profile.html'));
var menuMngdItems = new Array(new Array(0, 'Parental_Control', 'Management_ufp.html'), new Array(0, 'Mail_Anti_Virus', 'Management_mail.html'), new Array(1, 'Management', 'Management.html'));
var menuSecItems = new Array(new Array(1, 'Firewall', 'Security_fw.html'), new Array(1, 'Servers', 'Security_Standard.html'), new Array(1, 'Allow', 'Security_accept.html'), new Array(1, 'Block', 'Security_block.html'), new Array(1, 'DMZ', 'Security_DMZ.html'));
var menuStsItems = new Array(new Array(1, 'Event_Log', 'Logs.html'), new Array(1, 'Active_Computers', 'Comptab.html'), new Array(1, 'Active_Connections', 'Conntab.html'), new Array(0, 'VPN_Tunnels', 'VPNTunnels.html'));
var menuVPNItems = new Array(new Array(0, 'VPN_Sites', 'VPN.html'), new Array(0, 'VPN_Login', 'vpnlogin.html'));
var fwnames = new Array('High','Med','Low');
var fwhelps = new Array('<b>High security</b><br>Optimizes security by strict<br>control on all traffic','<b>Medium security</b><br>Provides a level of security <br>suitable for everyday traffic flow','<b>Low security</b><br>Provides minimal level of security');
var ufpnames = new Array('On', 'Off');
var ufphelps = new Array('<b>Parental Control on</b><br>Objectionable sites are<br>being blocked', '<b>Parental Control off</b><br>No restriction applied<br>to Web browsing');
var mailnames = new Array('On', 'Off');
var mailhelps = new Array('<b>Mail Anti Virus on</b><br>All mail will be scanned', '<b>Mail Anti Virus off</b><br>No restriction on mail');
var masks=new Array('0.0.0.0','255.255.255.255','255.255.255.254','255.255.255.252','255.255.255.248','255.255.255 .240','255.255.255.224','255.255.255.192','255.255.255.128',
'255.255.255.0','255.255.254.0','255.255.252.0','255.255.248.0','255.255.240.0','255.255.224.0','255 .255.192.0','255.255.128.0',
'255.255.0.0','255.254.0.0','255.252.0.0','255.248.0.0','255.240.0.0','255.224.0.0','255.192.0.0','2 55.128.0.0',
'255.0.0.0','254.0.0.0','252.0.0.0','248.0.0.0','240.0.0.0','224.0.0.0','192.0.0.0','128.0.0.0'), mstr='';
ufpcats=new Array("Gambling","Adult/Sexually Explicit","Criminal Skills","Hate Speech", "Violence","Drugs & Alcohol","Unknown Sites");
ufpcatvs=new Array(3, 12, 13, 14, 15, 21, 32);
function sw_mode() { // mode of the pages according to domain
if ( top.location.host == "my.vpn" )
return SWMVPN;
return SWMDEF;
}
// Init the form tosend.
function sw_swapi_init(timer, rfmsg,logoutf){
if ( is.ie && navigator.onLine == false )
DW('<span class=Warnings>Your browser is set to off-line mode. Please set it to on-line mode.</span><br>');
if ( timer != 0 && showPass() )
DW('<script>setTimeout("document.sw.submit();", 600000);</script>');
if ( (timer != 0 && showPass()) || logoutf == 1 )
DW('<form name=sw method=POST action="/12" target="_top"><input type=hidden name=swcaller value="index.html"></form>' );
}
function doSubmit(frm, caller, act, target) {
frm.target = (target)?target:'';
frm.action = (act)?act:caller;
frm.swcaller.value = caller;
frm.submit();
}
var swillegal = new Array("", "input empty.", "input must be 5-25 characters.", "Only letters or numbers are valid.", "Second password does not match first.", "New password must be different than current password.", "Hint and answer must be different from each other and from password.");
for (var k=1;k<4;k++)
swillegal[k+6] = "Current password: " + swillegal[k];
/**
* Function to test validity of a password string
* 0 - All ok. 1 - Empty pass. 2 - Bad length. 3 - Non-alphanumeric found.
*/
function sw_check_legal_word(word) {
if ( word == "" )
return 1;
if ( word.length < 5 || word.length > 25 )
return 2;
// check for non alpha numeric ...
for (var i = 0; i < word.length;i++ ) {
ch = word.charAt(i);
if ( !( ( '0' <= ch && ch <= '9' ) || ( 'A' <= ch && ch <= 'Z' ) || ( 'a' <= ch && ch <= 'z' ) ) )
return 3;
}
return 0;
}
function sw_check_hint_answer(hint, answer) {
if ( (rc = sw_check_legal_word(hint)) != 0 ) return rc;
if ( (rc = sw_check_legal_word(answer)) != 0 ) return rc;
if ( hint == answer ) return 6;
return 0;
}
Blev lite långt så jag fick lov att ta bort lite... hoppas det räcker iaf