var whereNCycle = 0; var cycleStep = 0; var cycle = new Array('|','/','-','\\','|','/','-','\\'); var URL = document.URL; URL = URL.substring(7,URL.length) + '/'; URL = 'http://' + URL.substring(0,URL.indexOf('/')); URL = URL.toLowerCase(); var modStyles = new Array(); populateModuleStyles(modStyles); // Style selecting array setup for use later on preview and FlexiEDIT click events function populateModuleStyles(styles) { styles["About Us"]="-%20None%20-"; styles["Calendar"]=""; styles["Downloads"]=""; styles["E-Mail"]=""; styles["History"]=""; styles["Jobs"]=""; styles["Links"]=""; styles["News"]=""; styles["Products"]=""; styles["Services"]=""; } function hideIt() { tObj = document.getElementById('mainTable'); if (tObj) { iObj = document.images['fbPlus']; if (iObj) { if (iObj.src.indexOf('plus') > -1) { iObj.src = '/flexiref.nsf/sm-minus.gif'; } else { iObj.src = '/flexiref.nsf/sm-plus.gif'; } for (var i = 0; i < tObj.rows.length;i++) { if (tObj.rows[i].cells[0].id.indexOf('btnrow') > -1) { if(tObj.rows[i].style.display == 'none') { tObj.rows[i].style.display = ''; } else { tObj.rows[i].style.display = 'none'; } } } } } } function loaded() { document.ThePage.BodyEdit.value = cleanUp(document.ThePage.Body.value); if (document.ThePage.calDates) { tmp = document.ThePage.calDates.value; document.ThePage.webCalDates.value = implodeDates(tmp); } } function cleanUp(theSource) { var tmp = theSource; // Strip opening [ and closing ] if found if (tmp.charAt(0) == "[") tmp = tmp.substring(1, tmp.length); if (tmp.charAt(tmp.length-1) == "]") tmp = tmp.substring(0, tmp.length-1); // Strips unnecessary comment breaks var h = tmp.indexOf('',h); var ok = true; var tmp2 = tmp.substring(h,j) if (tmp2.length <= 9) ok = false; if (!ok) { var tmp3 = ""; if (j > tmp.length - 4) { tmp3 = tmp.substring(0,h); } else { tmp3 = tmp.substring(0,h) + tmp.substring(j + 3,tmp.length); } tmp = tmp3; } else { h += 3; } h = tmp.indexOf(''; lastCR = rebuiltText.length; } } } return rebuiltText; } function applyClick () { var passedValidation = false; if (document.ThePage.pageType) { passedValidation = validate(); } else { passedValidation = validate2(); } if (passedValidation) { if (document.ThePage.pageType) { endLimitCheck(); } document.ThePage.Apply.text = 'Applied'; document.ThePage.Apply.value = 'Applied'; var tmp = cleanUp(document.ThePage.BodyEdit.value); tmp = insertLineBreaks(tmp); tmp = prepForSubmit(tmp); document.ThePage.Body.value = tmp; document.ThePage.submit(); } } function prepForSubmit(tmp) { if (tmp.charAt(0) == "<") { } else { tmp = ""+tmp; } tmp = "["+tmp; if (tmp.charAt(tmp.length-1) != ">") { tmp+=""; } tmp+="]"; if (tmp.length == 12 && tmp.indexOf('