
<!--
*********************************************************
*   Copyright 2003, CyberTAN  Inc.  All Rights Reserved *
*********************************************************

This is UNPUBLISHED PROPRIETARY SOURCE CODE of CyberTAN Inc.
the contents of this file may not be disclosed to third parties,
copied or duplicated in any form without the prior written
permission of CyberTAN Inc.

This software should be used as a reference only, and it not
intended for production use!


THIS SOFTWARE IS OFFERED "AS IS", AND CYBERTAN GRANTS NO WARRANTIES OF ANY
KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE.  CYBERTAN
SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE
-->

<HTML><HEAD><TITLE><% nvram_get("router_name"); %> - Firmware Upgrade</TITLE>
<% no_cache(); %>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="style.css">
<style fprolloverstyle>
A:hover {color: #00FFFF}
.small A:hover {color: #00FFFF}
</style>
<script src="common.js"></script>
<SCRIPT language=javascript>
var showchar = '|';
var maxchars = 60;
var delay_time = 1000;
var counter=0;
var num=0;
function progress(){
	var F = document.forms[0];
	if(num == 4){
		clearTimeout(timerID);
		alert("Upgrade failed!");
		return false;
	}
	if (counter < maxchars)	{
		counter++;
		var tmp = '';
		for (var i=0; i < counter; i++)
			tmp = tmp + showchar;
		F.process.value = tmp;
		timerID = setTimeout('progress()',delay_time);
	}
	else{
		counter = 0;
		num ++;
		progress();	
        }
}

function stop(){
	if(ie4)
  		document.all['style0'].style.visibility = 'hidden';
}

function upgrade(F){
	var len = F.file.value.length;
	var ext = new Array('.','b','i','n');
	var ext2 = new Array('.','t','r','x');
	if (F.file.value == '')	{
		alert('Please select a file to upgrade !');
		return false;
	}
	var IMAGE = F.file.value.toLowerCase();
	for (i=0; i < 4; i++)	{
	
		if (ext[i] != IMAGE.charAt(len-4+i)){
		if (ext2[i] != IMAGE.charAt(len-4+i)){
			    alert('Incorrect image file!');
			    return false;
			}
		}
	}

	if(ns4)
		delay_time = 1500;
   		
	choose_disable(F.Upgrade_b);

	F.submit_button.value = "Upgrade";
   	F.submit();
   	//document.onstop = stop;
   	progress();
}
</script>
</HEAD>
<BODY>
<DIV align=center>
<FORM name="firmware" method=post action=upgrade.cgi encType=multipart/form-data>
<input type=hidden name=submit_button>
<input type=hidden name=change_action>
<input type=hidden name=action>

<TABLE cellSpacing=0 cellPadding=0 width=809 border=0>
  <TBODY>
  <TR>
    <TD width=95><IMG src="image/UI_Linksys.gif" 
      border=0 width="165" height="57"></TD>
    <TD vAlign=bottom align=right width=714 bgColor=#6666cc><FONT  
      style="FONT-SIZE: 7pt"><FONT face=Arial><font color=#AAAAAA><br>Firmware version:&nbsp;</font><FONT Color=#FFFFFF><% get_firmware_version(); %>&nbsp;&nbsp;&nbsp;</font></FONT></TD></TR>
  <TR>
    <TD width=808 bgColor=#6666cc colSpan=2><IMG height=11 
      src="image/UI_10.gif" width=809 border=0></TD></TR></TBODY></TABLE>
<TABLE height=77 cellSpacing=0 cellPadding=0 width=809 bgColor=black border=0>
  <TBODY>
  <TR>
    <TD 
    style="FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-VARIANT: normal" 
    borderColor=#000000 align=middle width=163 height=49>
      <H3 style="MARGIN-TOP: 1px; MARGIN-BOTTOM: 1px"><FONT 
      style="FONT-SIZE: 15pt" face=Arial 
    color=#ffffff>Administration</FONT></H3></TD>
    <TD 
    style="FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-VARIANT: normal" 
    vAlign=center borderColor=#000000 width=646 bgColor=#000000 height=49>
      <TABLE 
      style="FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif; BORDER-COLLAPSE: collapse; FONT-VARIANT: normal" 
      height=33 cellSpacing=0 cellPadding=0 bgColor=#6666cc border=0>
        <TBODY>
        <TR>
          <TD style="FONT-WEIGHT: bolder; FONT-SIZE: 10pt" align=right 
          bgColor=#6666cc height=33><FONT color=#ffffff><span >
          Wireless-G Broadband</span> Router&nbsp;&nbsp;</FONT></TD>
          <TD borderColor=#000000 borderColorLight=#000000 align=middle 
          width=109 bgColor=#000000 borderColorDark=#000000 height=12 
            rowSpan=2><FONT color=#ffffff><SPAN 
            style="FONT-SIZE: 8pt"><B><% nvram_get("router_name"); %></B></SPAN></FONT></TD></TR>
        <TR>
          <TD 
          style="FONT-WEIGHT: normal; FONT-SIZE: 1pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-VARIANT: normal" 
          width=537 bgColor=#000000 height=1>&nbsp;</TD></TR>
        <TR>
          <TD width=646 bgColor=#000000 colSpan=2 height=32>
            <TABLE id=AutoNumber1 
            style="FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif; BORDER-COLLAPSE: collapse; FONT-VARIANT: normal" 
            height=6 cellSpacing=0 cellPadding=0 width=637 border=0>
              <TBODY>
              <TR 
              style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; FONT-WEIGHT: normal; FONT-SIZE: 1pt; BORDER-LEFT: medium none; COLOR: black; BORDER-BOTTOM: medium none; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-VARIANT: normal"
              align=middle bgColor=#6666cc>
                <TD width=83 height=1><IMG height=10 
                  src="image/UI_06.gif" width=83 border=0></TD>
                <TD width=73 height=1><IMG height=10 
                  src="image/UI_06.gif" width=83 border=0></TD>
                <TD width=113 height=1><IMG height=10 
                  src="image/UI_06.gif" width=83 border=0></TD>
                <TD width=103 height=1><IMG height=10 
                  src="image/UI_06.gif" width=103 border=0></TD>
                <TD width=85 height=1><IMG height=10 
                  src="image/UI_06.gif" width=100 border=0></TD>
                <TD width=115 height=1><IMG height=10 
                  src="image/UI_07.gif" width=115 border=0></TD>
                <TD width=74 height=1><IMG height=10 
                  src="image/UI_06.gif" width=79 border=0></TD></TR>
              <TR>
                <TD align=middle bgColor=#000000 height=20><FONT 
                  style="FONT-WEIGHT: 700" color=#ffffff><A 
                  style="TEXT-DECORATION: none" 
                  href="index.asp">Setup</A></FONT></TD>
                <TD align=middle bgColor=#000000 height=20><FONT 
                  style="FONT-WEIGHT: 700" color=#ffffff>
                <a style="TEXT-DECORATION: none" href="Wireless_Basic.asp">Wireless</a></FONT></TD>
                <TD align=middle bgColor=#000000 height=20><FONT 
                  style="FONT-WEIGHT: 700" color=#ffffff>
                <a style="TEXT-DECORATION: none" href="Firewall.asp">Security</a></FONT></TD>
                <TD align=middle bgColor=#000000 height=20><FONT 
                  style="FONT-WEIGHT: 700" color=#ffffff>
                <a style="TEXT-DECORATION: none" href="<% support_elsematch("PARENTAL_CONTROL_SUPPORT", "1", "Parental_Control.asp", "Filters.asp"); %>">Access Restrictions</a></FONT></TD>
                <TD align=middle bgColor=#000000 height=20>
                  <P style="MARGIN-BOTTOM: 4px"><FONT style="FONT-WEIGHT: 700" 
                  color=#ffffff>
                  <a style="TEXT-DECORATION: none" href="Forward.asp">Applications 
                  <BR>&amp; Gaming</a>&nbsp;&nbsp;&nbsp;&nbsp;</FONT></P></TD>
                <TD align=middle bgColor=#6666cc height=20>
                  <P style="MARGIN-BOTTOM: 4px"><FONT style="FONT-WEIGHT: 700" 
                  color=#ffffff>Administration&nbsp;&nbsp;&nbsp;&nbsp;</FONT></P></TD>
                <TD align=middle bgColor=#000000 height=20>
                  <P style="MARGIN-BOTTOM: 4px"><FONT style="FONT-WEIGHT: 700" 
                  color=#ffffff>
                  <a style="TEXT-DECORATION: none" href="Status_Router.asp">Status</a>&nbsp;&nbsp;&nbsp;&nbsp;</FONT></P></TD>
              </TR>
              <TR>
                <TD width=643 bgColor=#6666cc colSpan=7 height=21>
                  <TABLE borderColor=black height=21 cellSpacing=0 cellPadding=0 width=643>
                    <TBODY>
                     <TR align=left>
                      <TD width=25></TD>
                      <TD class=small width=80><A href="Management.asp">Management</A></TD>
                      <TD width=1>
                        <P class=bar><font color='white'><b>|</b></font></P></TD>
                      <TD width=20></TD>
                      <TD class=small width=40><A href="Log.asp">Log</A></TD>
                      <TD width=1>
                        <P class=bar><font color='white'><b>|</b></font></P></TD>
                      <TD width=15></TD>
                      <TD class=small width=75><A href="Diagnostics.asp">Diagnostics</A></TD>
                      <TD width=1>
                        <P class=bar><font color='white'><b>|</b></font></P></TD>
                      <TD width=15></TD>
                      <TD class=small width=95><A href="Factory_Defaults.asp">Factory Defaults</A></TD>
                      <TD width=1>
                        <P class=bar><font color='white'><b>|</b></font></P></TD>
                      <TD width=15></TD>
                      <TD width=105><FONT style="COLOR: white">Firmware Upgrade</FONT></TD>
		      <TD width=1><P class=bar><font color='white'><b>|</b></font></P></TD>
                      <TD width=15></TD>
                      <TD class=small><A href='config.asp'>Backup</A></TD>
                    </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE height=5 cellSpacing=0 cellPadding=0 width=809 bgColor=black border=0>
  <TBODY>
  <TR bgColor=black>
    <TD 
    style="FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-VARIANT: normal" 
    borderColor=#e7e7e7 width=163 bgColor=#e7e7e7 height=1><IMG height=15 
      src="image/UI_03.gif" width=163 border=0></TD>
    <TD 
    style="FONT-WEIGHT: normal; FONT-SIZE: 10pt; COLOR: black; FONT-STYLE: normal; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-VARIANT: normal" 
    width=646 height=1><IMG height=15 src="image/UI_02.gif" width=646 
      border=0></TD></TR></TBODY></TABLE>
<TABLE height=23 cellSpacing=0 cellPadding=0 width=809 border=0>
  <TBODY>
  <TR>
    <TD width=633>
      <TABLE cellSpacing=0 cellPadding=0 border=0>
        <TBODY>
        <TR>
          <TD align=right width=156 bgColor=#000000 colSpan=3 
            height=25><B><FONT style="FONT-SIZE: 9pt" face=Arial 
            color=#ffffff>Upgrade Firmware</FONT></B></TD>
          <TD width=8 bgColor=#000000 height=25>&nbsp;</TD>
          <TD width=13 colSpan=3 height=25>&nbsp;</TD>
          <TD width=432 colSpan=2 height=25>&nbsp;</TD>
          <TD width=10 height=25>&nbsp;</TD>
          <TD width=15 background=image/UI_05.gif height=25>&nbsp;</TD></TR>
        <TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD width=13 colSpan=3 height=25>&nbsp;</TD>
          <TD width=402 colSpan=2 height=25>
          <p align="center"><FONT face=Arial
                  color=#0000ff size=4><B>Firmware Upgrade</B></FONT></TD>
          <TD width=5 height=25>&nbsp;</TD>
          <TD width=15 background=image/UI_05.gif
        height=25>&nbsp;</TD></TR>
	<TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD colSpan=3 height=25>&nbsp;</TD>
          <TD align=left height=25 width=65>&nbsp;<TD align=left height=25>&nbsp;</TD>
          <TD height=25>&nbsp;</TD>
          <TD width=15 background=image/UI_05.gif height=25>&nbsp;</TD>
        </TR>
        <TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD colSpan=3 height=25>&nbsp;</TD>
          <TD align=left height=25 width=65>&nbsp;<TD align=left height=25>Reset after flashing to:</TD>
          <TD height=25>&nbsp;</TD>
          <TD width=15 background=image/UI_05.gif height=25>&nbsp;</TD>
        </TR>
        <TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD colSpan=3 height=25>&nbsp;</TD>
          <TD align=left height=25 width=65>&nbsp;<TD align=left height=25><INPUT type=radio value="0" name=erase checked>No reset</TD>
          <TD height=25>&nbsp;</TD>
          <TD width=15 background=image/UI_05.gif height=25>&nbsp;</TD>
        </TR>
        <TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD colSpan=3 height=25>&nbsp;</TD>
          <TD align=left height=25 width=65>&nbsp;<TD align=left height=25><INPUT type=radio value="1" name=erase>Firmware Defaults</TD>
          <TD height=25>&nbsp;</TD>
          <TD width=15 background=image/UI_05.gif height=25>&nbsp;</TD>
        </TR>
        <TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD colSpan=3 height=25>&nbsp;</TD>
          <TD align=left height=25 width=65><TD align=left height=25><INPUT type=radio value="2" name=erase>Factory Defaults</TD>
          <TD height=25>&nbsp;</TD>
          <TD width=15 background=image/UI_05.gif height=25>&nbsp;</TD>
        </TR>
   	<TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD colSpan=3 height=25>&nbsp;</TD>
          <TD align=left height=25 width=70><TD align=left height=25>&nbsp;</TD>
          <TD height=25>&nbsp;</TD>
          <TD width=15 background=image/UI_05.gif height=25>&nbsp;</TD>
        </TR>
        <TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3
          height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD colSpan=3 height=25>&nbsp;</TD>
          <TD align=right colSpan=2 height=25>
			<p align="center">&nbsp;Please select a file to upgrade:&nbsp;&nbsp;<INPUT type=file name=file size="20"></TD>
          <TD height=25>&nbsp;</TD>
          <TD background=image/UI_05.gif height=25>&nbsp;</TD></TR>
        <TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 
          height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD colSpan=3 height=25>&nbsp;</TD>
          <TD align=right colSpan=2 height=25>
          <p align="center"><FONT face=Arial color=#ff0000 size=2><B>Warning: </B>Upgrading firmware may take a few minutes, please don't <BR>turn off the power or press the reset button.</FONT></TD>
          <TD height=25>&nbsp;</TD>
          <TD background=image/UI_05.gif height=25>&nbsp;</TD></TR>
        <TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 
          height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD colSpan=3 height=25>&nbsp;</TD>
          <TD colSpan=2><HR color=#b5b5e6 SIZE=1 width="90%"></TD>
          <TD height=25>&nbsp;</TD>
          <TD width=15 background=image/UI_05.gif 
        height=25>&nbsp;</TD></TR>
        <TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 
          height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <CENTER>
          <TD width=13 colSpan=3 height=25>&nbsp;</TD>
          <TD align=middle colSpan=2 height=25 width=402>&nbsp;<INPUT type=text name=process size=27 maxlength=120 value='' onFocus=blur()></UBR></TD>
          <TD height=25 width=5>&nbsp;</TD></CENTER>
          <TD width=15 background=image/UI_05.gif 
        height=25>&nbsp;</TD></TR>
        <TR>
          <TD align=right width=156 bgColor=#e7e7e7 colSpan=3 
          height=25>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif height=25>&nbsp;</TD>
          <TD colSpan=3 height=25>&nbsp;</TD>
                  <TD align=middle colSpan=2 height=25><B><FONT color=red>Upgrade must 
                    NOT be interrupted ! (do wait 2 min.)</FONT></B></TD>
          <TD height=25>&nbsp;</TD>
          <TD width=15 background=image/UI_05.gif 
        height=25>&nbsp;</TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top width=176 bgColor=#6666cc>
      <TABLE cellSpacing=0 cellPadding=0 width=176 border=0>
        <TBODY>
        <TR>
          <TD width=11 bgColor=#6666cc height=25>&nbsp;</TD>
          <TD width=156 bgColor=#6666cc height=25><font color="#ffffff">
			<span style="font-family: Arial;"><br>
			Click on the browse button to select 
			the firmware file to be uploaded to the router.<br>
			<br>Click the Upgrade button to begin the 
			upgrade process. Upgrade must not be interrupted.<br>
			<b><a target="_blank" href="help/HUpgrade.asp">
			More...</a></b></span></font> </TD>
          <TD width=9 bgColor=#6666cc 
  height=25>&nbsp;</TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TD width=809 colSpan=2>
      <TABLE cellSpacing=0 cellPadding=0 border=0 width=100%>
        <TBODY>
        <TR>
          <TD width=156 bgColor=#e7e7e7 height=30>&nbsp;</TD>
          <TD width=8 background=image/UI_04.gif>&nbsp;</TD>
          <TD width=16>&nbsp;</TD>
          <TD width=12>&nbsp;</TD>
          <TD >&nbsp;</TD>
          <TD width=15>
          <TD width=15 background=image/UI_05.gif>&nbsp;</TD>
          <TD width=176 bgColor=#6666cc rowSpan=2>
          <IMG 
            src="image/UI_Cisco.gif" border=0 width="176" height="64"></TD></TR>
        <TR>
          <TD width=156 bgColor=#000000>&nbsp;</TD>
          <TD width=8 bgColor=#000000>&nbsp;</TD>
          <TD width=16 bgColor=#6666cc>&nbsp;</TD>
          <TD width=12 bgColor=#6666cc>&nbsp;</TD>
          <TD  bgColor=#6666cc>
            <p align="right"><INPUT onclick=upgrade(this.form) type=button value=" Upgrade " name=Upgrade_b></TD>
          <TD width=16 bgColor=#6666cc height=33>&nbsp;</TD>
          <TD width=15 bgColor=#000000 
  height=33>&nbsp;</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></FORM></DIV></BODY></HTML>