paragaph 1
function openAddPictureBox() { document.getElementById('clickForMoreImagesRow').style.display = 'none'; document.getElementById('uploadMoreImagesSection').style.display = ''; } function show_show_hide(){ var sh = document.getElementById('show_hide_box'); var shl = document.getElementById('show_hide_link'); if (sh.style.display = '' && shl.style.display == 'none') { return; } sh.style.display = ''; shl.style.display = 'none'; } function expand_by_url() { var url = location.href; if (url.match(/#INV$/) || url.match(/#captchaError$/) || document.getElementsByName('submission_title')[0].value != '') { show_show_hide(); } } function click_here_links() { var block = document.getElementById('submission_block'); var children = block.getElementsByTagName('p'); var click_html = 'Click here to write your own.'; var p = document.createElement('p'); p.innerHTML = click_html; children[(children.length -1)].parentNode.insertBefore(p, children[(children.length -1)].nextSibling); var count = 0; for (var i=children.length;i>0;i--) { if (count == 26) { count = 0; var p = document.createElement('p'); p.innerHTML = click_html; children[i].parentNode.insertBefore(p, children[i]); } count++; } } function save() { var errors = []; var regexp = /<(script|form)/; var imgregex = /(jpg|jpeg|JPEG|JPG|gif|GIF)/; var field = document.htmlForm2.submission_title.value; if (field.length>200) { errors.push('Your submission title must be a maximum of 200 characters.'); } if (field.match(/^\s*$/)) { errors.push('Your submission must have a title.'); } if (field.match(regexp)) { errors.push('Your submission title may not contain html.'); } field = document.htmlForm2.submission_text.value; if (field.length>10000) { errors.push('Your submission body must be a maximum of 10000 characters.'); } if (field.match(/^\s*$/)) { errors.push('Your submission body is empty.'); } if (field.match(regexp)) { errors.push('Your submission body may not contain html.'); } field = document.htmlForm2.submission_image_1.value; if (field && !field.match(imgregex)) { errors.push('Your image must be a jpg or gif.'); } field = document.htmlForm2.submission_image_1_text.value; if (field && field.length>200) { errors.push('Your image caption must be a maximum of 200 characters.'); } if (field && field.match(regexp)) { errors.push('Your image caption may not contain html.'); } field = document.htmlForm2.submission_author.value; if (field && field.length>200) { errors.push('Your name must be a maximum of 200 characters.'); } if (field && field.match(regexp)) { errors.push('Your name may not contain html.'); } field = document.htmlForm2.submission_author_location.value; if (field && field.length>200) { errors.push('Your location must be a maximum of 200 characters.'); } if (field && field.match(regexp)) { errors.push('Your location may not contain html.'); } if (document.htmlForm2.submission_guidelines.checked) { } else { errors.push('Please check Submission Guidelines checkbox.'); } if (document.htmlForm2.submission_challenge) { field = document.htmlForm2.submission_challenge.value; if (!field) { errors.push('You must enter a word for the submission challenge graphic.'); } } if (errors.length > 0) { alert(errors.join('\n')); } return (errors.length == 0); } function InactiveInvitationAlert(obj) { if (obj) {obj.blur();} alert('Sorry, we are not accepting any new submissions at this time for this page. Please return in a few days to add your submission.'); }
Tell the world how great Station 14 and the firefighters there really are. No time for modesty - Share it!
Powered by SiteBuildIt!