AI Center Archived WWW Site (2022)
(*): The content below has been archived for historical purposes. It contains historical information about projects and people from SRI International's Artificial Intelligence Center. Current information is now available on AIC's website and of course you can also visit SRI's AI content. Don't hesitate to contact us if you need more information about our current projects.
/** * @author Yasmina Chitti * @copyright SRI International, * **/ function navigateInBrowser(strn) { window.location.href = strn; return true; } function sniffIE() { var sAgent = navigator.userAgent var isIE = (sAgent.indexOf("MSIE") > -1) return isIE; } function onmenuclick(obj,code) { hide(obj); eval(code); } function show(obj) { if(typeof(obj) == "undefined") return; obj.style.visibility = 'visible'; } function hide(obj){ if(typeof(obj) == "undefined") return; obj.style.visibility = 'hidden'; } function SetColor(obj,bgcolor,fgcolor) { if(typeof(obj) == "undefined") return; obj.style.color = fgcolor; obj.style.backgroundColor = bgcolor; } function OnMouseOverBar(obj,rowid,colid,bgcolor,fgcolor) { SetColor(obj,bgcolor,fgcolor); window.status = menuArray[rowid][colid]; } function OnMouseOutOfBar(obj,rowid,colid,bgcolor,fgcolor) { SetColor(obj,bgcolor,fgcolor); window.status = ""; } function TrackPopUp(objId,event) { if(typeof(objId) == "undefined") return; obj = document.getElementById(objId) var winWidth = document.body.clientWidth; var winHeight = document.body.clientHeight; if (sniffIE()){ //MSIE x = winWidth - (obj.offsetWidth + window.event.x); y = winHeight - (obj.offsetHeight + window.event.y); obj.style.left = x<0 ? window.event.x + (x + 20): window.event.x + 20; obj.style.top = y<0 ? window.event.y + y : window.event.y; }else{ //Mozilla/Netscape x = winWidth - (obj.offsetWidth + event.pageX); y = winHeight - (obj.offsetHeight + event.pageY); obj.style.left = x<0 ? event.pageX + x : event.pageY; obj.style.top = y<0 ? event.pageY + y : event.pageY; } show(obj); return false; } function PositionPopUp(objId,parentId) { if(typeof(objId) == "undefined") return; //first get a reference to the popup menu obj = document.getElementById(objId) //next get a reference to the var thisParent = document.getElementById(parentId); //now walk up the DOM until the BODY element is reached. //along the way, add up the Left & Top offsets var myLeft = 0; var myTop = 0; var trParent = thisParent.offsetParent; myLeft += trParent.offsetLeft; myTop += trParent.offsetTop; obj.style.left = myLeft + thisParent.offsetLeft+"px"; obj.style.top = myTop + thisParent.offsetTop+"px"; show(obj); return false; } function ErasePopUp(objId,parentId) { if(typeof(objId) == "undefined") return; //first get a reference to the popup menu obj = document.getElementById(objId) hide(obj); return false; } function CreateMenuBar(rowid,obj,cssClass) { var subMenuHTML; current_id = "div_"+ rowid +"_"+ obj; navigationLink = navigationArray[rowid][obj]; subMenuHTML = "\n
"; subMenuHTML += menuArray[rowid][obj]; subMenuHTML += "\n"; subMenuHTML += "
\n"; return subMenuHTML; } function CreatePopUpMenu(menuIndex,menuLength) { var divHTML ; if(!menuLength) { return; } divHTML = "
\n"; // RECREATE menu title to override current menu made in navigation.js // divHTML += CreateMenuBar(menuIndex,0,"menuTitle"); // Create submenu items for (obj = 1;obj < menuLength; obj++) { divHTML += CreateMenuBar(menuIndex,obj,"menuText"); } divHTML += "
"; document.write(divHTML); } function createMenus() { for (parent_id = 0; parent_id < menuArray.length; parent_id++) { menuLength = menuArray[parent_id].length; CreatePopUpMenu(parent_id,menuLength); } }