// JavaScript Document var ie5 = (document.getElementById && document.all); var ns6 = (document.getElementById && !document.all); var ua = navigator.userAgent.toLowerCase(); var isapple = (ua.indexOf('applewebkit') != -1 ? 1 : 0); document.onmousemove=mouseMove; document.onscroll=exit; function test(text) { alert(text); } function mouseMove(e) { //debugAppend(' - mouseMove'); /* getmouseposition(e); mouseOverElement(e); */ moveTT(e); } function show(elementID, content) { //if(navigator.javaEnabled()) { if(!document.getElementById(elementID)) return; var inputElem = document.getElementById(elementID); if( typeof content != 'undefined') inputElem.innerHTML = content; inputElem.style.display = "block"; //alert('Show: '+elementID) //alert(myForm+', '+elementID+', '+elementVal+' :: '+inputElem.value) //} } function hide(elementID) { //alert('hide('+elementID+')'); //if(navigator.javaEnabled()) { if(!document.getElementById(elementID)) return; var inputElem = document.getElementById(elementID).style inputElem.display = "none" //alert('Hide: '+elementID) //} } function setInnerHtml(elementID, val) { //if(navigator.javaEnabled()) { var elem = document.getElementById(elementID); if(!elem) return; elem.innerHTML = val; //} } function setImgSrc(elementID, src) { var elem; if(!(elem =document.getElementById(elementID))) return; //alert("setClass: "+elementID+"="+newClass); elem.src = src; return elem; } function addClass(elementID, classStr) { if(!document.getElementById(elementID)) return; //alert("setClass: "+elementID+"="+newClass); var elem = document.getElementById(elementID); addElemClass(elem, classStr); } function addElemClass(elem, classStr) { //if(navigator.javaEnabled()) { var regEx = new RegExp(classStr, "g"); elem.className = elem.className.replace(regEx, '') + " " + classStr; //alert(myForm+', '+elementID+', '+elementVal+' :: '+inputElem.value) //} } function removeClass(elementID, classStr) { //debug('
removeClass('+elementID+','+classStr+')'); if(!document.getElementById(elementID)) return; //alert("setClass: "+elementID+"="+newClass); var elem = document.getElementById(elementID); //debug('
removeClass('+elementID+','+classStr+')'); removeElemClass(elem, classStr); } function removeElemClass(elem, classStr) { //if(navigator.javaEnabled()) { var regEx = new RegExp(classStr, "g"); elem.className = elem.className.replace(regEx, ''); //alert(myForm+', '+elementID+', '+elementVal+' :: '+inputElem.value) //} } function createNewElement(newid) { if(document.createElement) { var el = document.createElement('div'); el.id = newid; with(el.style) { display = 'none'; //position = 'absolute'; position = 'fixed'; } el.innerHTML = ' '; document.body.appendChild(el); } else { alert("could not create tt"); } } /* function toggleNode(id) { if(!document.getElementById(id+"Content")) return; var elemStyle = document.getElementById(id+"Content").style; //alert(elemStyle.display); if(elemStyle.display == "block") { elemStyle.display = "none"; if(document.getElementById(id+"Control")) { document.getElementById(id+"Control").innerHTML = "+"; } } else { elemStyle.display = "block"; if(document.getElementById(id+"Control")) { document.getElementById(id+"Control").innerHTML = "-"; } } //alert(stateElem); if(document.getElementById(id+"State")) { if(elemStyle.display == "none") { document.getElementById(id+"State").value = ""; } else { document.getElementById(id+"State").value = "1"; } } }*/ /* function nodeIsOpen(id) { if(!document.getElementById(id+"Content")) return 0; var elemStyle = document.getElementById(id+"Content").style; //alert(elemStyle.display); if(elemStyle.display == "block") { return 1; } else { return 0; } } */ function showPopup(html, className, title) { if(!document.getElementById('popup')) createNewElement('popup'); var popupElem = document.getElementById('popup'); // Add window controls if(typeof title == 'undefined') title = ''; var js = 'onclick="javascript: hidePopup()"'; var content = ''; // Insert the html popupElem.innerHTML = content; if(className.length>0) { popupElem.className = 'popup '+className; } else { popupElem.className = 'popup'; } popupElem.style.display = 'block'; } function hidePopup() { if(!document.getElementById('popup')) return; document.getElementById('popup').style.display = 'none'; } function showEmail(emailNumber) { emailID = "ssEmail_"+emailNumber; lastEmailID = "ssEmail_"+lastEmailNumber; if(lastEmailElem = document.getElementById(lastEmailID)) { lastEmailElem.style.display = "none"; } if(emailElem = document.getElementById(emailID)) { emailElem.style.display="block"; } lastEmailNumber = emailNumber; } /** * Window size script by Tudor Barbu (tudor@it-base.ro) * * You can use it for free as long as you keep my copyright * notice intact. Thank you! * */ /** * returns a hashtable (array): * * width : the width of the viewport * height : the height of the viewport * vScroll : the vertical scroll * hScroll : the horizontal scroll * totalWidth : the width of the page * totalHeight : the height of the page */ window.getSize = function() { var width = 0, height = 0, vScroll = 0, hScroll = 0, tWidth = 0, tHeight = 0; if ( typeof( window.innerWidth ) == 'number' ) { width = window.innerWidth; height = window.innerHeight; } else { if ( document.documentElement && document.documentElement.clientWidth ) { width = document.documentElement.clientWidth; height = document.documentElement.clientHeight; } else { if ( document.body && document.body.clientWidth ) { width = document.body.clientWidth; height = document.body.clientHeight; } } } if( document.body && ( document.body.scrollTop || document.body.scrollLeft ) ) { vScroll = document.body.scrollTop; hScroll = document.body.scrollLeft; } else { if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { vScroll = document.documentElement.scrollTop; hScroll = document.documentElement.scrollLeft; } else { if( window.pageYOffset ) { vScroll = window.pageYOffset; hScroll = window.pageXOffset; } } } var xScroll = 0, yScroll = 0; if(document.body) { if ( window.innerHeight && window.scrollMaxY ) { xScroll = document.body.scrollWidth; yScroll = window.innerHeight + window.scrollMaxY; } else { if (document.body.scrollHeight > document.body.offsetHeight ) { xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } } } tWidth = Math.max( width, xScroll ); tHeight = Math.max( height, yScroll ); return { width: width, height: height, vScroll: vScroll, hScroll: hScroll, totalWidth: tWidth, totalHeight: tHeight }; }