var xmlHttp; function getXMLHTTP() { var A = null; try { A = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { A = new ActiveXObject("Microsoft.XMLHTTP"); } catch(oc) { A = null; } } if (!A && typeof XMLHttpRequest != "undefined") { A = new XMLHttpRequest(); } return A; } function doQuery (queryString, senddata, hideload) { if (!hideload) Loading(); searching = true; if (xmlHttp && xmlHttp.readyState != 0) { xmlHttp.abort() } xmlHttp=getXMLHTTP(); if (xmlHttp) { xmlHttp.open("POST", queryString, true); xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4 && xmlHttp.responseText && searching) { try { eval(xmlHttp.responseText); } catch(e) { errorWindow=window.open("", "", "height=500, width=600,toolbar=no,scrollbars=yes,menubar=no,resizable=yes"); errorWindow.document.write(xmlHttp.responseText); } searching = false; } } if (senddata) { senddata = senddata.split(' ') stub = ''; for (var i=0;i < senddata.length;i++) { var fld = senddata[i]; stub += fld + '=' + document.getElementById(fld).value + '&'; } xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlHttp.send(stub); } else xmlHttp.send(null); } } function Loading() { d = document.getElementById('loading'); if (window.scrollY) scr = window.scrollY; else if (document.documentElement.scrollTop) scr = document.documentElement.scrollTop; else scr = 0; d.style.top = scr+80 + 'px'; document.getElementById('loading').style.visibility = 'visible'; } function Reposition() { if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW = document.documentElement.clientWidth; winH = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.documentElement.clientWidth; winH = document.documentElement.clientHeight; } } d = document.getElementById('ajaxpop'); LI = d.getElementsByTagName('div'); maxwidth = 100; for(i=0; i < LI.length; i++) { w = parseFloat(LI[i].style.width); if (w > maxwidth) maxwidth = w; } h = document.getElementById('reposimg').offsetTop-10; if (h < 0) h = 50; d.style.width = maxwidth+'px'; d.style.height = h+'px'; d.style.left = parseInt((winW-maxwidth)/2) + 'px'; if (window.scrollY) scr = window.scrollY; else if (document.documentElement.scrollTop) scr = document.documentElement.scrollTop; else scr = 0; stub = parseInt((winH-h)/2+scr); d.style.top = stub + 'px'; } function findPosX(e) { var posx = 0; if (!e) var e = window.event; if (e.pageX) posx = e.pageX; else if (e.clientX) posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; return posx; } function findPosY(e) { var posx = 0; if (!e) var e = window.event; if (e.pageY) posy = e.pageY; else if (e.clientY) posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; return posy; } whichDog = 0; function ddInit(e, divname) { whichDog = document.getElementById(divname); offsetx = findPosX(e); offsety = findPosY(e); nowX = parseInt(whichDog.style.left); nowY = parseInt(whichDog.style.top); ddEnabled=true; document.onmousemove = dd; } function dd(e) { if (!ddEnabled) return; whichDog.style.left = (nowX+findPosX(e)-offsetx)+'px'; whichDog.style.top = (nowY+findPosY(e)-offsety)+'px'; return false; } document.onmouseup = Function("ddEnabled=false");