// ***** -------------- ***** // ***** htmlDyn.js ***** // ***** -------------- ***** function updateAll(newCountry, objOldCountry, objState, objZip, config) { config = config.replace(/\~/g, "'"); config = config.replace(/\|/g, '"'); var oldCountry = objOldCountry[0].value; if (((oldCountry == 'USA') && (newCountry == 'USA')) || ((oldCountry != 'USA') && (newCountry != 'USA'))) { config += ' STATE.VALUE="' + objState[0].value + '"'; if(objZip != '') { var zip; if(newCountry == 'USA') { zip = objZip[0].value + '-' + objZip[1].value; } else { zip = objZip[0].value; } zip = zip.replace(/\"/g, '"'); config += ' ZIP.VALUE="' + zip + '"'; } } objOldCountry[0].value = newCountry; var url = '/ajax/htmlDyn?' + Math.random() + '&ACTION=6&COUNTRY=' + newCountry + '&CONFIG=' + escape(config); htmlList4Ajax(outputData, url); } function outputData(res) { var pieces = res.split('|'); var uniq = pieces[0]; //alert('stateLabel_' + uniq); document.getElementById('stateLabel_' + uniq).innerHTML = pieces[1]; document.getElementById('stateElement_' + uniq).innerHTML = pieces[2]; if(pieces.length > 3) { document.getElementById('zipLabel_' + uniq).innerHTML = pieces[3]; document.getElementById('zipElement_' + uniq).innerHTML = pieces[4]; } } // ***** --------------------------- ***** // ***** ajax.aw.html.list.v4.js ***** // ***** --------------------------- ***** /************************************************************************ * * Title: htmlList4Ajax() * Category: AJAX * File Name: ajax.js * WEB URL: * Created By: TAKE * Created Date: 2006-03-13 * Language: JavaScript * Description: Use AJAX(Asynchronous JavaScript + XML) * technology to download files and execute * callback function asynchronously. * * Syntax: htmlList4Ajax(sCallBack, URI, async) * * Parameters: sCallBack - callback function (no quotes) * URI - any URI where the source exists. * * Example: /example/ajax * * Browsers that support Ajax * -------------------------- * (Note that this is a general list, and support of Ajax * applications will depend on the features the browser supports.) * * Microsoft Internet Explorer version 5.0 and above, and browsers * based on it (Mac OS versions not supported) * Gecko-based browsers like Mozilla, Mozilla Firefox, SeaMonkey, * Epiphany, Galeon and Netscape version 7.1 and above * Browsers implementing the KHTML API version 3.2 and above, * including Konqueror version 3.2 and above, and Apple Safari * version 1.2 and above * Opera browsers version 8.0 and above, including Opera Mobile * Browser version 8.0 and above * (Reference: http://en.wikipedia.org/wiki/Ajax_%28programming%29) * * (Mac OS X 10.3 is required for the Apple Safari 1.2) * ***********************************************************************/ var AJAX_bPageLoaded = false; var AJAX_aCallBack = Array(); var AJAX_aRtnText = Array(); // --------------------------------------------------------- // function (htmlListAjax) // - your JavaScript program calls this function // --------------------------------------------------------- function htmlList4Ajax(sCallBack, sUri, bAsync, sParam) { var oAjax = createHttpRequest(); var sBrowser = getBrowser(); if (arguments[2] == null) { bAsync = true; } if (!sParam) { sParam = null; } // --- error messages --- var sError01 = ''; sError01 += 'ERROR: This function does not work on your browser\n\n'; sError01 += 'Please use one of the latest browsers. '; sError01 += 'Some PC compatible browsers: '; sError01 += 'IE5+, Netscape 7.1+, Firefox, etc. '; sError01 += 'MAC users are safe with Netscape or Firefox. '; sError01 += 'These are all free downloads!'; // --- unknown browser --- if (!oAjax) { alert(sError01); return false; } // --- callback function ------------------------------- // "oAjax.onload" is safer for opera, mozilla, konqueror // "oAjax.onload" does not work on IE // ----------------------------------------------------- switch (sBrowser) { case 'IE': oAjax.onreadystatechange = function(){ if (oAjax.readyState == 4 && oAjax.status == 200) { // --- session check --- var mixRtnValue = ''; if (oAjax.responseText.indexOf(" -1) { mixRtnValue = oAjax.responseXML; } else { mixRtnValue = oAjax.responseText; mixRtnValue = removeChar10(mixRtnValue); // see the definition if (mixRtnValue.indexOf('Log In Credentials')>-1){ mixRtnValue = 'ERROR: Session Timed Out.' } } if (sCallBack) { if (AJAX_bPageLoaded == true) { sCallBack(mixRtnValue); } else { AJAX_aCallBack.push(sCallBack); AJAX_aRtnText.push(mixRtnValue); } } } } break; default: oAjax.onload = function(){ // --- session check --- var mixRtnValue = ''; if (oAjax.responseText.indexOf(" -1) { var mixRtnValue = oAjax.responseXML; } else { var mixRtnValue = oAjax.responseText; mixRtnValue = removeChar10(mixRtnValue); // see the definition if (mixRtnValue.indexOf("Log In Credentials")>-1){ mixRtnValue = 'ERROR: Session Timed Out.' } } if (sCallBack) { sCallBack(mixRtnValue); } } break; } oAjax.open('POST', sUri, bAsync); oAjax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); oAjax.send(sParam); } function ajaxsubmit(sCallBack, sFormId, bAsync) { if (arguments[2] == null) { bAsync = true; } if (!sFormId) { sFormId = ''; } var aVar = Array(); var aVal = Array(); // --- input elements --- var cInput = document.getElementsByTagName('input'); for (var i=0; i -1) { mixRtnValue = oAjax.responseXML; } else { mixRtnValue = oAjax.responseText; mixRtnValue = removeChar10(mixRtnValue); // see the definition if (mixRtnValue.indexOf('Log In Credentials')>-1){ mixRtnValue = 'ERROR: Session Timed Out.' } } if (sCallBack) { if (AJAX_bPageLoaded == true) { sCallBack(mixRtnValue); } else { AJAX_aCallBack.push(sCallBack); AJAX_aRtnText.push(mixRtnValue); } } } } break; default: oAjax.onload = function(){ // --- session check --- var mixRtnValue = ''; if (oAjax.responseText.indexOf(" -1) { var mixRtnValue = oAjax.responseXML; } else { var mixRtnValue = oAjax.responseText; mixRtnValue = removeChar10(mixRtnValue); // see the definition if (mixRtnValue.indexOf("Log In Credentials")>-1){ mixRtnValue = 'ERROR: Session Timed Out.' } } if (sCallBack) { sCallBack(mixRtnValue); } } break; } oAjax.open('POST', sUri, bAsync); oAjax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); oAjax.send(sParam); } function ajaxsubmit(sCallBack, sFormId, bAsync) { if (arguments[2] == null) { bAsync = true; } if (!sFormId) { sFormId = ''; } var aVar = Array(); var aVal = Array(); // --- input elements --- var cInput = document.getElementsByTagName('input'); for (var i=0; i and z-index // --------------------------------------------------------------------- function setShim(){ // in the rodpsupopup.js file // --- move shim --- oWinTable = document.getElementById('wintable'); oShim = document.getElementById('shim'); aArea = getElementArea(oWinTable); oShim.style.left = oWinTable.style.left; oShim.style.top = oWinTable.style.top; oShim.style.width = aArea[0] + 'px'; oShim.style.height = aArea[1] + 'px'; } // ******************************************************************** // getOffset() // ******************************************************************** function getOffset(evt){ // in the rodpsupopup.js file obj = document.getElementById('wintable'); if (document.all) { iOffsetX = event.offsetX + 2; iOffsetY = event.offsetY + 2; } else { iOffsetX = evt.pageX - parseInt(obj.style.left); iOffsetY = evt.pageY - parseInt(obj.style.top); } return 0; } var gText = ''; // ******************************************************************** // psupopup() // ******************************************************************** function psupopup(sContent, sTitle, sButton, sPos, bModal, sWinClass, bForceClose, bEncode, bIframe) { // in the rodpsupopup.js file // --- set defaults --- if (!sContent) sContent = ''; if (!sTitle) sTitle = 'Pittsburg State University - Pittsburg, KS'; if (!sButton) sButton = ''; if (!sPos) sPos = ''; if (!bModal) bModal = ''; if (!sWinClass) sWinClass = ''; if (!bEncode) bEncode = ''; if (!bIframe) bIframe = ''; // ---------------------------------------------------------------- // set the behavior of when user clicks on outside of popup window // ---------------------------------------------------------------- if (bForceClose) { bForceCloseFlag = true; } else { bForceClose = false; } // --- build close button --- var sHtmlButton = ''; if (sButton) { sHtmlButton += '

'; sHtmlButton += '
'; sHtmlButton += ' --- var sPopupStyle = ''; if (bIframe) { sPopupStyle = 'iframe'; } else { if (sContent.substring(0,1) == '/' || sContent.substring(0,4) == 'http') { sPopupStyle = 'ajax' } else { sPopupStyle = 'direct' } } // --- build content depended on its popup style <2010-01-26 TAKE> --- var sUrl = sContent; switch (sPopupStyle){ case 'iframe': sContent = ''; sContent += '' break; case 'ajax': ajax_psupopup(setContent, sContent, false); sContent = gText; break; default: if (bEncode) { sContent = Base64.decode(sContent) } } // --- build title bar <2009-11-16 TAKE> --- var sHtmlTitlebar = ''; if (sTitle != 'none') { sHtmlTitlebar += ' iViewableX) { iStyleLeft = iMouseX - oWinTable.clientWidth; if (iStyleLeft < 0) { iStyleLeft = 0; } } else { iStyleLeft = iMouseX; } var iStyleTop = ''; if (iCornerBottom > iViewableY) { iStyleTop = iMouseY - oWinTable.clientHeight; if (iStyleTop < 0) { iStyleTop = 0; } } else { iStyleTop = iMouseY; } oPopup.style.left = iStyleLeft + 'px'; oPopup.style.top = iStyleTop + 'px'; } setShim(); } function setContent(sText){ // in the rodpsupopup.js file gText = sText; } // ********************************************************************* // Created: TAKE <2008-05-21> // removePsuPopup() // ********************************************************************* function removePsuPopup(){ // in the rodpsupopup.js file // --- remove modal block --- var oModal = document.getElementById('modal'); if (oModal) { document.body.removeChild(oModal); } // --- remove psu popup --- var oShim = document.getElementById('shimframe'); if (oShim) { document.body.removeChild(oShim); } var oDiv = document.getElementById('psupopup'); if (oDiv) { document.body.removeChild(oDiv); } bForceCloseFlag = false; } // ********************************************************************* // Created: TAKE <2006-11-22> // // int getMouseX(e) // - return mouse's x position // ********************************************************************* //rt.11.17.11function getMouseX(e){ // in the rodpsupopup.js file //rt.11.04.11 if(window.opera){ //rt.11.04.11 return e.clientX; //rt.11.04.11 } else if(document.all){ //rt.11.04.11 return document.body.scrollLeft + event.x; //rt.11.04.11 } else if(document.layers||document.getElementById){ //rt.11.04.11 return e.pageX; //rt.11.04.11 } //rt.11.04.11 return 0; //rt.11.17.11 myBrowserType = client_Browser_Info.browserPropertyName; //rt.11.17.11 myBrowserVersionNum = client_Browser_Info.browserPropertyMajorVersion; // if (e.pageX == null) //rt.11.17.11 if (myBrowserType == "IE") //rt.11.17.11 { // IE case //rt.11.17.11 var d = (document.documentElement && document.documentElement.scrollLeft != null) ? document.documentElement : document.body; //rt.11.17.11 return e.clientX + d.scrollLeft; //rt.11.17.11 } //rt.11.17.11 else //rt.11.17.11 { // all other browsers //rt.11.17.11 return e.pageX; //rt.11.17.11 } //rt.11.17.11} // ********************************************************************* // Created: TAKE <2006-11-22> // // int getMouseY(e) // - return mouse's y position // ********************************************************************* //rt.11.17.11function getMouseY(e){ // in the rodpsupopup.js file //rt.11.04.11 if(window.opera){ //rt.11.04.11 return e.clientY; //rt.11.04.11 } else if(document.all){ //rt.11.04.11 return document.body.scrollTop + event.y; //rt.11.04.11 } else if(document.layers||document.getElementById){ //rt.11.04.11 return e.pageY; //rt.11.04.11 } //rt.11.04.11 return 0; //rt.11.17.11 myBrowserType = client_Browser_Info.browserPropertyName; //rt.11.17.11 myBrowserVersionNum = client_Browser_Info.browserPropertyMajorVersion; // if (e.pageY == null) //rt.11.17.11 if (myBrowserType == "IE") //rt.11.17.11 { // IE case //rt.11.17.11 var d = (document.documentElement && document.documentElement.scrollLeft != null) ? document.documentElement : document.body; //rt.11.17.11 return e.clientY + d.scrollLeft; //rt.11.17.11 } //rt.11.17.11 else //rt.11.17.11 { // all other browsers //rt.11.17.11 return e.pageY; //rt.11.17.11 } //rt.11.17.11} function getViewableArea() { // in the rodpsupopup.js file // --- get viewable size --- var windowWidth, windowHeight; if (self.innerHeight) { // --- all except IE --- if (document.documentElement.clientWidth){ windowWidth = document.documentElement.clientWidth; } else { windowWidth = self.innerWidth; } windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // --- IE6 Strict Mode --- windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // --- other IE --- windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } return [windowWidth, windowHeight]; } // ********************************************************************* // Created By: TAKE // Created Date: 2008-07-07 // ********************************************************************* function getElementArea(oBase) { // in the rodpsupopup.js file // --- partial box --- if (!oBase.clientHeight) { // --------------------------------------- // this is needed for IE to have LAYOUT // --------------------------------------- oBase.style.display = 'inline-block'; } sBoxWidth = oBase.clientWidth; sBoxHeight = oBase.clientHeight; return [sBoxWidth, sBoxHeight]; } // ********************************************************************* // addEvent() // Created Date: 2008-10-15 // ********************************************************************* function addEvent(obj, act, func){ // in the rodpsupopup.js file if (obj.addEventListener){ obj.addEventListener(act, func, false); } else { obj.attachEvent('on' + act, func); } } function removeEvent(obj, act, func){ // in the rodpsupopup.js file if (obj.addEventListener){ obj.removeEventListener(act, func, false); } else { obj.detachEvent('on' + act, func); } } // ******************************************************************************* // // Language: JavaScript // Modified By: TAKE // Description: Adjust iframe depended on the size of the contents. // Original: yomotsu-net // http://www.yomotsu.net/lab/javascripts/iframe-height // // ******************************************************************************* function iframeHeight(){ // in the rodpsupopup.js file var oFrame = document.getElementById('psupopupframe'); if (!oFrame) { return 0; } var oContent = oFrame.contentWindow; if (!oContent) { setTimeout('iframeHeight()',750); return 0;} if (navigator.userAgent.indexOf('MSIE') > -1) { oContent.document.styleSheets[0].addRule('html', '{overflow:hidden;}'); } else { if (!oContent.document.styleSheets[0]) { // if it falls in here, check if the code is full HTML or not. return 0; } oContent.document.styleSheets[0].insertRule('html' + '{overflow:hidden;}', oContent.document.styleSheets[0].cssRules.length); } var height = oContent.document.getElementsByTagName('html')[0].offsetHeight; oFrame.style.height = height + 'px'; setTimeout('iframeHeight()',750) } // in the rodpsupopup.js file // ------------------------------------- // *** ERROR! // *** An error occurred in "/jsbundle" // *** The error id is: "s3ARuKhPyjrcs9" // *** ""zip.js" was not found. // ------------------------------------- // ***** ----------- ***** // ***** ajax.js ***** // ***** ----------- ***** /************************************************************************ * * Title: ajax() * Category: AJAX * File Name: ajax.js * WEB URL: * Created By: TAKE * Created Date: 2006-03-13 * Language: JavaScript * Description: Use AJAX(Asynchronous JavaScript + XML) * technology to download files and execute * callback function asynchronously. * * Syntax: ajax(sCallBack, URI, async) * * Parameters: sCallBack - callback function (no quotes) * URI - any URI where the source exists. * * Example: /example/ajax * * Browsers that support Ajax * -------------------------- * (Note that this is a general list, and support of Ajax * applications will depend on the features the browser supports.) * * Microsoft Internet Explorer version 5.0 and above, and browsers * based on it (Mac OS versions not supported) * Gecko-based browsers like Mozilla, Mozilla Firefox, SeaMonkey, * Epiphany, Galeon and Netscape version 7.1 and above * Browsers implementing the KHTML API version 3.2 and above, * including Konqueror version 3.2 and above, and Apple Safari * version 1.2 and above * Opera browsers version 8.0 and above, including Opera Mobile * Browser version 8.0 and above * (Reference: http://en.wikipedia.org/wiki/Ajax_%28programming%29) * * (Mac OS X 10.3 is required for the Apple Safari 1.2) * ***********************************************************************/ var AJAX_bPageLoaded = false; var AJAX_aCallBack = Array(); var AJAX_aRtnText = Array(); // --------------------------------------------------------- // function (ajax) // - your JavaScript program calls this function // --------------------------------------------------------- function ajax(sCallBack, sUri, bAsync, sParam) { var oAjax = createHttpRequest(); var sBrowser = getBrowser(); if (arguments[2] == null) { bAsync = true; } if (!sParam) { sParam = null; } // --- error messages --- var sError01 = ''; sError01 += 'ERROR: This function does not work on your browser\n\n'; sError01 += 'Please use one of the latest browsers. '; sError01 += 'Some PC compatible browsers: '; sError01 += 'IE5+, Netscape 7.1+, Firefox, etc. '; sError01 += 'MAC users are safe with Netscape or Firefox. '; sError01 += 'These are all free downloads!'; // --- unknown browser --- if (!oAjax) { alert(sError01); return false; } // --- callback function ------------------------------- // "oAjax.onload" is safer for opera, mozilla, konqueror // "oAjax.onload" does not work on IE // ----------------------------------------------------- switch (sBrowser) { case 'IE': oAjax.onreadystatechange = function(){ if (oAjax.readyState == 4 && oAjax.status == 200) { // --- session check --- var mixRtnValue = ''; if (oAjax.responseText.indexOf(" -1) { mixRtnValue = oAjax.responseXML; } else { mixRtnValue = oAjax.responseText; mixRtnValue = removeChar10(mixRtnValue); // see the definition if (mixRtnValue.indexOf('Log In Credentials')>-1){ mixRtnValue = 'ERROR: Session Timed Out.' } } if (sCallBack) { if (AJAX_bPageLoaded == true) { sCallBack(mixRtnValue); } else { AJAX_aCallBack.push(sCallBack); AJAX_aRtnText.push(mixRtnValue); } } } } break; default: oAjax.onload = function(){ // --- session check --- var mixRtnValue = ''; if (oAjax.responseText.indexOf(" -1) { var mixRtnValue = oAjax.responseXML; } else { var mixRtnValue = oAjax.responseText; mixRtnValue = removeChar10(mixRtnValue); // see the definition if (mixRtnValue.indexOf("Log In Credentials")>-1){ mixRtnValue = 'ERROR: Session Timed Out.' } } if (sCallBack) { sCallBack(mixRtnValue); } } break; } oAjax.open('POST', sUri, bAsync); oAjax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); oAjax.send(sParam); } function ajaxsubmit(sCallBack, sFormId, bAsync) { if (arguments[2] == null) { bAsync = true; } if (!sFormId) { sFormId = ''; } var aVar = Array(); var aVal = Array(); // --- input elements --- var cInput = document.getElementsByTagName('input'); for (var i=0; i