var opened; function whichElement(e) { var targ; if (!e) { var e = window.event; } if (e.target) { targ = e.target; } else if (e.srcElement) { targ = e.srcElement; } if (targ.nodeType == 3) { targ = targ.parentNode; } if (opened && !whichClicked) { unDp(opened); hideMine(opened); opened=''; } whichClicked=false; } function f_clientWidth() { return f_filterResults (window.innerWidth ? window.innerWidth : 0, document.documentElement ? document.documentElement.clientWidth : 0, document.body ? document.body.clientWidth : 0); } function f_clientHeight() { return f_filterResults (window.innerHeight ? window.innerHeight : 0, document.documentElement ? document.documentElement.clientHeight : 0, document.body ? document.body.clientHeight : 0); } function f_scrollLeft() { return f_filterResults (window.pageXOffset ? window.pageXOffset : 0, document.documentElement ? document.documentElement.scrollLeft : 0, document.body ? document.body.scrollLeft : 0); } function f_scrollTop() { return f_filterResults (window.pageYOffset ? window.pageYOffset : 0, document.documentElement ? document.documentElement.scrollTop : 0, document.body ? document.body.scrollTop : 0); } function f_filterResults(n_win, n_docel, n_body) { var n_result = n_win ? n_win : 0; if (n_docel && (!n_result || (n_result > n_docel))) n_result = n_docel; return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result; } var thisone; var myxx; var evt; var thisx; var posx = 0; var posy = 0; function maybeMoveIt (evt, thisone, thisx) { if (!e) var e = (window.event) ? window.event : evt; if (e.pageX || e.pageY) { posx = e.pageX; posy = e.pageY; } else if (e.clientX || e.clientY) { posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } var thisEl=document.getElementById(thisone); thisEl.style.moved=0; if (f_clientWidth() < thisEl.clientWidth) { thisEl.style.right=""; thisEl.style.left=2; thisEl.style.top=posy+19; thisEl.style.moved=1; } else if ((f_clientWidth() - posx) < (thisEl.clientWidth+10)) { thisEl.style.left=""; thisEl.style.right=10; thisEl.style.top=posy+19; thisEl.style.moved=1; } if (f_clientHeight() < thisEl.clientHeight) { thisEl.style.top=2; thisEl.style.moved=1; } else if (((f_clientHeight() + f_scrollTop()) - posy) < (thisEl.clientHeight+10)) { thisEl.style.top=posy-thisEl.clientHeight-10; thisEl.style.moved=1; } if (thisEl.style.moved==0 && !thisEl.style.skipFinalMove) { thisEl.style.right=""; thisEl.style.left=posx+15; thisEl.style.top=thisx.style.top; } } var protectThis, pThis; function protectMe (protectThis, pThis) { var x; if (!protectThis.protected) { x = myFindPos(protectThis); protectThis.protected = document.getElementById(pThis); protectThis.protected.style.position='absolute'; protectThis.protected.width=protectThis.width; protectThis.protected.height=protectThis.height; protectThis.protected.style.left=x[0]; protectThis.protected.style.top=x[1]; protectThis.protected.zIndex=1000; } } function LaunchPop(myurl, myname, mywidth, myheight) { var mywin='toolbar=0,directories=0,menubar=0,scrollbars=1,resizable=0,width=' + mywidth + ',height=' + myheight; window.open(myurl,myname,mywin); } function LaunchPopPlus(myurl, myname, mywidth, myheight, myscroll, myresize) { var mywin='toolbar=0,directories=0,menubar=0,scrollbars=' + myscroll + ',resizable=' + myresize + ',width=' + mywidth + ',height=' + myheight; window.open(myurl,myname,mywin); } var myId1; function showMine(myId1) { document.getElementById(myId1).style.display='none'; document.getElementById(myId1).style.visibility='hidden'; document.getElementById(myId1).style.display='block'; document.getElementById(myId1).style.visibility='visible'; } function myhideMine(myId1) { if (document.getElementById(myId1).clicked != 1) { document.getElementById(myId1).style.display='none'; document.getElementById(myId1).style.visibility='hidden'; } } function hideMine(myId1) { if (document.getElementById(myId1).clicked != 1) { document.getElementById(myId1).style.display='none'; document.getElementById(myId1).style.visibility='hidden'; } } function myDetails(myId1) { if (document.getElementById(myId1).shown != 1) { showMine(myId1); document.getElementById('detailsLink').innerHTML = 'Hide Details'; document.getElementById(myId1).shown = 1; } else { hideMine('topDetails'); document.getElementById('detailsLink').innerHTML = 'Show Details'; document.getElementById(myId1).shown = 0; } } function createRequestObject() { var ro; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ ro = new ActiveXObject("Microsoft.XMLHTTP"); }else{ ro = new XMLHttpRequest(); } return ro; } var http = createRequestObject(); function sndReq(jurl) { http.open('get', jurl); http.onreadystatechange = handleResponse; http.send(null); } function handleResponse() { if(http.readyState == 4){ var response = http.responseText; var update = new Array(); if(response.indexOf('|' != -1)) { update = response.split('|^|'); if (document.getElementById(update[0])) { document.getElementById(update[0]).innerHTML = update[1]; } } } } var tgt; var onoff; var portsArray = new Array (); var portsOptsArray = new Array (); var currentuPort = ""; var currentuPortE; var currentuPortEl; var currentuPortId; var thisTwo; function uport_store () { thisOne = document.getElementById('uPort'); thisTwo = document.getElementById('uPort_opts'); currentuPortId = document.getElementById('uPortId').innerHTML; portsArray[currentuPortId] = thisOne.innerHTML; portsOptsArray[currentuPortId] = thisTwo.innerHTML; maybeMoveIt(currentuPortE, 'uPort', currentuPortEl); } function uport_ajax (e, clicked, id, onoff, tgt) { currentuPortE = e; currentuPortEl = clicked; var x = get_current_xy (e);posx = x[0]; posy = x[1]; thisOne = document.getElementById('uPort'); thisTwo = document.getElementById('uPort_opts'); if (currentuPort != id) { if (!portsArray[id]) { currentuPort = id; thisOne.innerHTML='