/*********************************************************************************************************** * MODULE: JSDefault.js * Author: Christopher Sheldon [ MicroAge Consulting Services ] * Web: [ http://www.microagesolutions.com ] * Notes: Do not reproduce or distribute this code without express permission from MicroAge IT Solutions. **/ /*********************************************************************************************************** * FUNCTION: fImageSwap(sThisName, sThisURL) * NOTES: Swaps the image named sThisName with the image specified by sThisURL. **/ function fImageSwap(sThisName, sThisURL) { document.images[sThisName].src = sThisURL; } /*********************************************************************************************************** * FUNCTION: fSetCookie(sCookieName, sCookieValue, sCookieExpires, sCookiePath, sCookieDomain, sCookieSecure) * NOTES: Sets client cookie. sCookieName and sCookieValue are required, other parameters are optional. **/ function fSetCookie(sCookieName, sCookieValue, sCookieExpires, sCookiePath, sCookieDomain, sCookieSecure) { document.cookie = sCookieName + '=' + escape(sCookieValue) + // cookie data string ((sCookieExpires) ? ';expires=' + sCookieExpires.toGMTString() : '') + // cookie expiry date ((sCookiePath) ? ';path=' + sCookiePath : '') + // cookie path ((sCookieDomain) ? ';domain=' + sCookieDomain : '') + // cookie domain ((sCookieSecure) ? ';secure' : ''); // cookie secure } /*********************************************************************************************************** * FUNCTION: fGetCookie(sCookieName) * NOTES: Gets cookie string for sCookieName. * RETURNS: Cookie string or null if no cookie found. **/ function fGetCookie(sCookieName) { var iStart = document.cookie.indexOf(sCookieName + '='); var iLength = iStart + sCookieName.length + 1; if ((!iStart) && (sCookieName != document.cookie.substring(0, sCookieName.length))) return null; if (iStart == -1) { return null; } var iEnd = document.cookie.indexOf(';', iLength); if (iEnd == -1) { iEnd = document.cookie.length; } return unescape(document.cookie.substring(iLength, iEnd)); } /*********************************************************************************************************** * FUNCTION: fOnResize(); * NOTES: Call onResize function for all dHTML modules. **/ function fOnResize() { if(!document.all && document.getElementById) { document.getElementById('ns').style.top = window.innerHeight; } // Call onResize function for used modules if(bCNM) { fCNMOnResize(); } if(bECM) { fECMPositionElements(); } if(bOSM) { fOSMPositionObject(); } } /*********************************************************************************************************** * FUNCTION: fOnLoad(); * NOTES: Call onLoad function for all dHTML modules. **/ function fOnLoad() { if(!document.all && document.getElementById) { document.body.innerHTML += '