function showWork(trak) {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;How is it customizable?</h3>";
   document.getElementById("faq_answer").innerHTML='Web-Scheduler\'s calendar is designed to implement the look and feel '
       + 'of your website; we wouldn\'t settle for a logo and neither should you. '
       + ' <!--We\'ll setup all of your images, menus, animated images, colors, etc., to work as if Web-Scheduler were on your website.--> '
       + 'You can easily add your images, menus, colors, etc to Web-Scheduler so it looks just like your site or you '
       + 'can use frames to put Web-Scheduler on your webpage.  Instructions are easy to follow.  Then all you need to do is link to Web-Scheduler just as you '
       + 'would link to a page on your site.  Your menu items and other links on Web-Scheduler will point to their respective pages on your site... the user never '
       + 'notices the difference!  You can also use our widgets to put scrolling event lists right on any page on your site. '
       + '<br>&nbsp;<br><center><img src="images/How.jpg" width="275px" height="100px" border=0><img src="images/How2.jpg" '
       + 'width="102px" height="100px" border=0></center><center><img src="images/How_Text.jpg" width="275px" height="50px" '
       + 'border=0>&nbsp;<img src="images/How_Text2.jpg" width="102px" height="50px" border=0></center> <br>' ;
   if (trak != 'no') {
      track('work');
   }
}
function showWidget(trak) {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;How does it integrate with my site?</h3>";
   document.getElementById("faq_answer").innerHTML= '<span style="float:right"><img src="images/widget1.jpg"></span>'
       + 'Integration is primarily achieved in two ways: <br>'
       + '1. By copy-pasting a snippet of HTML to your website you can pull live feeds of upcoming events directly to any page you\'d like.  '
       + 'This is called a widget. '
       + 'For example, you could have important events scroll on your home page and also have a specific group of events display on '
       + 'another page, e.g. Atlanta events on your Atlanta page or Singles events on your Singles page. <br>'
       + '2. You can setup Web-Scheduler to look exactly like your website.  See the FAQ "How is it customizable?" for more on this.<br> ';
   if (trak != 'no') {
     track('widget');
   }
}
function showInstall() {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;I don't have to install anything?</h3>";
   document.getElementById("faq_answer").innerHTML= 'No, you do not need to install anything.  The web calendar runs on our servers so you do not need to maintain or '
       + 'install anything.  Many people do not have the skill set to install a database application on an Internet server '
       + '(or want to pay someone else to do it) so we take away that problem.  Web-Scheduler works as if it is on your website '
       + 'however it runs on our server so we can easily add new features and help you with anything you may need.  All '
       + 'you need to do is link to it.';
   track('install');
}
function showSubscribe() {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;Why do I subscribe instead of buy?</h3>";
   document.getElementById("faq_answer").innerHTML= 'The subscription based service allows us to maintain the application '
       + 'for you while keeping your costs low.  Because it is on our server we can include setup assistance, '
       + 'support, and future upgrades in the price.  If you bought Web-Scheduler you\'d have to '
       + 'pay extra for installation and upgrades (as it would take additional time to set it on your server and configure). '
   track('subsc');
}
function showGroup() {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;What is a group?</h3>";
   document.getElementById("faq_answer").innerHTML= 'A group is used to organize events.  Each group may have its own '
       + 'calendar.  Example groups for a business might be "Marketing," "Atlanta Office," or "Dr. Smith\'s Schedule" '
       + ' while a church may have event groups such as "Bible Studies," "Senior Ministry," or "Volunteer Schedule."'
       + '  You decide the group names.';
   track('group');
}
function showSubmitEvent() {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;Can <i>anyone</i> submit an event?</h3>";
   document.getElementById("faq_answer").innerHTML= 'You are in complete control over who is able to request or '
       + 'add events to the calendar.  Before someone may request an event they must first be a registered '
       + 'member who has verified their e-mail address using Web-Scheduler\'s built in verification process.'
//       + 'Once they\'ve confirmed their e-mail they are considered "guests."  Guests by default may request '
//       + 'events which must be approved before being posted to the calendar. '
//       + 'You may change your preferences to require all guests be approved before they may request events.  You can '
//       + 'also go back later and deny any user the ability to request events. Any approved users may also add events directly without approval if you\'d like.'
       + '<br>&nbsp;<br>When an event is requested (submitted for approval) you will receive an e-mail notification to approve or deny the request. If you '
       + 'approve the event it will become visible on the calendar.  If you deny it then it will not.  Either way the person who requested the event '
       + 'will be notified via e-mail on the status of their request.<br>&nbsp;<br>'
       + 'You can also set your preferences so only one user can enter and update events.';
   track('event');
}
function showReseller() {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;Do you offer reselling or bulk discounts?</h3>";
   document.getElementById("faq_answer").innerHTML= 'Yes, we offer discounts to resellers and on bulk purchases of '
       + '10 subscriptions or more.  We can also offer branding for your '
       + 'Web-Scheduer calendars in these cases. ';
       + 'Please <a href="#FAQ" onclick="showHelp();">contact us</a> to discuss the details.';
   track('resell');
}
function showNoWebsite() {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;Do I need a website?</h3>";
   document.getElementById("faq_answer").innerHTML= 'No, you do not need a website.  If you would like, you '
       + 'can point your domain name directly to your Web-Scheduler calendar.';
   track('noweb');
}
function showFeatures() {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;What other features are there?</h3>";
   document.getElementById("faq_answer").innerHTML= 'Web-Scheduler has a ton of features, please see this list of the '
       + 'more important <a href="features.php">features</a>.';
   track('fetr2');
}
function showWhatNext() {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;What happens after I subscribe?</h3>";
   document.getElementById("faq_answer").innerHTML= 'After you subscribe you will be sent an e-mail with a link to your new '
       + 'Web-Scheduler calendar and the username and password you will need to login.  You can go ahead and login and start adding your '
       + 'events and getting it ready immediately.  '
       //+ 'Within a day or two in most cases, we will setup the look and feel of your calendar to match '
       //+ 'your website (if you have one).  Once the look and feel meets your satisfaction '
       + 'Once it is ready then all you need to do is link to '
       + 'your Web-Scheduler like any other page.  If you need help then click on the support link and we\'ll be glad to help.';
   track('next');
}
function showHelp() {
   document.getElementById("faq_question").innerHTML="<h3>&nbsp;&nbsp;I have a question or need help.</h3>";
   document.getElementById("faq_answer").innerHTML= 'Please send us your question or comments using the below form and we\'ll get back to you as soon as possible.<br> '
       + '<form action="template/pac.php" method="post">'
       + ' <INPUT TYPE="HIDDEN" VALUE="Web-Scheduler Support Request" NAME="e_subject">'
       + ' <INPUT TYPE="HIDDEN" VALUE="http://www.web-scheduler.net/" NAME="next_page">'
       + ' <INPUT TYPE="HIDDEN" VALUE="no" NAME="debug">'
       + ' <table align=center style="border-collapse:collapse;background:ivory;" rules="none" frame="box" width="95%" border=1 cellpadding=2 cellspacing=2> '
       + '  <tr>'
       + '   <td width="10%" valign="top" align="left">&nbsp;Name:</td><td width="60%" valign="top" align="left"><input type="text" name="Name" id="name" size=40 maxlength=100 value=""><span style="color:maroon">*</span></td><td rowspan="4" valign="top" align="right"><img src="images/stamp.gif" alt="Send us your question." width="68px" height="61px"></td>'
       + '  </tr>'
       + '  <tr>'
       + '   <td width="10%" valign="top" align="left">&nbsp;E-Mail:</td><td valign="top" align="left"><input type="text" name="MailAddr"  id="mailaddr" size=40 maxlength=100 value=""><span style="color:maroon">*</span></td>'
       + '  </tr>'
       + '  <tr>'
       + '   <td width="10%" valign="top" align="left">&nbsp;Phone:</td><td valign="top" align="left"><input type="text" name="Phone"  id="phone" size=40 maxlength=20 value=""></td>'
       + '  </tr>'
       + '  <tr>'
       + '  <td width="10%" valign="top" align="left">&nbsp;Subject:</td><td valign="top" align="left"><input type="text" name="Subject"  id="subject" size=40 maxlength=150 value=""><span style="color:maroon;">*</span></td>'
       + '  </tr>'
       + '  <tr>'
       + '   <td width="10%" valign="top" align="left">&nbsp;Details:</td><td colspan="2" valign="top" align="left"><textarea name="Comments" id="comments" cols=40 rows=7></textarea></td>'
       + '  </tr>'
       + '  <tr>'
       + '   <td colspan="3" valign="top" align="center"><input type="button" onclick="submit_support(form)" value="Send"></td>'
       + '  </tr>'
       + ' </table>'
       + ' &nbsp;&nbsp;&nbsp;<span style="color:maroon;">*</span> <i>Indicates a required field.</i>'
       + '</form>';
   track('help');
}
  function submit_support(form) {
    name = document.getElementById("name").value;
    mail = document.getElementById('mailaddr').value;
    phone = document.getElementById('phone').value;
    subject = document.getElementById('subject').value;
    comments = document.getElementById('comments').value;
    name = name.replace(/[\.,;!@%^~`\*\{\}&=+|\"<>#\$\/:\?'\(\)\[\]_\-\\]/gi,'');
    mail = mail.replace(/[\;!^`\*\{\}&=+|\"<> #\$\/: \?'\(\)\[\]_\-\\]/gi,'');
    subject = subject.replace(/[@%^~`\*\{\}&=+|\"<>#\$\/:\?'\(\)\[\]_\-\\]/gi,'');
    comments = comments.replace(/[@%^~`\*\{\}&=+|<>#\$\/:\?'\(\)\[\]_\-\\]/gi,'');
    phone = phone.replace(/[\.,;!@%^~`\*\{\}&=+|\"<>#\$\/: \?'\(\)\[\]_\-\\abcdefghijklmnopqrstuvwxyz]/gi,'');
    err = "";
    if (name.length < 3) {
       err += "\n  - Your name.";
    }
    if (phone.length > 2 && phone.length < 10) {
       err += "\n  - Your phone number with area code (and country code if not USA)\n.";
    } 
    if (!test_email(mail)) {
       err += "\n  - Your e-mail address so we may reply.";
    } 
    if (subject.length == 0 && comments.length == 0) {
       err += "\n  - Your comments or question.";
    }
    document.getElementById("name").value = name;
    document.getElementById('mailaddr').value = mail;
    document.getElementById('phone').value = phone;
    document.getElementById('subject').value = subject;
    document.getElementById('comments').value = comments;
    if (err != "") {
       alert("Please correct the following problems and your message will be sent:" + err);
    }
    else {
       form.submit();
    }              
  }
  function test_email(Email) {
   if (Email.length > 0) {
     if ((-1 == Email.indexOf("@")) ||
         (-1 == Email.indexOf(".")) ||
         (-1 != Email.indexOf(",")) ||
         (-1 != Email.indexOf("#")) ||
         (-1 != Email.indexOf("!")) ||
         (-1 != Email.indexOf(" ")) ||
         (Email.length <= (Email.indexOf("@")+2))) {
        return(false);
      }
      return(true); 
   }
  }

