var browserType; if (document.all) { browserType = 'ie'; } else { browserType = 'm6'; } var timesHidden = 0; var HIDE_ON_MENU = new Array(); var hiddenFormElements = new Array(); var phone_field_length=0; function TabNext(obj,event,len,next_field) { if (event == "down") { phone_field_length=obj.value.length; } else if (event == "up") { if (obj.value.length != phone_field_length) { phone_field_length=obj.value.length; if (phone_field_length == len) { next_field.focus(); } } } } function hideFormElements () { timesHidden++; for (var i in HIDE_ON_MENU) { var obj = getElement(i); if (isDef(obj)) { obj.style.visibility = 'hidden'; } } hiddenFormElements = new Array(); for (var j=0; j' + 'mouse: ' + iX + ',' + iY; } function captureMouse () { if (document.all) { document.onmousemove = msMouseMove; smooveness = 0; } else { document.onmousemove = nsMouseMove; smooveness = 6; } } function msMouseMove () { iX = window.event.clientX + document.body.scrollLeft; iY = window.event.clientY + document.body.scrollTop; return generalMouseMove(); } function nsMouseMove (e) { iX = e.pageX; iY = e.pageY; return generalMouseMove(); } function captureDrag () { captureMouse(); document.onmouseup = generalMouseUp; document.onmousedown = generalMouseDown; } function generalMouseMove () { if (canDrag) { dragOldX = iX; dragOldY = iY; } if (altText) { showAltText(); } if (isDragging) { hasDragged = 1; if (rotator == smooveness) { dragShowX = iX - dragOffX; dragShowY = iY - dragOffY; var obj = getElement('menu'); obj.style.left = dragShowX; obj.style.top = dragShowY; rotator = 0; } else { rotator++; } return false; } if (setCapture.length) { return eval(setCapture + '();'); } } function generalMouseUp (e) { isDragging = 0; if (setUp.length) { eval(setUp + '();'); } } function generalMouseDown (e) { if (dragOldX == iX && dragOldY == iY) { isDragging = 1 dragOffX = iX - dragShowX; dragOffY = iY - dragShowY; if (setClick.length) { return eval(setClick + '();'); } else { return false; } } else { if (setClick.length) { return eval(setClick + '();'); } return true; } } function willDrag () { canDrag = 1; } function wontDrag () { canDrag = 0; } var currentMenuName = ''; var openMenu = 0; function showMenu (titleName, html, hideId) { hideFormElements(); changeMenu(titleName, html); var obj = getElement('menu'); openMenu = 1; if (! hasDragged) { var xPosition = menuXPosition(); var yPosition = menuYPosition(); obj.style.left = xPosition; obj.style.top = yPosition; dragShowX = xPosition; dragShowY = yPosition; } showSpan(dragSpan); } function changeMenu (titleName, html) { currentMenuName = titleName; var title = getElement('menuTitle'); var body = getElement('menuBody'); var htmlobj = getElement(html); if (htmlobj) { body.innerHTML = htmlobj.innerHTML; } else if (! isUndef(html)) { body.innerHTML = html; } if (! isUndef(titleName)) { title.innerHTML = titleName; } } function closeMenu () { showFormElements(); currentMenuName = ''; hasDragged = 0; openMenu = 0; var obj = getElement(dragSpan); hideSpan(dragSpan); draggedX = draggedY = 0; if (setOnClose.length) { eval(setOnClose + '();'); } showFormElements(); } function menuXPosition () { var menu = getElement('menu'); var windowWidth = getWindowWidth(); var menuWidth = menu.offsetWidth; var menuXPosition; if (iX + 25 + menuWidth > windowWidth) { menuXPosition = iX - menuWidth - 1; if (menuXPosition < 0) { noArrow = 1; menuXPosition = 0; } } else { menuXPosition = iX + 1; } return menuXPosition; } function menuYPosition () { var menu = getElement('menu'); var windowHeight = getWindowHeight(); var menuHeight = menu.offsetHeight; var menuYPosition; if (iY + 10 + menuHeight > windowHeight) { menuYPosition = iY - menuHeight - 1; if (menuYPosition < 0) { noArrow = 1; menuYPosition = 0; } } else { menuYPosition = iY + 1; } return menuYPosition; } function getWindowWidth () { if (window.innerWidth) { return window.innerWidth + window.pageXOffset; } else { return document.body.clientWidth + document.body.scrollLeft; } } function getWindowHeight () { if (window.innerHeight) { return window.innerHeight + window.pageYOffset; } else { return document.body.clientHeight + document.body.scrollTop; } } function showAltText () { var obj = getElement(altTextName); var top = iY + 20; var left = iX - 50; if ((left + 350) > document.width) { left = document.width - 350; } obj.style.top = top; obj.style.left = left; obj.style.visibility = 'visible'; } function altTextIn (divName) { altText = 1; altTextName = divName; } function altTextOut () { var obj = getElement(altTextName); obj.style.visibility = 'hidden'; altText = 0; divName = ''; } function smallPopup(url,name,x,y) { if (isUndef(name)) { name = 'MiniPopup'; } if (x == undefined) { x = 650; } if (y == undefined) { y = 500; } var pop = window.open(url, name, 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,' + 'resizable=1,width=' + x + ',height=' + y); if (isDef(pop)) { pop.focus(); } } function progressPopup(url) { var name = 'WorkPopup'; var x = 300; var y = 300; window.open(url, name, 'toolbar=0,location=0,directories=0,status=0,scrollbars=1,' + 'resizable=1,width=' + x + ',height=' + y); window.focus(); } var iMainTableH = 0; var iMainTableW = 0; function resizeToTable (tableName) { // var obj = getElement('detectTableWidth'); // window.resizeTo(obj.width + 50, 500); } function parseImage (imageString, ws) { var image = imageString.split(':2:'); var imageHash = new Array(); imageHash['filename'] = image[0]; imageHash['path'] = image[1]; imageHash['url'] = image[2]; imageHash['category'] = image[3]; if (image[3]) { imageHash['quickUrl'] = image[3] + "/" + image[0]; } else { imageHash['quickUrl'] = image[1] + "/" + image[0]; } return imageHash; } var hIds = new Array(); function hideIds () { alert('hide ids depricated'); } function showIds () { alert('show ids depricated'); } var iStatus = ''; var iStatusSpan = ''; var iStatusFirst = 0; var iStatusNext = 0; function setIStatus (spanId, string, first, next) { iStatusSpan = spanId; iStatus = string; if (isDef(first)) { iStatusFirst = first; } if (isDef(next)) { iStatusNext = next; } var obj = getElement(iStatusSpan); obj.innerHTML = iStatus; var timeout = iStatusFirst ? iStatusFirst : 1200; iStatusFirst = 0; //setTimeout('delIStatus()', timeout); } function delIStatus() { if (iStatus.length==0) { iStatusNext = 0; return; } var timeout = iStatusNext ? iStatusNext : 30; iStatus = iStatus.substring(0, iStatus.length - 1); var obj = getElement(iStatusSpan); obj.innerHTML = iStatus; setTimeout('delIStatus()', timeout); } function setSelectBox (formName, fieldName, data, dflt) { var elem = eval(formName + '.' + fieldName); elem.length = data.length; for (var i=0; i