var bIsIE32b = false;
var bIsIE32 = false;

  var sAgent = navigator.userAgent
   var bIs95NT 
      = sAgent.indexOf("Windows 95") > -1 
      || sAgent.indexOf("Windows NT")  > -1 
      || sAgent.indexOf("Win32")  > -1 
      || sAgent.indexOf("Windows 98")  > -1  
   var bIsIE 
      = sAgent.indexOf("IE")  > -1 
      && sAgent.indexOf("b1") <= -1 
      && sAgent.indexOf("p1") <= -1
   bIsIE32b = bIs95NT && bIsIE

function startScripts() {

bIsIE32 = bIsIE32b;

}


var menuopen;
menuopen=0;

var nChunk=0;
var iTimerID, iTimerCloseID;
function OpenMenu(y)
{if (bIsIE32 && y!=0) {
      window.eval('menu'+y).style.clip = "rect(0 100% " + nChunk + "% 0)"
      window.eval('menu'+y).style.display="";
      nChunk +=20
      if (nChunk <= 100) {
         iTimerID = window.setTimeout("OpenMenu(" + y + ")",1)
      }
      else {
         window.clearTimeout(iTimerID)
      }

}}

function CloseMenu(y)
{if (bIsIE32 && y!='1' && y!='0' && y!='7') {
  window.eval('menu'+y).style.display="none";
  window.clearTimeout(iTimerID)
  nChunk=0;
  menuopen=0;
}}

function glowOver(x)
{if (bIsIE32) {
  if(menuopen==0)
  {
     if(x!='1' && x!='0' && x!='7')
     {
       menuopen=x;
       OpenMenu(x);
     }
     else
     {
       menuopen=0;
     }
  }
  else
  {
     window.clearTimeout(iTimerID);
     CloseMenu(menuopen);
     if(x!='1' && x!='0' && x!='7')
     {
       menuopen=x;
       OpenMenu(x);
     }
     else
     {
       menuopen=0;
     }
  }
}}

function glowOut(y)
{if (bIsIE32) {
   iTimerCloseID = window.setTimeout("CloseMenu("+y+")",1000)

}}

function glowDiv()
{if (bIsIE32) {
   window.clearTimeout(iTimerCloseID)

}}

function writeHeading(x)
{
document.write('<table border=0 cellpadding=10 cellspacing=0 width=100%>');
document.write('<tr>');
document.write('<td><br><h1>Bhavna Orgun</a></h1><h2>Ontologies and Agents</a><h2></td>');
document.write('<td align=centre><a href="phd.html" onMouseOver="glowDiv()"> <img src="images/ontology2.gif" border=0 ></a></td>');
document.write('<td align=centre><a href="http://www.hl7.org.au/" onMouseOver="glowDiv()"> <img src="images/HL7-Australia.jpg" border=0 ></a></td>');
document.write('<td align=centre><a href="http://www.comp.mq.edu.au/research/isg/index.html" onMouseOver="glowDiv()"> <img src="images/isg.jpg" border=0 ></a></td>');
document.write('</tr>');
document.write('</table>');
}

function writeMenusystem(x,y)
{
document.write('<table border=0 cellpadding=2 cellspacing=0>');
document.write('<tr>');
document.write('<td class=menubar nowrap><a href="index.html" onMouseOver="glowDiv();glowOver(1)" onMouseOut="glowOut(1)">'+(x==1?'<b>':'')+'Home'+(x==1?'</b>':'')+'</a></td>');
document.write('<td class=menubar nowrap> | <a href="contact.html" onMouseOver="glowDiv();glowOver(10)" onMouseOut="glowOut(10)">'+(x==10?'<b>':'')+'Contact'+(x==10?'</b>':'')+'</a></td>');
document.write('<td class=menubar nowrap> | <a href="research.html" onMouseOver="glowDiv();glowOver(2)" onMouseOut="glowOut(2)">'+(x==2?'<b>':'')+'Research Interests'+(x==2?'</b>':'')+'</a></td>');
document.write('<td class=menubar nowrap> | <a href="projects.html" onMouseOver="glowDiv();glowOver(3)" onMouseOut="glowOut(3)">'+(x==3?'<b>':'')+'Projects and Publications'+(x==3?'</b>':'')+'</a></td>');
document.write('</tr>');

if (bIsIE32b) {
document.write('<tr>');
document.write('<td></td>');
document.write('<td><div class=dropmenu style="position: absolute; z-index: 1; display: none;" id="menu10" onMouseOver="glowDiv()" onMouseOut="glowOut('+"'10')"+'">');
document.write('<table border="0" cellpadding="2" cellspacing="0" width="100">');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'calendar.html\')" nowrap>'+(x==10 && y==1?'<b>':'')+'Calendar'+(x==10 && y==1?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'personal.html\')" nowrap>'+(x==10 && y==2?'<b>':'')+'Personal'+(x==10 && y==2?'</b>':'')+'</td></tr>');
document.write('</table>');
document.write('</div></td>');
document.write('<td><div class=dropmenu style="position: absolute; z-index: 1; display: none;" id="menu2" onMouseOver="glowDiv()" onMouseOut="glowOut('+"'2')"+'">');
document.write('<table border="0" cellpadding="2" cellspacing="0" width="100">');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'ontologies.html\')" nowrap>'+(x==2 && y==1?'<b>':'')+'Ontologies'+(x==2 && y==1?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'agents.html\')" nowrap>'+(x==2 && y==2?'<b>':'')+'Agents'+(x==2 && y==2?'</b>':'')+'</td></tr>');
document.write('</table>');
document.write('</div></td>');
document.write('<td><div class=dropmenu style="position: absolute; z-index: 1; display: none;" id="menu3" onMouseOver="glowDiv()" onMouseOut="glowOut('+"'3')"+'">');
document.write('<table border="0" cellpadding="2" cellspacing="0" width="100">');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'phd.html\')" nowrap>'+(x==3 && y==1?'<b>':'')+'PhD'+(x==3 && y==1?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'emags.html\')" nowrap>'+(x==3 && y==2?'<b>':'')+'Masters'+(x==3 && y==2?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'publications.html\')" nowrap>'+(x==3 && y==3?'<b>':'')+'Publications'+(x==3 && y==3?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'swarm.html\')" nowrap>'+(x==3 && y==4?'<b>':'')+'Swarm'+(x==3 && y==4?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'Software.html\')" nowrap>'+(x==3 && y==5?'<b>':'')+'Software'+(x==3 && y==5?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'webservices.html\')" nowrap>'+(x==3 && y==6?'<b>':'')+'Webservices'+(x==3 && y==6?'</b>':'')+'</td></tr>');
document.write('</table>');
document.write('</div></td>');
document.write('<td><div class=dropmenu style="position: absolute; z-index: 1; display: none;" id="menu4" onMouseOver="glowDiv()" onMouseOut="glowOut('+"'4')"+'">');
document.write('<table border="0" cellpadding="2" cellspacing="0" width="100">');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'publicationsall.html\')" nowrap>'+(x==4 && y==1?'<b>':'')+'Selected Publications'+(x==4 && y==1?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'publicationsbooks.html\')" nowrap>'+(x==4 && y==2?'<b>':'')+'Books'+(x==4 && y==2?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'publicationsjournal.html\')" nowrap>'+(x==4 && y==3?'<b>':'')+'Journal Papers'+(x==4 && y==3?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'publicationsconf.html\')" nowrap>'+(x==4 && y==4?'<b>':'')+'Conference Papers'+(x==4 && y==4?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'publicationsreport.html\')" nowrap>'+(x==4 && y==5?'<b>':'')+'Technical Reports'+(x==4 && y==5?'</b>':'')+'</td></tr>');
document.write('</table>');
document.write('</div></td>');
document.write('<td><div class=dropmenu style="position: absolute; z-index: 1; display: none;" id="menu5" onMouseOver="glowDiv()" onMouseOut="glowOut('+"'5')"+'">');
document.write('<table border="0" cellpadding="2" cellspacing="0" width="100">');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'teachingresearchstudent.html\')" nowrap>'+(x==5 && y==1?'<b>':'')+'Research Students'+(x==5 && y==1?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'teachingsummerscholarship.html\')" nowrap>'+(x==5 && y==2?'<b>':'')+'Summer Scholarships'+(x==5 && y==2?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'teachinggrants.html\')" nowrap>'+(x==5 && y==3?'<b>':'')+'Teaching Grants'+(x==5 && y==3?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'teachingpublications.html\')" nowrap>'+(x==5 && y==4?'<b>':'')+'Teaching Publications'+(x==5 && y==4?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'teachinghistory.html\')" nowrap>'+(x==5 && y==5?'<b>':'')+'Teaching History'+(x==5 && y==5?'</b>':'')+'</td></tr>');
document.write('</table>');
document.write('</div></td>');
document.write('<td><div class=dropmenu style="position: absolute; z-index: 1; display: none;" id="menu6" onMouseOver="glowDiv()" onMouseOut="glowOut('+"'6')"+'">');
document.write('<table border="0" cellpadding="2" cellspacing="0" width="100">');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'activitiesmain.html\')" nowrap>'+(x==6 && y==1?'<b>':'')+'Main Activities'+(x==6 && y==1?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'activitiesconferenceorganisation.html\')" nowrap>'+(x==6 && y==2?'<b>':'')+'Conference Organisation'+(x==6 && y==2?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'activitiescommittee.html\')" nowrap>'+(x==6 && y==3?'<b>':'')+'PC Membership'+(x==6 && y==3?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'activitiestutorials.html\')" nowrap>'+(x==6 && y==4?'<b>':'')+'Tutorials'+(x==6 && y==4?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'activitiesconference.html\')" nowrap>'+(x==6 && y==5?'<b>':'')+'Conference Reviewing'+(x==6 && y==5?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'activitiesjournal.html\')" nowrap>'+(x==6 && y==6?'<b>':'')+'Journal Reviewing'+(x==6 && y==6?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'activitiesgranting.html\')" nowrap>'+(x==6 && y==7?'<b>':'')+'Granting Bodies Reviewing'+(x==7 && y==6?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'activitiesadmin.html\')" nowrap>'+(x==6 && y==8?'<b>':'')+'Administration Duties'+(x==6 && y==8?'</b>':'')+'</td></tr>');
document.write('</table>');
document.write('</div></td>');
document.write('<td><div class=dropmenu style="position: absolute; z-index: 1; display: none;" id="menu8" onMouseOver="glowDiv()" onMouseOut="glowOut('+"'8')"+'">');
document.write('<table border="0" cellpadding="2" cellspacing="0" width="100">');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'backgroundcv.html\')" nowrap>'+(x==8 && y==1?'<b>':'')+'Full Curriculum Vitae'+(x==8 && y==1?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'backgroundeducation.html\')" nowrap>'+(x==8 && y==2?'<b>':'')+'Education'+(x==8 && y==2?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'backgroundcurrentpos.html\')" nowrap>'+(x==8 && y==3?'<b>':'')+'Current Positions'+(x==8 && y==3?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'backgroundpreviouspos.html\')" nowrap>'+(x==8 && y==4?'<b>':'')+'Previous Positions'+(x==8 && y==4?'</b>':'')+'</td></tr>');
document.write('<tr><td class=menuitem onMouseOver="this.className=\'menuitemover\'" onMouseOut="this.className=\'menuitem\'" onClick="window.location.replace(\'backgroundpictures.html\')" nowrap>'+(x==8 && y==5?'<b>':'')+'Pictures and Movies'+(x==8 && y==5?'</b>':'')+'</td></tr>');
document.write('</table>');
document.write('</div></td>');
document.write('</tr>');
}

document.write('</script>');
document.write('</table>');
}

function takeYear(theDate)
{
	x = theDate.getYear();
	var y = x % 100;
	y += (y < 38) ? 2000 : 1900;
	return y;
}

function writeDateChanged()
{

document.write(lastMod());
}

function lastMod()
{
var x = new Date (document.lastModified);
Modif = new Date(x.toGMTString());
Year = takeYear(Modif);
Month = Modif.getMonth();
Day = Modif.getDate();
Mod = (Date.UTC(Year,Month,Day,0,0,0))/86400000;
x = new Date();
today = new Date(x.toGMTString());
Year2 = takeYear(today);
Month2 = today.getMonth();
Day2 = today.getDate();
now = (Date.UTC(Year2,Month2,Day2,0,0,0))/86400000;
daysago = now - Mod;
if (daysago < 0) return '';
unit = 'days';
if (daysago > 730)
{
	daysago = Math.floor(daysago/365);
	unit = 'years';
}
else if (daysago > 60)
{
	daysago = Math.floor(daysago/30);
	unit = 'months';
}
else if (daysago > 14)
{
	daysago = Math.floor(daysago/7);
	unit = 'weeks'
}
var towrite = 'Page last changed ';
if (daysago == 0) towrite += 'today';
else if (daysago == 1) towrite += 'yesterday';
else towrite += daysago + ' ' + unit + ' ago';
return towrite;
}

function writeSide(x,y)
{
if (x==2) {
document.write('<tr><td><a href="ontologies.html">'+(y==1?'<b>':'')+'Ontologies'+(y==1?'</b>':'')+'</a></td>');
document.write('<tr><td><a href="agents.html">'+(y==2?'<b>':'')+'Agents'+(y==2?'</b>':'')+'</a></td>');
}
if (x==3) {
document.write('<tr><td><a href="phd.html">'+(y==1?'<b>':'')+'Current'+(y==1?'</b>':'')+'</a></td>');
document.write('<tr><td><a href="emags.html">'+(y==2?'<b>':'')+'Masters Related'+(y==2?'</b>':'')+'</a></td>');
document.write('<tr><td><a href="publications.html">'+(y==3?'<b>':'')+'Papers'+(y==3?'</b>':'')+'</a></td>'); 
document.write('<tr><td><a href="swarm.html">'+(y==4?'<b>':'')+'SWARM'+(y==4?'</b>':'')+'</a></td>'); 
document.write('<tr><td><a href="Software.html">'+(y==5?'<b>':'')+'Software Downloads'+(y==5?'</b>':'')+'</a></td>'); 
document.write('<tr><td><a href="webservices.html">'+(y==6?'<b>':'')+'Web Related'+(y==6?'</b>':'')+'</a></td>'); 
}
if (x==10) {
document.write('<tr><td><a href="calendar.html">'+(y==1?'<b>':'')+'Calendar'+(y==1?'</b>':'')+'</a></td>');
document.write('<tr><td><a href="personal.html">'+(y==2?'<b>':'')+'Personal'+(y==2?'</b>':'')+'</a></td>');
}

document.write('<tr><td nowrap><a href="http://members.optusnet.com.au/~borgun/">Orgun Technology</a></td></tr>');
document.write('<tr><td nowrap><a href="http://protege.stanford.edu/">Protege</a></td></tr>');
document.write('<tr><td nowrap><a href="http://agents.umbc.edu/" target="_new">UMBC Agent Web</a></td></tr>'); 
document.write('<tr><td nowrap><a href="http://agents.media.mit.edu/" target="_new">Software Agents Group @ MIT</a></td></tr>'); 
document.write('<tr><td nowrap><a href ="http://www.hl7.org.au/" target = _new>HL7 Australia</a></td></tr>'); 
document.write('<tr><td nowrap><a href="http://www.computer.org/" target="_new">IEEE Society</a></td></tr>'); 
document.write('<tr><td nowrap><a href="http://www.digimark.net/TheSimpsons/" target="_new">Simpsons Archive</a></td></tr>'); 
document.write('<tr><td nowrap><a href="callto://borgun2002"><img src="http://goodies.skype.com/graphics/skypeme_btn_green.gif" border="0"></a></td></tr>'); 

}


