function generate(form){
websiteurl = document.inputForm.websiteurl.value;
title = document.inputForm.title.value;
accesskeys = document.inputForm.accesskeys.checked;
accesskey0 = document.inputForm.accesskey0.value;
if(accesskey0 != "") {
accesskey0 = "<li>Accesskey 0 - " + accesskey0 + "</li>\r\n";
}
accesskey1 = document.inputForm.accesskey1.value;
if(accesskey1 != "") {
accesskey1 = "<li>Accesskey 1 - " + accesskey1 + "</li>\r\n";
}
accesskey2 = document.inputForm.accesskey2.value;
if(accesskey2 != "") {
accesskey2 = "<li>Accesskey 2 - " + accesskey2 + "</li>\r\n";
}
accesskey3 = document.inputForm.accesskey3.value;
if(accesskey3 != "") {
accesskey3 = "<li>Accesskey 3 - " + accesskey3 + "</li>\r\n";
}
accesskey4 = document.inputForm.accesskey4.value;
if(accesskey4 != "") {
accesskey4 = "<li>Accesskey 4 - " + accesskey4 + "</li>\r\n";
}
accesskey5 = document.inputForm.accesskey5.value; 
if(accesskey5 != "") {
accesskey5 = "<li>Accesskey 5 - " + accesskey5 + "</li>\r\n";
}

bobby = document.inputForm.bobby.checked;
wwwc = document.inputForm.wwwc.checked;
cynthia = document.inputForm.cynthia.checked;
validated = document.inputForm.validated.checked;
navigationaid = document.inputForm.navigationaid.checked;
searchbox = document.inputForm.searchbox.checked;
titleattributes = document.inputForm.titleattributes.checked;
imageattributes = document.inputForm.imageattributes.checked;
doctypeform = document.inputForm.doctype.options[document.inputForm.doctype.selectedIndex].value;
css = document.inputForm.css.checked;
relativefont = document.inputForm.relativefont.checked;
stillreadeable = document.inputForm.stillreadeable.checked;

start = "";

otherOutput = "";

scriptOutput = start + '<h2>Accessibility Statement</h2>\r\r'
+ '<p>This is the official accessibility statement for '
+ '<a href="' + websiteurl + '">' + title + '</a>.</p>\r\n\r\n';
scriptOutput += "" +

((accesskeys) ? "<h3>Access keys</h3>\r\n<p>Most browsers support jumping to specific links by typing keys defined on the web site. On Windows, you can press <kbd>ALT</kbd> + an access key; on Macintosh, you can press <kbd>Control</kbd> + an access key.</p>\r\n\r\n<p>All pages on this site define the following access keys:</p>\r\n\r\n<ul>\r\n" + accesskey0 + accesskey1 +  accesskey2 + accesskey3  + accesskey4  + accesskey5 + "</ul>\r\n\r\n" : "") + 
((bobby) || (wwwc) || (cynthia) || (validated) ? "<h3>Standards compliance</h3>\r\n<ol>\r\n" : "") +
((bobby) ? "<li>All pages on this site are <a href=\"http://webxact.watchfire.com\">Watchfire WebXACT</A> approved, complying with all guidelines. This is always a judgement call; many accessibility features can be measured, but many can not.</li>\r\n" : "") +
((wwwc) ? "<li>All pages on this site is <acronym title=\"Web Content Accessibility Guidelines\">WCAG</acronym> <acronym title=\"triple A\">AAA</acronym> approved, complying wih all <a href=\"http://www.w3.org/TR/WAI-WEBCONTENT/full-checklist.html\">priority 1, 2, and 3 guidelines</a> of the <a href=\"http://www.w3.org/TR/WCAG10\"><acronym title=\"World Wide Web Consortium\">W3C</acronym> Web Content Accessibility Guidelines</a>. Again, this is a judgement call; many guidelines are intentionally vague and can not be tested automatically. I have reviewed all the guidelines and believe that all these pages are in compliance.</li>\r\n" : "") +
((cynthia) ? "<li>All pages on this site are <a href=\"http://webxact.watchfire.com\">Section 508 approved</a>, complying with all of the <acronym title=\"United States\">U.S.</acronym> Federal Government <a href=\"http://www.section508.gov\">Section 508 Guidelines</a>.  Again, a judgement call.  I have reviewed all the guidelines and believe that all these pages are in compliance.</li>\r\n" : "") +
((validated) ? "<li>All pages on this site <a href=\"http://validator.w3.org/check?uri=" + websiteurl + ">validate as " + doctypeform + "</a>.</li>\r\n" : "") +
((bobby) || (wwwc) || (cynthia) || (validated) ? "</ol>\r\n\r\n" : "") +
((navigationaid) || (searchbox) ? "<h3>Navigation aids</h3>\r\n<ol>\r\n" : "") +
((navigationaid) ? "<li>All pages have <tt>rel=previous, next, up,</tt> and <tt>home</tt> links to aid navigation in text-only browsers. Netscape 6 and Mozilla users can also take advantage of this feature by selecting the View menu, Show/Hide, Site Navigation Bar, Show Only As Needed (or Show Always).</li>\r\n" : "") +
((searchbox) ? "<li>The home page and all archive pages include a search box with an appropriate accesskey assigned.</li>\r\n" : "") +
((navigationaid) || (searchbox) ? "</ol>\r\n\r\n" : "") +
((titleattributes) ? "<h3>Links</h3>\r\n<ol>\r\n<li>Many links have title attributes which describe the link in greater detail, unless the text of the link already fully describes the target (such as the headline of an article).</li>\r\n</ol>\r\n\r\n" : "") +
((imageattributes) ? "<h3>Images</h3>\r\n<ol>\r\n<li>All content images used in this site include descriptive ALT attributes. Purely decorative graphics include null ALT attributes.</li>\r\n</ol>\r\n\r\n" : "") +
((css) || (relativefont) || (stillreadeable) ? "<h3>Visual design</h3>\r\n<ol>\r\n" : "") +
((css) ? "<li>This site uses cascading style sheets for visual layout.</li>\r\n" : "") +
((relativefont) ? "<li>This site uses only relative font sizes, compatible with the user-specified \"text size\" option in visual browsers.</li>\r\n" : "") +
((stillreadeable) ? "<li>If your browser or browsing device does not support stylesheets at all, the content of each page is still readable.</li>\r\n" : "") +
((css) || (relativefont) || (stillreadeable) ? "</ol>\r\n" : "");

output = scriptOutput + "\n\n" + otherOutput + '\n\n' + start +'<!-- Generated by RioLeo\'s Accessibility Statement generator at www.rioleo.org --'+'>';

document.mail.source.value = output;
document.mail.source2.value = output;

uncode();
}
