function updateBrowserInfo() { //if an element exists with the ID BrowserInfo, then update it var e=document.getElementById("BrowserInfo"); if(e) { var s="Size1: "+screen.width+"x"+screen.height+"
"; s+="Size2: "+window.innerWidth+"x"+window.innerHeight+"
"; var e2=document.getElementById("BrowserInfoContent"); if(e2) { e2.innerHTML=s; setVisible(e,true); } else { alert("Cannot locate element: BrowserInfoContent"); }; }; }; function screenResized() { positionItems(); updateBrowserInfo(); //This is a quick hack to pass resize messages on to another js function defined elsewhere. if(eval('typeof screenResizedListener')=="function") { screenResizedListener(); }; //This is a quick hack to pass resize messages on to the page header used in landing pages. //This function is located in the Server Page Header item in the Content Elements widget if(eval('typeof landingPageScreenResizedListener')=="function") { landingPageScreenResizedListener(); }; }; //Positions any items with the AttachTop or AttachLeft attribute set. This is done so items can be made to appear directly //under or to the right of other items even when the size of the item they are attached to changes //12-04-12 Added bIsPositioning flag to eliminate script taking too long error in IE. var bIsPositioning=false; var bPositionItemsCallAborted=false; function positionItems() { if(bIsPositioning) { bPositionItemsCallAborted=true; return; }; bIsPositioning=true; //if(bMergeList==true) return; var arNodes=document.getElementsByTagName("div"); var bDone=false; var cLoop=0; //NOTE:: This is tricky because elements can be positioned when they're not visible (e.g. hidden tabs) but it is not possible //to use the offset values to confirm the positioning. A good way to do it would be to check the style attribute to see if //an item needs to be positioned rather than the offset (e.g. offsetTop). For now, a loop counter is used to end the //process after 5 iterations. Otherwise it would continue to iterate because non-visible elements would be positioned //every time since they have no offset value. while ((bDone==false) && (cLoop<10)) { cLoop++; bDone=true; for (var i=0;i0) { var e=document.getElementById(sAttach); if((e) && (e.offsetWidth*e.offsetHeight>0)){ var n=e.offsetTop+e.offsetHeight; //if(arNodes[i].offsetTop!=n+0) { if(arNodes[i].style.top!=(n+0)+"px") { //appendToLog("position "+sID+" top1="+arNodes[i].style.top+" set to "+(n+0)+"px",false,true); arNodes[i].style.top=(n+0)+"px"; bDone=false; }; } else { }; }; //position items to the right of other items var sAttach=arNodes[i].getAttribute("AttachLeft"); if(sAttach.length>0) { var e=document.getElementById(sAttach); if((e) && (e.offsetWidth*e.offsetHeight>0)){ var n=e.offsetLeft+e.offsetWidth; //if(arNodes[i].offsetLeft!=n+1) { if(arNodes[i].style.left!=(n+1)+"px") { //appendToLog("position "+sID+" left1="+arNodes[i].style.left+" set to "+(n+1)+"px",false,true); arNodes[i].style.left=(n+1)+"px"; bDone=false; }; } else { }; }; //align items to the left with other items //if(isVisible(arNodes[i])) { var sAttach=arNodes[i].getAttribute("AlignLeft"); if(sAttach.length>0) { var e=document.getElementById(sAttach); if((e) && (e.offsetWidth*e.offsetHeight>0)){ var n=e.offsetLeft; //if(arNodes[i].offsetLeft!=n) { if(arNodes[i].style.left!=n+"px") { //appendToLog("position "+sID+" left2="+arNodes[i].style.left+" set to "+n+"px",false,true); arNodes[i].style.left=n+"px"; bDone=false; }; }; } else { }; //}; //align items to the right with other items var sAttach=arNodes[i].getAttribute("AlignRight"); if(sAttach.length>0) { var e=document.getElementById(sAttach); if((e) && (e.offsetWidth*e.offsetHeight>0)){ var n=e.offsetLeft+e.offsetWidth; //if(arNodes[i].offsetLeft+arNodes[i].offsetWidth!=n) { if(arNodes[i].style.left!=(n-arNodes[i].offsetWidth)+"px") { //appendToLog("position "+sID+" left2="+arNodes[i].style.left+" set to "+(n-arNodes[i].offsetWidth)+"px",false,true); arNodes[i].style.left=(n-arNodes[i].offsetWidth)+"px"; bDone=false; }; } else { }; }; }; }; }; }; bIsPositioning=false; if(bPositionItemsCallAborted) { bPositionItemsCallAborted=false; setTimeout("positionItems()",100); }; };