// This file contains all of the features and fees data and objects.
// Begin feature help
var diskSpace = '<p><b>Disk Space</b></p><p>Webspace is the alloted amount of disk space on the server you are allowed to use. This space is used to store all files needed for your website, including HTML files, image files, CGI scripts, multimedia files, and any other files used for your website. You can monitor how much space you are using in your personal control panel.</p>';

var dataTransfer = '<p><b>Data Transfer</b></p><p>Data transfer is the amount of data sent from and to your domain. The more visitors your website has, the more data transfers. The majority of this traffic is web traffic (website visitors), but it can also be FTP (file uploads and downloads), Anonymous FTP, and even e-mail. You can monitor how much data transfer you are using in your control panel.</p>';

var emailAccounts = '<p><b>E-mail Accounts</b></p><p>Each e-mail account can have its own distinct login and password and allow for the sending and retrieving of e-mail. You can setup your e-mail accounts to any name (anyname@yourdomainname.com), anytime, automatically by logging into your personal control panel.</p>';

var emailResponders = '<p><b>E-mail Aliasing and Auto Responders</b></p> <p>An e-mail alias is a alternate name given to an existing e-mail account.  For example, if you have an employee named Joe and he is the sales representative, you could set up an account named joe@yourdomain.com and an alias named sales@yourdomain.com.  All e-mail sent to sales will automatically be sent to Joe.</p> <p>Autoresponders automatically send a canned reply to an incoming e-mail message.  For example, you might want to send a "Closed for the holidays" message to all who send you e-mail.<p>E-mail Auto Responders and Aliasing may be added or edited instantly by using your personal control panel.</p>';

var domainTransfer = '<p><b>FREE domain name transfer</b></p><p>We do not charge to transfer your existing domain from another web host to <i>etherica.net</i>.</p>';

var domainRegistration = '<p><b>Domain Registration</b><p>We will register your domain (www.yourdomain.com) with the official domain name regisrars.</p>';

var fTP = '<p><b>FTP</b><p>FTP is the program and protocol used to transfer your web pages and graphics files from your computer to our server. Clients or your webmaster can create additional FTP accounts in real-time, set the startup directory for each user, and delete inactive accounts.</p> <p>You can create and modify FTP accounts using your personal control panel. FTP can be used 24/7/365, allowing you the capability to make changes to your website whenever you want.</p>';

var telNet = '<p><b>Telnet with SSH</b><p>Telnet access allows clients to access their web directories using Unix shell commands. Clients can perform a variety of administrative tasks, such as changing file access permission, move files and delete files.</p> <p>You can create and modify telnet accounts using your personal control panel. Telnet can be used 24/7/365, allowing you the capability to make changes to your website when ever you want to.</p>';

var subDomains = '<p><b>Sub-domains</b><p>Sub-domains allow you to use URLs like subdomain.yourdomain.com. Any visitor who mistypes a sub-domain URL, will be directed to your virtual domain website. This ensures no visitors are lost due to mistakes.</p>';

var pCP = '<p><b>Personal Control Panel</b><p>The Personal Control Panel allows the client to administer user, FTP, site, and mail list settings. It has features for site back-ups and restores and allows the user to view disk and web usage. The PCP is an excellent too for beginners and advanced webmasters alike.</p>';

var cgibin = '<p><b>CGI-Bin</b><p>CGI scripts are programs or scripts that add  interactivity and enable dynamic capabilities for your site(rather than static lifeless pages). The latest version of CGI is maintained on all web servers and contains all commonly requested Perl modules. Any module not installed which is needed by a client is installed upon request.</p>';

var asp = '<p><b>ASP</b><p>Chili!Soft ASP, also referred to as Active Server Pages, delivers full ASP support.</p>';

var mySQL = '<p><b>MySQL</b><p><img src="images/mysqllogo.gif" alt="MySQL Logo" align="left">MySQL is a multi-user, multi-threaded SQL database. MySQL is a client/server implementation with many client programs and libraries.</p><p>MySQL can also be installed on your business or personal PC, if your customer database does not need to be managed realtime.</p>';

var php = '<p><b>PHP4 with Zend Optimizer</b><p>PHP (Personal Hypertext Protocol) is a server-side, cross-platform, HTML embedded scripting language. PHP is especially popular with those who use the MySQL database.  PHP is commonly used as a front-end to MySQL databases. We install the latest stable version of PHP.</p><p>The Zend Optimizer ensures that your PHP code executes as fast as possible.</p>';

var scripting = '<p><b>Perl 5, C++, Python, TCL, IMAP4l, Java, Javascript, and Server Side Includes (SSI)</b><p>Interpreters or compilers are available for Perl 5, C++, Python, TCL, IMAP4l,  Java and JavaScript. We install the latest stable version of each interpreter or compiler so you can take full advantage of any new features or bug fixes. CGI Server Side Includes (SSI) are also supported.</p>';

var crontab = '<p><b>Cron Tab</b><p>Cron Tab is available to run programs at a set time.</p>';

var search = '<p><b>Top Search Engine Submission</b><p>A compelling fact is that 80% - 90% of the traffic any site receives originates from one of these top search engines. We will manually submit your web site to the top search engines, which include:</p><div align="center"><table cellpadding="5"><tr><td>&#8226; Alta Vista</td><td>&#8226; Excite</td></tr><tr><td>&#8226; InfoSeek</td><td>&#8226; Hot Bot</td></tr><tr><td>&#8226; Lycos</d><td>&#8226; Magellan</td></tr><tr><td>&#8226; Web Crawler</td><td>&#8226; Yahoo</td></tr></table></div>';

var ssl = '<p><b>Secure Sockets Layer(SSL)</b><p>Secure Sockets Layer(SSL) is a  protocol which uses 128 bits to encrypt all data transmitted between client/server.</p>';

var ppd = '<p><b>Password Protected Directories</b><p>Choose who can view parts of your web site by password protecting your directories. Any number of directories can be password protected using .htaccess and .htpasswd files. Directories can be password protected without hassle within seconds from a telnet prompt.</p>';

var fpe = '<p><b>Frontpage 2000 Extensions</b><p>Microsoft\'s FrontPage 2000 is a client/server combination application which allows clients to create dynamic web sites quickly and easily without any programming knowledge. Frontpage 97 and 98 applications will also work flawlessly.</p>';

var cem = '<p><b>Customizable Error Pages</b><p>Never lose a visitor again to missing pages or server errors. Customize your own pages to intercept lost visitors when something goes wrong.</p>';

var fMgr = '<p><b>File Manager</b><p>Maintain your website without using an FTP program.  Upload, download, create and edit files in seconds with our easy to use File Manager.</p>';

var logs = '<p><b>Access To Raw Logs</b><p>Raw access and error logs can be downloaded  from the web site control panel or by FTP.</p>';

var stats = '<p><b>Detailed Web Site Statistics</b><p>Our detailed statistics program is fun, intuitive and has an easy-to-use interface which counters the dryness of most web stats programs. Even with its advanced reporting features, it is extremely easy to use, even for the novice.</p>';

var backups = '<p><b>Daily Backup</b><p>Each web site is backed up daily.  It can be restored on request.</p>';

var webmail = '<p><b>Web eMail</b><p>With Web eMail, you can check your email from any place you have access to the Internet.</p>';
 
var network = '<p><b>Network Connectivity</b><p>We have 4 Internet connections ranging from T3 (45MB) to OC3 (155MB) in size. Because our connections are true peering points, utilizing BGP4, and we maintain our own internal network, we are not dependent on any single Internet connection. We have backbone connections with Sprint, Cable & Wireless, Savvis Communications, and GTE Internetworking.</p>';
 
var os = '<p><b>Operating System</b><p>Our servers run the Linux operating system. It is used by millions worldwide. Linux is probably the most popular UNIX-like OS in the world. Linux aims for POSIX compliancy to maintain maximum compatibility with other UNIX-like systems. It is stable, fast, extremely productive, and easy to use.</p>';
 
var server = '<p><b>Server Software</b><p>Apache provides a robust and commercial-grade reference implementation of the HTTP protocol.</p>';

// Begin Fee help
var setUp = '<p><b>One Time Set Up Fee</b></p><p>This fee covers the initial set up of your web hosting account.  It is not refundable, because I have to subscribe for services on your behalf.</p>';

var domain = '<p><b>Annual Domain Name Registration</b></p><p>This fee covers the registration of your domain name and reserves the domain name for a year.  If you don&rsquo;t renew the name at the end of the year, the domain registration services release the domain name so anyone else can register it.</p><p>Having your own domain name, like www.yourcompany.com, makes it easier for people to remember your company web address.  Your e-mail name has a similar and easy to remember form (like name@yourcompany.com).</p><p>Otherwise, your web address will have a subdomain form, like www.etherica.net/~yourcompany.</p>';

var monthly = '<p><b>Monthly Web Hosting Fee (annual pre-pay)</b></p><p>This fee covers web hosting services.  By paying for longer periods, you reduce our administration costs, so we charge you less.</p>';

var noInfo = '<p><b>No Info</b></p><p>There is no information available for this item.</p>';

// Display Plan Feature Table
//
// Constructor method
function feature(theFeature,Description,PresenceValue,PromotionValue,EcommerceValue) {
  this.theFeature=theFeature;
  this.Description=Description;
  this.PresenceValue=PresenceValue;
  this.PromotionValue=PromotionValue;
  this.EcommerceValue=EcommerceValue;
}

// Display Fee Table
//
// Constructor method
function fee(theFee,Description,PresenceValue,PromotionValue,EcommerceValue) {
  this.theFee=theFee;
  this.Description=Description;
  this.PresenceValue=PresenceValue;
  this.PromotionValue=PromotionValue;
  this.EcommerceValue=EcommerceValue;
}

// Assign background color based on current position
function assignBGColor(k) {
  if (k & 1 == 1) {
    return("white");
  } else {
    return("lightgrey");
  }
}
// Assign an image name based on current position
function assignImgName(j) {
  return("img"+j);
}

// Populate the feature table.  Define a new container array for the feature list.
function genFeature(plan) {
  var fList = new Array;
  var pList = new Array;
  var item = 1;

  fList[item++] = new feature("diskSpace","Storage Space","5 MB","15 MB","45 MB");
  fList[item++] = new feature("dataTransfer","Monthly Data transfers","&lt;1 Gig","1 Gig","3 Gig");
  fList[item++] = new feature("emailAccounts","E-mail Accounts","3","5","15");
  fList[item++] = new feature("emailResponders","E-mail Auto Responders, and Aliasing","Unlimited","Unlimited","Unlimited");
  fList[item++] = new feature("domainTransfer","Domain name transfer","Free","Free","Free");
  fList[item++] = new feature("fTP","FTP Access 24x7x365","Yes","Yes","Yes");
  fList[item++] = new feature("telNet","Telnet Access 24x7x365","No","No","No");
  fList[item++] = new feature("subDomains","Sub-domains","Unlimited","Unlimited","Unlimited");
  fList[item++] = new feature("pCP","Personal Control Panel","Yes","Yes","Yes");
  fList[item++] = new feature("cgibin","CGI-Bin","No","Yes","Yes");
  fList[item++] = new feature("asp","ASP","No","Yes","Yes");
  fList[item++] = new feature("mySQL","MySQL","No","Yes","Yes");
  fList[item++] = new feature("php","PHP4","Yes","Yes","Yes");
  fList[item++] = new feature("scripting","Perl 5, C++, Python, TCL Compilers, IMAP4l, Java, Javascript, and Server Side Includes (SSI)","No","Yes","Yes");
  fList[item++] = new feature("crontab","Cron Tab","Yes","Yes","Yes");
  fList[item++] = new feature("search","Submission to top Search Engines","Yes","Yes","Yes");
  fList[item++] = new feature("ssl","Secure Sockets Layer(SSL)","No","Yes","Yes");
  fList[item++] = new feature("ppd","Password Protected Directories","Yes","Yes","Yes");
  fList[item++] = new feature("fpe","FrontPage 97, 98 and 2000 Extensions","Yes","Yes","Yes");
  fList[item++] = new feature("cem","Customizable Error Messages","Yes","Yes","Yes");
  fList[item++] = new feature("fMgr","File Manager","Yes","Yes","Yes");
  fList[item++] = new feature("logs","Access To Raw Logs","Yes","Yes","Yes");
  fList[item++] = new feature("stats","Detailed Web Site Statistics","Yes","Yes","Yes");
  fList[item++] = new feature("backups","Daily Site Back-ups","Yes","Yes","Yes");
  fList[item++] = new feature("webmail","Web eMail","Yes","Yes","Yes");
  fList[item++] = new feature("network","Network Connectivity","OC-3","OC-3","OC-3");
  fList[item++] = new feature("os","Server Operating Systems","Linux (Unix)","Linux (Unix)","Linux (Unix)");
  fList[item++] = new feature("server","Server Software","Apache 1.3.4","Apache 1.3.4","Apache 1.3.4");
  // Do not delete.  This is a null definition used to indicate the end of the feature list.
  // This way the feature list loop knows to end without a human trying to keep an accurate
  // count of the features.  This also allows easy insertion of records without renumbering.
  fList[item++] = new feature("","","","","");
  
  // Item starts over.
  item = 1;
  pList[item++] = new fee("setUp","One Time Setup Fee","$24","$32","$49");
  pList[item++] = new fee("domain","Annual Domain Name Registration (if not currently registered)","$30","$30","$30");
  pList[item++] = new fee("monthly","Monthly Web Hosting Fee (annual pre-pay)","$10","$14","$24");
  pList[item++] = new fee("monthly","&nbsp;&nbsp; or monthly fee with semi-annual pre-pay","$11","$15.50","$27");
  pList[item++] = new fee("monthly","&nbsp;&nbsp; or monthly fee with monthly pre-pay","$12",   "$17","$30");
  // Do not delete.  This is a null definition used to indicate the end of the fee list.
  // This way the fee list loop knows to end without a human trying to keep an accurate
  // count of the fees.  This also allows easy insertion of records without renumbering.
  pList[item++] = new fee("","","","","");
  
  // The feature list is populated.  Now display it in a table
  document.write('<div align="center">');

  var valueTitle = "";
  var tableWidth = "80%";
  if (plan == 4) {
    tableWidth = "100%";
  }
  document.write('<table border=0 cellPadding=3 cellSpacing=0 width=80%>');
  document.write('<tr>'); 
  document.write('<th width=6% height=22>&nbsp;</th>');
  document.write('<th class="inverse" align="left" width=45% bgcolor="blue" height=22>Features</th>');
  if (plan == 1) {
    document.write('<th class="inverse" align="right" width=45% bgcolor="blue" height=22>Web Presence</th>');
  } else {
    if (plan == 2) {
	  document.write('<th class="inverse" align="right" width=45% bgcolor="blue" height=22>Web Promotion</th>');
    } else {
	  if (plan == 3 ) {
	    document.write('<th class="inverse" align="right" width=45% bgcolor="blue" height=22>E-Commerce</th>');
      } else {
	    if (plan == 4) {
		  document.write('<th class="inverse" align="right" bgcolor="blue" height=22>Presence</th>');
          document.write('<th class="inverse" align="right" bgcolor="blue" height=22>Promotion</th>');
          document.write('<th class="inverse" align="right" bgcolor="blue" height=22>E&#45; Commerce</th>');
        }
	  }
	}
  }
  document.write('</tr>');
  
  var i = 1;
  // Loop while the fList feature is NOT null.  See comment above at end of feature list definition.
  while (fList[i].theFeature != "") {
    document.write('<tr>');
    document.write('<td width=6%><a href="javascript:displayFeatures('+fList[i].theFeature+')" onmouseover="changePic(&quot;'+assignImgName(i)+'&quot;,&quot;qdn&quot;);" onmouseout="changePic(&quot;'+assignImgName(i)+'&quot;,&quot;qup&quot;);"><img src="images/questionmark_up.gif" border=0 name="'+assignImgName(i)+'"></a></td>');
    document.write('<td align="left" width=51% bgcolor='+assignBGColor(i)+'>'+fList[i].Description+'</td>');
    if (plan == 1) {
      document.write('<td align="right" width=43% bgcolor='+assignBGColor(i)+'>'+fList[i].PresenceValue+'</td>');
    } else {
      if (plan == 2) {
	    document.write('<td align="right" width=43% bgcolor='+assignBGColor(i)+'>'+fList[i].PromotionValue+'</td>');
      } else {
	    if (plan == 3) {
	      document.write('<td align="right" width=43% bgcolor='+assignBGColor(i)+'>'+fList[i].EcommerceValue+'</td>');
        } else {
	      if (plan == 4) {
	        document.write('<td align="right" width=14% bgcolor='+assignBGColor(i)+'>'+fList[i].PresenceValue+'</td>');
	        document.write('<td align="right" width=14% bgcolor='+assignBGColor(i)+'>'+fList[i].PromotionValue+'</td>');
	        document.write('<td align="right" width=14% bgcolor='+assignBGColor(i)+'>'+fList[i].EcommerceValue+'</td>');
          }
		}
	  }
	}
	i++;
  } // end while
  document.write('</tr>');
  
  document.write('<tr>'); 
  document.write('<td width=6%>&nbsp;</td>');
  document.write('<td align="left">&nbsp;</td>');
  document.write('<td align="right">&nbsp;</td>');
  if (plan == 4) {
    document.write('<td align="right">&nbsp;</td>');
    document.write('<td align="right">&nbsp;</td>');
  }
  document.write('</tr>');
  
  // Generate the fee table
  document.write('<tr bgcolor="blue">');
  document.write('<th width=6% height=25 bgcolor="white">&nbsp;</th>');
  document.write('<th align="left" height=25><span class="inverse">Fees</span></th>');
  document.write('<th align="right" width=10% height=25>&nbsp;</th>');
  // Loop while the pList fee description is NOT null.  See comment above at end of feature list definition.  The same applies here.

  // Note: variable iN continues here with the count where i left off from the feature list.
  // This is needed to give the image names a unique name for the q-mark buttons to work.
  var iN = i;
  i = 1;
  while (pList[i].theFee != "") {
    document.write('<tr>');
    document.write('<td width=6%><a href="javascript:displayFeatures('+pList[i].theFee+')" onmouseover="changePic(&quot;'+assignImgName(iN)+'&quot;,&quot;qdn&quot;);" onmouseout="changePic(&quot;'+assignImgName(iN)+'&quot;,&quot;qup&quot;);"><img src="images/questionmark_up.gif" border=0 name="'+assignImgName(iN)+'"></a></td>');

	// The Monthly hosting fee is displayed differently.  Adjust this if their positions change.
	// I don't like to do this, but the normal display is confusing for this fee.
   document.write('<td width=10% height=25 align="left" bgcolor="'+assignBGColor(i)+'">'+pList[i].Description+'</td>');
   if (plan == 1) {
        document.write('<td width=10% height=25 align="right" bgcolor="'+assignBGColor(i)+'">'+pList[i].PresenceValue+'</td>');
    } else {
	  if (plan == 2) {
		document.write('<td width=10% height=25 align="right" bgcolor="'+assignBGColor(i)+'">'+pList[i].PromotionValue+'</td>');
      } else {
	    if (plan == 3) {
		  document.write('<td width=10% height=25 align="right" bgcolor="'+assignBGColor(i)+'">'+pList[i].EcommerceValue+'</td>');
        } // plan is 3
	  } // plan is 2
	} // plan is 1
	i++;
	iN++;
  } // while
  document.write('</table>');
  document.write('</div>');
}

// Open a new window and write the feature description into it.
function displayFeatures(theText) {
  // Open the feature window
  win = window.open("","features","status,resizable,scrollbars,height=400,width=340");
  win.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">');
  win.document.write('<html>');
  win.document.write('<head>');
  win.document.write('<title>Features</title>');
  win.document.write('</head>');
  win.document.write('<body bgcolor="white">');
  win.document.write('<table border=0 cellpadding=0 cellspacing=0 width=100% bgcolor="white">');
  win.document.write('<tr><td><img src="images/hostingfeat.gif"></td></tr>');
  win.document.write('<tr><td height=2></td></tr>');
  win.document.write('</table>');

  if (theText == "" || theText == null) {
    theText = noInfo;
  }
  win.document.write(theText);
  
  win.document.write('<p>Questions? e-mail <a href="mailto:support@etherica.net">support@etherica.net</a>');

  win.document.write('<script language="JavaScript">');
  win.document.write('if (document.images) {');
  win.document.write('  cup = new Image(); cup.src = "images/closewindow_up.gif";');
  win.document.write('  cdn = new Image(); cdn.src = "images/closewindow_down.gif";');
  win.document.write('}');

  win.document.write('function changeThePic(oldName,newName) {');
  win.document.write('  if (document.images) {');
  win.document.write('    newSource = eval (newName + ".src");');
  win.document.write('    document [oldName].src = newSource;');
  win.document.write('  }');
  win.document.write('  if (changeThePic.arguments.length == 2) {');
  win.document.write('    self.status = changeThePic.arguments[2];');
  win.document.write('    return true;');
  win.document.write('  }');
  win.document.write('}');
  win.document.write('</script>');

  win.document.write('<p align="center">');
  win.document.write('<a href="javascript:self.close()" onmouseover="changeThePic(&quot;clup&quot;,&quot;cdn&quot;);" onmouseout="changeThePic(&quot;clup&quot;,&quot;cup&quot;);"><img src="images/closewindow_up.gif" name="clup" border=0 alt="Click here to close this window" align="top"></a>');
  win.document.write('</p>');
  win.document.write('</body>');
  win.document.write('</html>');
  win.document.close();
}
