function toggle (x) { document.getElementById(x).style.display = document.getElementById(x).style.display == "none" ? "block" : "none"; document.getElementById(x).blur(); } function setValue (elementID, value) { document.getElementById (elementID).value = value; } function confirmAction (message) { var agree = confirm (message); if (agree) return true; else return false; } function catcalc (cal) { var date = cal.date; //get date var time = date.getTime (); //get time var endField = document.getElementById ("dateEnd"); var startField = document.getElementById ("dateStart"); if (endField == cal.params.inputField) { endField = document.getElementById ("dateStart"); time -= Date.HOUR; } else //if (startField == '') { time += Date.HOUR; } var date2 = new Date (time); endField.value = date2.print ("%Y-%m-%d %H:%M"); } function toggleChecked (button, field) { if (button.value == 'Select All') { for (i = 0; i < field.length; i++) { field [i].checked = true; } button.value = 'Deselect All'; } else { for (i = 0; i < field.length; i++) { field [i].checked = false; } button.value = 'Select All'; } } function uncheckAll (field) { for (i = 0; i < field.length; i++) { field [i].checked = false; } } function checkLen (Target, tally) { StrLen = Target.value.length; if (StrLen > tally) { Target.value = Target.value.substring (0,tally); charsLeft = 0; } else charsLeft = tally - StrLen; document.getElementById ("characters").innerHTML = charsLeft; } function goTo (page) { /* This function is called from the navigation menu to jump to the designated URL. Empty values are ignored and "--" indicates a menu seperator */ if (page != "" ) { if (page == "--" ) { resetMenu(); } else { document.location.href = page; } } return false; } function resetMenu () { /* Resets the menu to the specified menu item */ document.gmenu.page.options[0].selected = true; } function rash (msg) { var rashBox = document.getElementById("rashbox"); var rashTxt = document.getElementById("rashtxt"); if (msg) { rashTxt.innerHTML = msg; rashBox.style.top = 180+"px"; rashBox.style.left = 500+"px"; rashBox.style.display = "block"; window.setTimeout("rash()",1700); } else { rashBox.style.display = "none"; } } function setIndicator (content) { document.getElementById('indicator').style.display = 'none'; document.getElementById('indicator').innerHTML = content; elementAppear ('indicator'); } function elementFade (elementID) { new Effect.Fade(document.getElementById(elementID)); } function elementAppear (elementID) { new Effect.Appear(document.getElementById(elementID)); } function indicatorCycle () { xajax_getNewIndicator(); setTimeout('indicatorCycle ();', 10000); } function validateTerms () { } function searchInit (linkType, withinGroup, loadingElementID, targetDivID, searchFormID) { showLoading (loadingElementID); xajax_performEntitySearch (linkType, withinGroup, loadingElementID, targetDivID, xajax.getFormValues (searchFormID)); // hideLoading (loadingElementID); } function showLoading (loadingElementID) { document.getElementById(loadingElementID).innerHTML = ''; } function hideLoading (loadingElementID) { document.getElementById(loadingElementID).innerHTML = ''; } function leadingZero(nr) { if (nr < 10) nr = "0" + nr; return nr; } function loadSkinnyTypes (broadCatID) { //div skinnyTypes showLoading ('skinnyTypes'); xajax_loadSkinnies (broadCatID); } function dialogY () { return (calY/2)+(tempY/2); } function dialogX () { return ((calWidth/2)+calX)-200; //return tempX; }