/*****************************************************
 * vsiSetup
 * --vsi---
 *****************************************************/
/*****************************************************
 * ypSlideOutMenu
 * 3/04/2001
 * 
 * a nice little script to create exclusive, slide-out
 * menus for ns4, ns6, mozilla, opera, ie4, ie5 on 
 * mac and win32. I've got no linux or unix to test on but 
 * it should(?) work... 
 *
 * --youngpup--
 *****************************************************/

ypSlideOutMenu.Registry = []
ypSlideOutMenu.PanelRegistry = []
ypSlideOutMenu.aniLen = 250
//ypSlideOutMenu.hideDelay = 1000
ypSlideOutMenu.hideDelay = 75
ypSlideOutMenu.minCPUResolution = 10
ypSlideOutMenu.visible=0;

// constructor
function ypSlideOutMenu(id, dir, left, top, width, height,nPanel)
{
	this.ie  = document.all ? 1 : 0
	this.ns4 = document.layers ? 1 : 0
	this.dom = document.getElementById ? 1 : 0

	if (this.ie || this.ns4 || this.dom) {
		this.panel		 = nPanel; 
		this.id			 = id
		this.dir		 = dir
		this.orientation = dir == "left" || dir == "right" ? "h" : "v"
		this.dirType	 = dir == "right" || dir == "down" ? "-" : "+"
		this.dim		 = this.orientation == "h" ? width : height
		this.hideTimer	 = false
		this.aniTimer	 = false
		this.open		 = false
		this.over		 = false
		this.startTime	 = 0

		// global reference to this object
		this.gRef = "ypSlideOutMenu_"+id
		eval(this.gRef+"=this")

		// add this menu object to an internal list of all menus
			ypSlideOutMenu.Registry[id] = this
			
		if (this.panel==1)
		{
			ypSlideOutMenu.PanelRegistry[id] = this;
		}
		
		var d = document
		d.write('<style type="text/css">')
		d.write('#' + this.id + 'Container { visibility:hidden; ')
		d.write('left:' + left + 'px; ')
		d.write('top:' + top + 'px; ')
		d.write('overflow:hidden; }')
		d.write('#' + this.id + 'Container, #' + this.id + 'Content { position:absolute; ')
		d.write('width:' + width + 'px; ')
		d.write('height:' + height + 'px; ')
		d.write('clip:rect(0 ' + width + ' ' + height + ' 0); ')
		d.write('}')
		d.write('</style>')

		this.load()
	}
}

ypSlideOutMenu.prototype.load = function() {
	var d = document
	var lyrId1 = this.id + "Container"
	var lyrId2 = this.id + "Content"
	var obj1 = this.dom ? d.getElementById(lyrId1) : this.ie ? d.all[lyrId1] : d.layers[lyrId1]
	if (obj1) var obj2 = this.ns4 ? obj1.layers[lyrId2] : this.ie ? d.all[lyrId2] : d.getElementById(lyrId2)
	var temp

	if (!obj1 || !obj2) window.setTimeout(this.gRef + ".load()", 100)
	else {
		this.container	= obj1
		this.menu		= obj2
		this.style		= this.ns4 ? this.menu : this.menu.style
		this.homePos	= eval("0" + this.dirType + this.dim)
		this.outPos		= 0
		this.accelConst	= (this.outPos - this.homePos) / ypSlideOutMenu.aniLen / ypSlideOutMenu.aniLen 

		// set event handlers.
		if (this.panel==0)
		{
			if (this.ns4) this.menu.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
			this.menu.onmouseover = new Function("ypSlideOutMenu.showMenu('" + this.id + "')")
			this.menu.onmouseout = new Function("ypSlideOutMenu.hideMenu('" + this.id + "')")
		}
		
		//set initial state
		this.endSlide()
	}
}
	
ypSlideOutMenu.showMenu = function(id)
{

	var reg = ypSlideOutMenu.Registry
	var panelreg = ypSlideOutMenu.PanelRegistry
	var obj = ypSlideOutMenu.Registry[id]

	if (obj.container) {
		obj.over = true

		// close other menus.
		if (this.panel==0)
		{
			for (menu in reg) if (id != menu) ypSlideOutMenu.hide(menu)
		}

		// if this menu is scheduled to close, cancel it.
		if (obj.hideTimer) { reg[id].hideTimer = window.clearTimeout(reg[id].hideTimer) }
		// if this menu is closed, open it.
		if (!obj.open && !obj.aniTimer) reg[id].startSlide(true)
	}
}

ypSlideOutMenu.hideMenu = function(id)
{
	// schedules the menu to close after <hideDelay> ms, which
	// gives the user time to cancel the action if they accidentally moused out
	var obj = ypSlideOutMenu.Registry[id]
	if (obj.container) {
		if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
		obj.hideTimer = window.setTimeout("ypSlideOutMenu.hide('" + id + "')", ypSlideOutMenu.hideDelay);
	}
}

ypSlideOutMenu.hideAll = function()
{
        var reg = ypSlideOutMenu.Registry
        for (menu in reg) {
                ypSlideOutMenu.hide(menu);
                if (menu.hideTimer) window.clearTimeout(menu.hideTimer);
        }
}

ypSlideOutMenu.hide = function(id)
{

	var obj = ypSlideOutMenu.Registry[id]
	obj.over = false

	if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
	
	// flag that this scheduled event has occured.
	obj.hideTimer = 0

	// if this menu is open, close it.
	if (obj.open && !obj.aniTimer) obj.startSlide(false)
}

ypSlideOutMenu.prototype.startSlide = function(open) {
	this[open ? "onactivate" : "ondeactivate"]()
	this.open = open
	if (open) this.setVisibility(true)
	this.startTime = (new Date()).getTime()		
	this.aniTimer = window.setInterval(this.gRef + ".slide()", ypSlideOutMenu.minCPUResolution)
}

ypSlideOutMenu.prototype.slide = function() {
	var elapsed = (new Date()).getTime() - this.startTime
	if (elapsed > ypSlideOutMenu.aniLen) this.endSlide()
	else {
		var d = Math.round(Math.pow(ypSlideOutMenu.aniLen-elapsed, 2) * this.accelConst)
		if (this.open && this.dirType == "-")		d = -d
		else if (this.open && this.dirType == "+")	d = -d
		else if (!this.open && this.dirType == "-")	d = -this.dim + d
		else										d = this.dim + d

		this.moveTo(d)
	}
}

ypSlideOutMenu.prototype.endSlide = function() {
	this.aniTimer = window.clearTimeout(this.aniTimer)
	this.moveTo(this.open ? this.outPos : this.homePos)
	if (!this.open) this.setVisibility(false)
	if ((this.open && !this.over) || (!this.open && this.over)) {
		this.startSlide(this.over)
	}
}


ypSlideOutMenu.prototype.setVisibility = function(bShow) { 
	var s = this.ns4 ? this.container : this.container.style
	s.visibility = bShow ? "visible" : "hidden"
}
ypSlideOutMenu.prototype.moveTo = function(p) { 
	this.style[this.orientation == "h" ? "left" : "top"] = this.ns4 ? p : p + "px"
}
ypSlideOutMenu.prototype.getPos = function(c) {
	return parseInt(this.style[c])
}

// events
ypSlideOutMenu.prototype.onactivate		= function() { }
ypSlideOutMenu.prototype.ondeactivate	= function() { }

// Browser Detect Lite  v2.1.4
// http://www.dithered.com/javascript/browser_detect/index.html
// modified by Chris Nott (chris@NOSPAMdithered.com - remove NOSPAM)


function BrowserDetectLite() {
   var ua = navigator.userAgent.toLowerCase(); 

	this.name=ua;
   // browser name
   this.isGecko     = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
   this.isMozilla   = (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
   this.isNS        = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
   this.isIE        = ( (ua.indexOf('msie') != -1) && (ua.indexOf('opera') == -1) && (ua.indexOf('webtv') == -1) ); 
   this.isSafari    = (ua.indexOf('safari') != - 1);
   this.isOpera     = (ua.indexOf('opera') != -1); 
   this.isKonqueror = (ua.indexOf('konqueror') != -1 && !this.isSafari); 
   this.isIcab      = (ua.indexOf('icab') != -1); 
   this.isAol       = (ua.indexOf('aol') != -1); 
   
   // spoofing and compatible browsers
   this.isIECompatible = ( (ua.indexOf('msie') != -1) && !this.isIE);
   this.isNSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.isNS && !this.isMozilla);
   
   // browser version
   this.versionMinor = parseFloat(navigator.appVersion); 
   
   // correct version number
   if (this.isNS && this.isGecko) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );
   }
   else if (this.isIE && this.versionMinor >= 4) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
   }
   else if (this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
   }
   else if (this.isSafari) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) );
   }
   else if (this.isOpera) {
      if (ua.indexOf('opera/') != -1) {
         this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera/') + 6 ) );
      }
      else {
         this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera ') + 6 ) );
      }
   }
   else if (this.isKonqueror) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
   }
   else if (this.isIcab) {
      if (ua.indexOf('icab/') != -1) {
         this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab/') + 6 ) );
      }
      else {
         this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab ') + 6 ) );
      }
   }
   
   this.versionMajor = parseInt(this.versionMinor); 
   this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
   
   // dom support
   this.isDOM1 = (document.getElementById);
   this.isDOM2Event = (document.addEventListener && document.removeEventListener);
   
   // css compatibility mode
   this.mode = document.compatMode ? document.compatMode : 'BackCompat';

   // platform
   this.isWin   = (ua.indexOf('win') != -1);
   this.isWin32 = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1 || ua.indexOf('xp') != -1) );
   this.isMac   = (ua.indexOf('mac') != -1);
   this.isUnix  = (ua.indexOf('unix') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)
   this.isLinux = (ua.indexOf('linux') != -1);
   
   // specific browser shortcuts
   this.isNS4x = (this.isNS && this.versionMajor == 4);
   this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
   this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);
   this.isNS4up = (this.isNS && this.versionMinor >= 4);
   this.isNS6x = (this.isNS && this.versionMajor == 6);
   this.isNS6up = (this.isNS && this.versionMajor >= 6);
   this.isNS7x = (this.isNS && this.versionMajor == 7);
   this.isNS7up = (this.isNS && this.versionMajor >= 7);
   
   
   this.isIE4x = (this.isIE && this.versionMajor == 4);
   this.isIE4up = (this.isIE && this.versionMajor >= 4);
   this.isIE5x = (this.isIE && this.versionMajor == 5);
   this.isIE55 = (this.isIE && this.versionMinor == 5.5);
   this.isIE5up = (this.isIE && this.versionMajor >= 5);
   this.isIE6x = (this.isIE && this.versionMajor == 6);
   this.isIE6up = (this.isIE && this.versionMajor >= 6);
   
   this.isIE4xMac = (this.isIE4x && this.isMac);
}

		var browser = new BrowserDetectLite();

		new ypSlideOutMenu("company", "right", 100, 101, 150, 125,0)
		new ypSlideOutMenu("products", "right", 200, 101, 200, 125,0)
		new ypSlideOutMenu("services", "right", 300, 101, 205, 125,0)
		new ypSlideOutMenu("news", "right", 400, 101, 101, 125,0)
		new ypSlideOutMenu("contact", "right", 500, 101, 200, 125,0)
		
		new ypSlideOutMenu("aboutVSi", "down", 0, 0, 100, 440,1)
		new ypSlideOutMenu("partners", "down", 0, 0, 100, 440,1)
		new ypSlideOutMenu("clients", "down", 0, 0, 100, 440,1)
		new ypSlideOutMenu("careers", "down", 0, 0, 100, 440,1)

		new ypSlideOutMenu("midas", "down", 0, 0, 100, 440,1)
		new ypSlideOutMenu("galis", "down", 0, 0, 100, 440,1)

		new ypSlideOutMenu("technicalSupportAndMaintenance", "down", 0, 0, 100, 440,1)
		new ypSlideOutMenu("technicalServices", "down", 0, 0, 100, 440,1)

		new ypSlideOutMenu("pressReleases", "down", 0, 0, 100, 440,1)

		new ypSlideOutMenu("contactInformation", "down", 0, 0, 100, 440,1)
		new ypSlideOutMenu("directions", "down", 0, 0, 100, 440,1)

		new ypSlideOutMenu("links", "down", 0, 0, 100, 440,1)

		new ypSlideOutMenu("legal", "down", 0, 0, 100, 440,1)

		
		var	activePanelID="";


////////////////////////

////////////////////////
/*****************************************************
 * Make Top Level Layer
 * --vsi---
 *****************************************************/

function replaceSubstring(inputString, fromString, toString) {
   // Goes through the inputString and replaces every occurrence of fromString with toString
   var temp = inputString;
   if (fromString == "") {
      return inputString;
   }
   if (toString.indexOf(fromString) == -1) { // If the string being replaced is not a part of the replacement string (normal situation)
      while (temp.indexOf(fromString) != -1) {
         var toTheLeft = temp.substring(0, temp.indexOf(fromString));
         var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);
         temp = toTheLeft + toString + toTheRight;
      }
   } else { // String being replaced is part of replacement string (like "+" being replaced with "++") - prevent an infinite loop
      var midStrings = new Array("~", "`", "_", "^", "#");
      var midStringLen = 1;
      var midString = "";
      // Find a string that doesn't exist in the inputString to be used
      // as an "inbetween" string
      while (midString == "") {
         for (var i=0; i < midStrings.length; i++) {
            var tempMidString = "";
            for (var j=0; j < midStringLen; j++) { tempMidString += midStrings[i]; }
            if (fromString.indexOf(tempMidString) == -1) {
               midString = tempMidString;
               i = midStrings.length + 1;
            }
         }
      } // Keep on going until we build an "inbetween" string that doesn't exist
      // Now go through and do two replaces - first, replace the "fromString" with the "inbetween" string
      while (temp.indexOf(fromString) != -1) {
         var toTheLeft = temp.substring(0, temp.indexOf(fromString));
         var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);
         temp = toTheLeft + midString + toTheRight;
      }
      // Next, replace the "inbetween" string with the "toString"
      while (temp.indexOf(midString) != -1) {
         var toTheLeft = temp.substring(0, temp.indexOf(midString));
         var toTheRight = temp.substring(temp.indexOf(midString)+midString.length, temp.length);
         temp = toTheLeft + toString + toTheRight;
      }
   } // Ends the check to see if the string being replaced is part of the replacement string or not
   return temp; // Send the updated string back to the user
} //  

///////////////////////////////////////

function makeLayer(id,L,T,W,H,bgColor,visible,zIndex,borderStyle,bitmapImage) 
{
	 if (document.layers) 
	 {
		  if (document.layers[id]) 
		  {
//		   alert ('Layer with this ID already exists!')
		   return
		  }
	
	  var LR=document.layers[id]=new Layer(W)
	  LR.name= id
	  LR.left= L
	  LR.top = T
	  LR.clip.height=H
	  LR.visibility=(null==visible || 1==visible ? 'show' : 'hide')
	  if(null!=zIndex)  LR.zIndex=zIndex
	
	  if(null!=bgColor) 
	  {
		if (bgColor!='transparent')
		{
			  LR.bgColor=bgColor;
		}
		else
		{
		  	  LR.bgColor='"null"';
		}
	  }
			  
	  
		if (bitmapImage!=null)
		{
			if (bitmapImage!='')
			{
			  bitmapImage=replaceSubstring(bitmapImage, "url(", "")
			  bitmapImage=replaceSubstring(bitmapImage, ");", "")
			  LR.background.src=bitmapImage;		  
			 }
		}
		
		return;
	 }
	 else if (document.all) 
	 {
		  if (document.all[id]) 
		  {
		   alert ('Layer with this ID already exists!')
		   return;
		  }
	 }
	 else if (document.getElementById(id)) 
	 {
	   alert ('Layer with this ID already exists!')
	   return;
	 }
  
	  var LYR= '\n<div id='+id+' style="position:absolute'
	  +'; left:'+L
	  +'; top:'+T
	  +'; width:'+W
	  +'; height:'+H
	  +'; clip:rect(0,'+W+','+H+',0)'
	  +'; visibility:'+(null==visible || 1==visible ? 'visible':'hidden')
	  +(null==zIndex  ? '' : '; z-index:'+zIndex);
	  
	
	  if(null!=bgColor) 
	  {
		if (bgColor!='transparent')
		{
		  LYR+='; background-color:'+bgColor;
		}
	  }
	
		if (borderStyle!=null)
		{
			if (borderStyle!='') LYR+=borderStyle;
		}
		if (bitmapImage!=null)
		{
		
			if (bitmapImage!='')
			{
				LYR+=';layer-background-image:'+bitmapImage;
				LYR+=';background: '+bitmapImage;
			}
		}
		
		if (id=='datePanel')
		{
			var currentDate=getCurrentDate();
			var leftPos=780-(currentDate.length*8)
	  		LYR+='"><div  style="position:absolute;left:'+leftPos+';top:5px;align:right"><a>'+currentDate+'</a><div></div>';
		}
		else
		{
	  		LYR+=';"></div>';
		}
	  
		if (document.all) 
		{
			document.body.insertAdjacentHTML("BeforeEnd",LYR)
		}
		else
		{
			document.body.innerHTML+=LYR;
		}

 
}

function makerolloverLayer(id,L,T,W,H,bgColor,visible,zIndex,bitmapImage) 
{
	 if (document.getElementById(id)) 
	 {
	   alert ('Layer with this ID already exists!')
	   return;
	 }
  
	  var LYR= '\n<div id='+id+' style="position:fixed'
	  +'; left:'+L
	  +'; top:'+T
	  +'; width:'+W
	  +'; height:'+H
	  +'; clip:rect(0,'+W+','+H+',0)'
	  +'; visibility:'+(null==visible || 1==visible ? 'visible':'hidden')
	  +(null==zIndex  ? '' : '; z-index:'+zIndex);
	  
	
	  if(null!=bgColor) 
	  {
		if (bgColor!='transparent')
		{
		  LYR+='; background-color:'+bgColor;
		}
	  }
	
		if (bitmapImage!=null)
		{
		
			if (bitmapImage!='')
			{
				LYR+=';layer-background-image:'+bitmapImage;
				LYR+=';background: '+bitmapImage;
			}
		}
		
	  		LYR+=';"></div>';
			document.body.innerHTML+=LYR;
 
}

function getCurrentDate()
{
// This array holds the "friendly" day names
var day_names = new Array(7)
day_names[0] = "Sunday"
day_names[1] = "Monday"
day_names[2] = "Tuesday"
day_names[3] = "Wednesday"
day_names[4] = "Thursday"
day_names[5] = "Friday"
day_names[6] = "Saturday"

// This array holds the "friendly" month names
var month_names = new Array(12)
month_names[0] = "January"
month_names[1] = "February"
month_names[2] = "March"
month_names[3] = "April"
month_names[4] = "May"
month_names[5] = "June"
month_names[6] = "July"
month_names[7] = "August"
month_names[8] = "September"
month_names[9] = "October"
month_names[10] = "November"
month_names[11] = "December"

// Get the current date
date_now = new Date()

// Figure out the friendly day name
day_value = date_now.getDay()
date_text = day_names[day_value]

// Figure out the friendly month name
month_value = date_now.getMonth()
date_text += " " + month_names[month_value]

// Add the day of the month
date_text += " " + date_now.getDate()

// Add the year
date_text += ", " + date_now.getFullYear()

// Get the minutes in the hour
minute_value = date_now.getMinutes()
if (minute_value < 10) {
    minute_value = "0" + minute_value
}

// Get the hour value and use it to customize the greeting
hour_value = date_now.getHours()
if (hour_value == 0) {
   greeting = "Good morning, "
   time_text = " " + (hour_value + 12) + ":" + minute_value + " AM"
}
else if (hour_value < 12) {
    greeting = "Good morning!"
    time_text = " " + hour_value + ":" + minute_value + " AM"
}
else if (hour_value == 12) {
    greeting = "Good afternoon!"
    time_text = " " + hour_value + ":" + minute_value + " PM"
}
else if (hour_value < 17) {
    greeting = "Good afternoon!"
    time_text = " " + (hour_value - 12) + ":" + minute_value + " PM"
}
else {
    greeting = "Good evening!"
    time_text = " " + (hour_value - 12) + ":" + minute_value + " PM"
}

var dateString= date_text;// + time_text;

return dateString;

}
////////////////////////
/*****************************************************
 * Make Top Level Layer
 * --vsi---
 *****************************************************/

function makeBottomLayer(id,L,T,W,H,bgColor,visible,zIndex,borderStyle,bitmapImage) 
{
 if (document.layers) 
 {
  if (document.layers[id]) 
  {
   alert ('Layer with this ID already exists!')
   return
  }
  
  var LR=document.layers[id] = new Layer(W);
  LR.name= id
  LR.left= L
  LR.top = T
  LR.clip.height=H
  LR.visibility=(null==visible || 1==visible ? 'show' : 'hide')
  if(null!=zIndex)  LR.zIndex=zIndex
  
  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
		  LR.bgColor=bgColor;
	}
	else
	{
	  LR.bgColor='null';
	}
  }

  
	if (bitmapImage!=null)
	{
		if (bitmapImage!='')
		{
		  bitmapImage=replaceSubstring(bitmapImage, "url(", "")
		  bitmapImage=replaceSubstring(bitmapImage, ");", "")
	      LR.background.src=bitmapImage;		  
		 }
	}
	
    var content1='<span id="span" style="align:center;">&copy; 2003-2007 VSi. All rights reserved.';
	var content2="";
	var content3='<u>Terms of Use</u></font>&nbsp;&nbsp;&nbsp;';
	var content4="";
	var content5='<u>Copyright</u></span>s';
  
  	LR.document.write(content1+content2+content3+content4+content5);
  	LR.document.close();
	
   return;
 }
 else if (document.all) 
 {
	  if (document.all[id]) 
	  {
	   alert ('Layer with this ID already exists!')
	   return
	  }
 }
 else if (document.getElementById(id)) 
 {
   alert ('Layer with this ID already exists!')
   return
 }
  
  var LYR= '\n<div id='+id+' style="position:absolute'
  +'; left:'+L
  +'; top:'+T
  +'; width:'+W
  +'; height:'+H
  +'; clip:rect(0,'+W+','+H+',0)'
 // +'; border: 1px; border-color: #000000;border-style: solid'
  +'; visibility:'+(null==visible || 1==visible ? 'visible':'hidden')
  
  +(null==zIndex  ? '' : '; z-index:'+zIndex);

  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
	  LYR+='; background-color:'+bgColor;
	}
  }


  	if (borderStyle!=null)
	{
		if (borderStyle!='') LYR+=';'+borderStyle;
	}
  	if (bitmapImage!=null)
	{

		if (bitmapImage!='')
		{
		
			LYR+=';layer-background-image:'+bitmapImage;
			LYR+=';background: '+bitmapImage;
		}
	}
    var content1='<div align="center"><br>&copy; 2003-2009 VSi. All rights reserved. <a href="#" onClick="shrinkContentPanel();slideMenuPanel(';
	var content2="'legal');insertExternalFile('termsofuse.htm');";
	var content3='"><font color="#330099"><u>Terms of Use</u></font>&nbsp;&nbsp;&nbsp;</a><a href="#" onClick="shrinkContentPanel();slideMenuPanel(';
	var content4="'legal');insertExternalFile('tmandcopyright.htm');";
	var content5='"><font color="#330099"><u>Copyright</u></font></a></div>';
  
  LYR+='">'+content1+content2+content3+content4+content5+'</div>';
  
    if (document.all) 
 	{	
 		document.body.insertAdjacentHTML("BeforeEnd",LYR)
 	}
	else
	{
  		document.body.innerHTML+=LYR;
	}

}

////////////////////////
/*****************************************************
 * Make Content Layer
 * --vsi---
 *****************************************************/

function makeContentLayer(id,frameID,homePage,L,T,W,H,bgColor,visible,zIndex,borderStyle,bitmapImage) 
{
 if (document.layers)
 {
  if (document.layers[id]) 
  {
   alert ('Layer with this ID already exists!')
   return
  }
  
  var LR=document.layers[id]=new Layer(W)
  LR.name= id
  LR.left= L
  LR.top = T
  LR.clip.height=H
  LR.visibility=(null==visible || 1==visible ? 'show' : 'hide')
  if(null!=zIndex)  LR.zIndex=zIndex

  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
		  LR.bgColor=bgColor;
	}
	else
	{
	  LR.bgColor='null';	
	}
  }

	if (bitmapImage!=null)
	{
		if (bitmapImage!='')
		{
		  bitmapImage=replaceSubstring(bitmapImage, "url(", "")
		  bitmapImage=replaceSubstring(bitmapImage, ");", "")
	      LR.background.src=bitmapImage;		  
		 }
	}

	var internalLYR='<ilayer id="contentFrame" src="incompatibilities.htm"></ilayer>';	

	LR.document.write(internalLYR);
	LR.document.close();
	
   return;
 }
 else if (document.all) 
 {
  if (document.all[id]) {
   alert ('Layer with this ID already exists!')
   return
  }
 }
 else if (document.getElementById(id)) 
 {
   alert ('Layer with this ID already exists!')
   return
 }

  var LYR= '\n<div id='+id+' style="position:absolute'
  +'; left:'+L
  +'; top:'+T
  +'; width:'+W
  +'; height:'+H
  +'; clip:rect(0,'+W+','+H+',0)'
  +'; visibility:'+(null==visible || 1==visible ? 'visible':'hidden')
  +(null==zIndex  ? '' : '; z-index:'+zIndex);
  
  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
	  LYR+='; background-color:'+bgColor;
	}
  }
  var frameStyle=' style="position:absolute'
  +'; left:0'
  +'; top:0'
  +'; width:'+W
  +'; height:'+H
  +'; clip:rect(0,'+W+','+H+',0)'
  +(null==zIndex  ? '' : '; z-index:'+zIndex)
  +(null==bgColor ? '' : '; background-color:'+bgColor)+';"';

 	if (bitmapImage!=null)
	{
	
		if (bitmapImage!='')
		{
			LYR+=';layer-background-image:'+bitmapImage;
			LYR+=';background: '+bitmapImage;
		}
	}

  LYR+='"> <iframe id="'+frameID+'" '+frameStyle+'src="'+homePage+'"><ilayer id="contentFrame" '+frameStyle+'src="vsiindex.htm"></ilayer></IFRAME></div>';	
  
    if (document.all) 
 	{
 		document.body.insertAdjacentHTML("BeforeEnd",LYR)
 	}
	else
	{
  		document.body.innerHTML+=LYR;
	}
}

/*****************************************************
 * Make Content Layer
 * --vsi---
 *****************************************************/

function makeLogoLayer(id,homePage,L,T,W,H,bgColor,visible,zIndex,borderStyle,bitmapImage) 
{
 if (document.layers) 
 {
  if (document.layers[id]) 
  {
   alert ('Layer with this ID already exists!')
   return
  }
  var LR=document.layers[id]=new Layer(W)
  LR.name= id
  LR.left= L
  LR.top = T
  LR.clip.height=H
  LR.visibility=(null==visible || 1==visible ? 'show' : 'hide')
  if(null!=zIndex)  LR.zIndex=zIndex

  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
		  LR.bgColor=bgColor;
	}
	else
	{
	  LR.bgColor='null';
	}
  }
  
	if (bitmapImage!=null)
	{
		if (bitmapImage!='')
		{
		  bitmapImage=replaceSubstring(bitmapImage, "url(", "")
		  bitmapImage=replaceSubstring(bitmapImage, ");", "")
	      LR.background.src=bitmapImage;		  
		 }
	}
  return;
 }
 else if (document.all) 
 {
   if (document.all[id]) 
   {
   alert ('Layer with this ID already exists!')
   return
   }
  }
  else if (document.getElementById(id)) 
  {
   alert ('Layer with this ID already exists!')
   return
  }
  var LYR= '\n<div id='+id+' style="position:absolute'
  +'; left:'+L
  +'; top:'+T
  +'; width:'+W
  +'; height:'+H
  +'; clip:rect(0,'+W+','+H+',0)'
  +'; visibility:'+(null==visible || 1==visible ? 'visible':'hidden')
  +(null==zIndex  ? '' : '; z-index:'+zIndex);
  
  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
	  LYR+='; background-color:'+bgColor;
	}
  }

  	if (borderStyle!=null)
	{
		if (borderStyle!='') LYR+=borderStyle;
	}

	var clickBehaviour="expandContentPanel();insertExternalFile('" +homePage + "');";
	clickBehaviour='<a href="#" onClick="'+clickBehaviour+'"><img src="'+bitmapImage+'" border="0"></a>';
    LYR+='">'+clickBehaviour+'</div>';
		
    if (document.all) 
 	{
 		document.body.insertAdjacentHTML("BeforeEnd",LYR)
 	}
	else
	{
  		document.body.innerHTML+=LYR;
	}


}

//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Delete Layer
 * --vsi---
 *****************************************************/
function deleteLayer(id) 
{
alert(browser.name+' : '+browser.versionMajor);

	if ((browser.isNS4up)&&(!browser.isNS6up))
	{
		 if (document.layers && document.layers[id]) 
		 {
		  document.layers[id].visibility='hide'
		  delete document.layers[id]
		 }
	}
	else if ((browser.isIE4x)||(browser.isIE4up))
	{
	
		 if (document.all && document.all[id])
		 {
		  document.all[id].innerHTML=''
		  document.all[id].outerHTML=''
		 }
	 }
 
}

//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Expand Layer
 * --vsi---
 *****************************************************/

function expandLayer(id,L,T,W,H) 
{
	var d=null;
	
	if ((browser.isNS4up)&&(!browser.isNS6up))
	{
  	     d=document.layers[id];
	}
	else if ((browser.isIE4x)||(browser.isIE4up))
	{
		  d=document.all[id];
    }
	else
	{
		  d=document.getElementById(id);
	}
	
	if (d!=null)
	{
		 // Get Current Width and Height and Poisition
		 var currentLeft=(parseInt(d.style.left))?parseInt(d.style.left):0;
		 var currentTop=(parseInt(d.style.top))?parseInt(d.style.top):0;

		 var currentWidth=(parseInt(d.style.width))?parseInt(d.style.width):0;
		 var currentHeight=(parseInt(d.style.height))?parseInt(d.style.height):0;
		
		// Get Target Width and Height and Position
		 var newLeft=parseInt(L);
		 var newTop=parseInt(T);
	
		 var newWidth=parseInt(W);
		 var newHeight=parseInt(H);

	
		 // Translate
		 var dW=newWidth-currentWidth;
 		 var dH=newHeight-currentHeight;

		 // Translate
		 var dx=newLeft-currentLeft;
 		 var dy=newTop-currentTop;
		 var startTime = (new Date()).getTime()						
	 
				var i;

			
					if (dW<dx)
					{
						for (i=0;i<dx;i++)
						{
						d.style.left=i;
						d.style.width=currentWidth-i;
						
							var elapsed = 0;
					
								while (elapsed<5)
								{
									elapsed=(new Date()).getTime() -startTime;						
								}
								
						}
					}
					else
					{
						for (i=0;i<dW;i++)
						{
						d.style.left=currentLeft-i;
						d.style.width=currentWidth+i;								
						
							var elapsed = 0;
					
								while (elapsed<5)
								{
									elapsed=(new Date()).getTime() -startTime;						
								}
								
						}
				     }
//			}
		 
	}
 
}

//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Expand Content Panel Layer
 * --vsi---
 *****************************************************/

function shrinkContentPanel() 
{
	var d=null;
	var f=null;
	var panelID='contentPanel';
	var	frameID='contentFrame';
	
	if ((browser.isNS4up)&&(!browser.isNS6up))
	{
  	     d=document.layers[panelID];
		 f=document.layers[frameID];
	}
	else if ((browser.isIE4x)||(browser.isIE4up))
	{
		  d=document.all[panelID];
		  f=document.all[frameID];
    }
	else
	{
		  d=document.getElementById(panelID);
		  f=document.getElementById(frameID);
	}
	
	if ((d!=null)&&(f!=null))
	{
		 // Get Current Width and Height and Poisition
		 var currentLeft=(parseInt(d.style.left))?parseInt(d.style.left):0;
		 if (currentLeft!=0) return;
		 		 
		 var currentTop=(parseInt(d.style.top))?parseInt(d.style.top):0;

		 var currentWidth=(parseInt(d.style.width))?parseInt(d.style.width):0;
		 var currentHeight=(parseInt(d.style.height))?parseInt(d.style.height):0;
		
		// Get Target Width and Height and Position
		 var newLeft=101;
		 var newTop=227;
	
		 var newWidth=679;
		 var newHeight=440;

	
		 // Translate
		 var dW=newWidth-currentWidth;
 		 var dH=newHeight-currentHeight;

		 // Translate
		 var dx=newLeft-currentLeft;
 		 var dy=newTop-currentTop;
		 var startTime = (new Date()).getTime()						
	 
		 var i;

						for (i=0;i<dx;i++)
						{
						d.style.left=i;
						d.style.width=currentWidth-i;
						f.style.width=currentWidth-i;
						
							var elapsed = 0;
					
								while (elapsed<5)
								{
									elapsed=(new Date()).getTime() -startTime;						
								}
								
						}
		d.style.left=newLeft;
		d.style.width=newWidth;								
		f.style.width=newWidth
		 
	}
 
}
//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Expand Content Panel Layer
 * --vsi---
 *****************************************************/

function expandContentPanel() 
{
	var d=null;
	var f=null;
	var panelID='contentPanel';
	var	frameID='contentFrame';
	
	if ((browser.isNS4up)&&(!browser.isNS6up))
	{
  	     d=document.layers[panelID];
		 f=document.layers[frameID];
	}
	else if ((browser.isIE4x)||(browser.isIE4up))
	{
		  d=document.all[panelID];
		  f=document.all[frameID];
    }
	else
	{
		  d=document.getElementById(panelID);
		  f=document.getElementById(frameID);
	}
			if (activePanelID!="")
			{
				ypSlideOutMenu.hideMenu(activePanelID);
				activePanelID="";
			}

	if ((d!=null)&&(f!=null))
	{
		 // Get Current Width and Height and Poisition
		 var currentLeft=(parseInt(d.style.left))?parseInt(d.style.left):0;
		 if (currentLeft!=101) return;
		 		 
		 var currentTop=(parseInt(d.style.top))?parseInt(d.style.top):0;

		 var currentWidth=(parseInt(d.style.width))?parseInt(d.style.width):0;
		 var currentHeight=(parseInt(d.style.height))?parseInt(d.style.height):0;
		
		// Get Target Width and Height and Position
		 var newLeft=0;
		 var newTop=227;
	
		 var newWidth=780
		 var newHeight=440;

	
		 // Translate
		 var dW=newWidth-currentWidth;
 		 var dH=newHeight-currentHeight;

		 // Translate
		 var dx=newLeft-currentLeft;
 		 var dy=newTop-currentTop;
		 var startTime = (new Date()).getTime()							 
		 var i;

			
						for (i=0;i<dW;i++)
						{
						d.style.left=currentLeft-i;
						d.style.width=currentWidth+i;								
						f.style.width=currentWidth+i;
						
							var elapsed = 0;
					
								while (elapsed<5)
								{
									elapsed=(new Date()).getTime() -startTime;						
								}
								
						}
		 
		d.style.left=newLeft;
		d.style.width=newWidth;								
		f.style.width=newWidth
	}
 
}

//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Preload Routine
 * --vsi---
 *****************************************************/

/*
0 "http://www.vsi-us.com/images/flag.gif",
1 "http://www.vsi-us.com/images/gal.jpg",
3 "http://www.vsi-us.com/images/aboutvsi.jpg",
2 "http://www.vsi-us.com/images/galis.jpg",
4 "http://www.vsi-us.com/images/graphicalmetaphor.jpg",
5 "http://www.vsi-us.com/images/legal.jpg",
6 "http://www.vsi-us.com/images/linkanalysis.jpg",
7 "http://www.vsi-us.com/images/links.jpg",
8 "http://www.vsi-us.com/images/mdseal.jpg",
9 "http://www.vsi-us.com/images/midas.jpg",
10 "http://www.vsi-us.com/images/newsL.jpg",
11 "http://www.vsi-us.com/images/newsR.jpg",
12 "http://www.vsi-us.com/images/pressrelease.jpg",
13 "http://www.vsi-us.com/images/productsL.jpg",
14 "http://www.vsi-us.com/images/productsR.jpg",
15 "http://www.vsi-us.com/images/referenceL.jpg",
16"http://www.vsi-us.com/images/schema.jpg",
17 "http://www.vsi-us.com/images/servicesL.jpg",
18 "http://www.vsi-us.com/images/servicesR.jpg",
19 "http://www.vsi-us.com/images/spacer.jpg",
20 "http://www.vsi-us.com/images/systemofsystems.jpg",
21 "http://www.vsi-us.com/images/titanlogo.jpg",
22 "http://www.vsi-us.com/images/ts.jpg",
23 "http://www.vsi-us.com/images/tsm.jpg",
24 "http://www.vsi-us.com/images/calendar.jpg",
25 "http://www.vsi-us.com/images/vsilogosm.jpg",
26 "http://www.vsi-us.com/images/bottomBackground.jpg",
27 "http://www.vsi-us.com/images/topbackground.jpg",
28 "http://www.vsi-us.com/images/mainbackground.jpg",
29 "http://www.vsi-us.com/images/geospatial.jpg",
30 "http://www.vsi-us.com/images/background.jpg",
31 "http://www.vsi-us.com/images/ca_logo_v.jpg",
32 "http://www.vsi-us.com/images/careers.jpg",
33 "http://www.vsi-us.com/images/clients.jpg",
34 "http://www.vsi-us.com/images/companyL.jpg",
35 "http://www.vsi-us.com/images/companyR.jpg",
36 "http://www.vsi-us.com/images/contact.jpg",
37 "http://www.vsi-us.com/images/contactinfo.jpg",
38 "http://www.vsi-us.com/images/contactL.jpg",
39 "http://www.vsi-us.com/images/contactR.jpg",
40 "http://www.vsi-us.com/images/directions.jpg",
41 "http://www.vsi-us.com/images/dodseal.jpg");
*/
var mypix = new Array() 
function preloadImages(){ 
  for (i=0; i<preloadImages.arguments.length;i++){ 
    mypix[i]=new Image(); 
    mypix[i].src=preloadImages.arguments[i]; 
  } 
} // now allocate first photo 
/*
"http://www.vsi-us.com/images/flag.gif",
"http://www.vsi-us.com/images/vsilogosm.jpg",
"http://www.vsi-us.com/images/companyL.jpg",
"http://www.vsi-us.com/images/companyR.jpg",
"http://www.vsi-us.com/images/productsL.jpg",
"http://www.vsi-us.com/images/productsR.jpg",
"http://www.vsi-us.com/images/servicesL.jpg",
"http://www.vsi-us.com/images/servicesR.jpg",
"http://www.vsi-us.com/images/newsL.jpg",
"http://www.vsi-us.com/images/newsR.jpg",
"http://www.vsi-us.com/images/referenceL.jpg",
"http://www.vsi-us.com/images/topbackground.jpg",
"http://www.vsi-us.com/images/mainbackground.jpg",
"http://www.vsi-us.com/images/bottomBackground.jpg",
"http://www.vsi-us.com/images/background.jpg",
"http://www.vsi-us.com/images/systemofsystems.jpg",
"http://www.vsi-us.com/images/schema.jpg",
"http://www.vsi-us.com/images/linkanalysis.jpg",
"http://www.vsi-us.com/images/geospatial.jpg",
"http://www.vsi-us.com/images/graphicalmetaphor.jpg",
"http://www.vsi-us.com/images/calendar.jpg");
*/

function initImgs()
{
preloadImages(
"http://www.vsi-us.com/images/systemofsystems.jpg",
"http://www.vsi-us.com/images/schema.jpg",
"http://www.vsi-us.com/images/linkanalysis.jpg",
"http://www.vsi-us.com/images/geospatial.jpg",
"http://www.vsi-us.com/images/graphicalmetaphor.jpg",
"http://www.vsi-us.com/images/calendar.jpg");
}//--> 

//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Main Setup Routine
 * --vsi---
 *****************************************************/

function initialize()
{

	var singleSolidBorder='border: 1px; border-color: #000000;border-style: solid;';

	var	flagBitmap='url(images/flag.gif);'
	var	logoBitmap='images/vsilogosm.jpg'
	var	topBitmap='url(images/topBackground.jpg);'
	var	bottomBitmap='url(images/bottomBackground.jpg);'

	makeLayer('topPanel',0,0,780,100,'transparent',1,249,'',topBitmap);
	makeLayer('flagPanel',656,7,124,64,'transparent',1,250,'',flagBitmap);
	makeLayer('datePanel',0,79,780,21,'blue',1,250,"","");
	makeLogoLayer('logoPanel','vsiindex.htm',0,101,100,126,'transparent',1,250,'',logoBitmap);
	makeLayer('menuLayer',100,101,679,126,'transparent',1,250,"","");
	makeLayer('sidePanel',0,227,100,440,'transparent',1,240,"","");


	makeContentLayer('contentPanel','contentFrame','vsiindex.htm',0,227,780,440,'transparent',1,250,singleSolidBorder,"");
	makeBottomLayer('bottomPanel',0,667,780,50,'blue',1,250,"",bottomBitmap);
	
	setupMenuPanels();
	setupSideContainerPanels();
	
	if (document.layers)
	{
	}
	else if (document.all)
	{
	}
	else if (document.getElementById('menuPanel'))
	{
			var	rolloverBitmap='url(images/vsilogosm.jpg);'
 // 		    makerolloverLayer('rolloverBitmap',L,T,W,H,bgColor,visible,zIndex,bitmapImage) 
   		    makerolloverLayer('rolloverBitmap',0,0,533,389,"null",0,270,rolloverBitmap);	
   		    //makeLayer('rolloverBitmap',200,200,533,389,"null",0,270,'',rolloverBitmap);	
	}	
	initImgs();
	//centerLayout();
}

function centerLayout()
{
	centerPanel('topPanel');
	//centerPanel('flagPanel');
	centerPanel('datePanel');
	centerPanel('logoPanel');
	centerPanel('menuLayer');
	//centerPanel('sidePanel');


	centerPanel('contentPanel');
	centerPanel('bottomPanel');
}

function centerPanel(layerName)
{
   var layoutWidth = 800;

   if (navigator.appName == 'Netscape') {
      var bodyWidth = self.innerWidth;
      var theOffset = (bodyWidth - layoutWidth)/2;
      if (theOffset > 0)
         document.layers[layerName].left = theOffset;
     } else {
      var bodyWidth = document.body.offsetWidth;
      var theOffset = (bodyWidth - layoutWidth)/2;
      if (theOffset > 0)
         document.all.tags('DIV')[layerName].style.left = theOffset;
     }
}

//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Create Menu Container Layer
 * --vsi---
 *****************************************************/
/*
	makeMenuContainerLayer('company','menuLayer',0,0,100,126,'transparent',1,250,null,companyLBitmap);
	makeMenuLayer('company','Company',0,0,100,16,'transparent',1,251,null,null);
	makeMenuContainer('company','menuLayer',8,companyContainerContents,companyContainerSeparators,companyHyperLinks,companySidePanels,100,0,100,126,'transparent',1,249,null,companyRBitmap);
*/

function makeMenuContainerLayer(id,parentID,L,T,W,H,bgColor,visible,zIndex,borderStyle,bitmapImage) 
{
 var groupID=id;
 id=id+'ContainerPanel';
 
 if (document.layers) 
 {
  if (document.layers[parentID].document.layers[id]) 
  {
   alert ('Layer with this ID already exists!')
   return
  }
//  var LR=document.layers[id]=new Layer(W)
	var LR=document.layers[parentID].document.layers[id] = new Layer(W, document.layers[parentID]);

  LR.name= id
  LR.left= L
  LR.top = T
  LR.clip.height=H
  LR.visibility=(null==visible || 1==visible ? 'show' : 'hide')
  if(null!=zIndex)  LR.zIndex=zIndex
  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
		  LR.bgColor=bgColor;
	}
	else
	{
//	  LR.bgColor='null';
	}
  }
  
	if (bitmapImage!=null)
	{
		if (bitmapImage!='')
		{
		  bitmapImage=replaceSubstring(bitmapImage, "url(", "")
		  bitmapImage=replaceSubstring(bitmapImage, ");", "")
	      LR.background.src=bitmapImage;		  
		 }
	}

			var mouseOverBehaviour="slideOutPanels('" + groupID + "')');";
			var mouseOutBehaviour="slideInPanels('" + groupID + "')');";
			var mouseBehaviour='<a onmouseover="'+mouseOverBehaviour+'" onmouseout="'+mouseOutBehaviour+'"></a>';
//		LR.document.write(mouseBehaviour);
//		LR.document.close();
//    <a href="javascript:;"  onmouseover="slideOutPanels('company');" onmouseout="slideInPanels('company')"><img src="images/companyL.jpg" border="0"></a> 

		
	LR.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);	
	LR.onmouseover = new Function("slideOutPanels('" + groupID + "')");
	LR.onmouseout = new Function("slideInPanels('" + groupID + "')");
	return;		
 }
 else if (document.all) 
 {
  if (document.all[id]) 
  {
   alert ('Layer with this ID already exists!')
   return
  }
 }
 else if (document.getElementById(id)) 
 {
   alert ('Layer with this ID already exists!')
   return
 }
   
  var LYR= '\n<div id="'+id+'" style="position:absolute'
  +'; left:'+L
  +'; top:'+T
  +'; width:'+W
  +'; height:'+H
  +'; clip:rect(0,'+W+','+H+',0)'
  +'; visibility:'+(null==visible || 1==visible ? 'visible':'hidden')
  +(null==zIndex  ? '' : '; z-index:'+zIndex);
  
  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
	  LYR+='; background-color:'+bgColor;
	}
  }


  	if (borderStyle!=null)
	{
		if (borderStyle!='') LYR+=borderStyle;
	}
  	if (bitmapImage!=null)
	{
	
		if (bitmapImage!='')
		{
			LYR+=';layer-background-image:'+bitmapImage;
			LYR+=';background: '+bitmapImage;
		}
	}
    

    if (document.all) 
 	{
		
		if (document.all[parentID]!=null)
		{	
		    LYR+='"></div>';
			
			document.all[parentID].insertAdjacentHTML("BeforeEnd",LYR)
			
			var	thisElement=document.all[id]
			
				if (thisElement!=null)
				{
					thisElement.onmouseover = new Function("slideOutPanels('" + groupID + "')");
					thisElement.onmouseout = new Function("slideInPanels('" + groupID + "')");
				}
				else
				{
					alert('Cannot Find Element '+id);
				}
			
		}
 	}
	else
	{
	    var parent=document.getElementById(parentID);

		if (parent!=null)
		{
		    
			var mouseOverBehaviour="slideOutPanels('" + groupID + "');";
			var mouseOutBehaviour="slideInPanels('" + groupID + "');";
			var mouseBehaviour='<a  onmouseover="'+mouseOverBehaviour+'" onmouseout="'+mouseOutBehaviour+'">';
			
		    LYR+='"></div>';
			
			var LYR1=mouseBehaviour+LYR+'</a>';
  			parent.innerHTML+=LYR1;
			
		}
	}
}

//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Create Menu Layer
 * --vsi---
 *****************************************************/
/*
	makeMenuContainerLayer('company','menuLayer',0,0,100,126,'transparent',1,250,null,companyLBitmap);
	makeMenuLayer('company','Company',0,0,100,16,'transparent',1,251,null,null);
	makeMenuContainer('company','menuLayer',8,companyContainerContents,companyContainerSeparators,companyHyperLinks,companySidePanels,100,0,100,126,'transparent',1,249,null,companyRBitmap);
*/

function makeMenuLayer(groupID,label,L,T,W,H,bgColor,visible,zIndex,borderStyle,bitmapImage) 
{
 
 parentID=groupID+'ContainerPanel';
 var id='menuPanel';

 if (document.layers) 
 {
 
  var LR=document.layers['menuLayer'].document.layers[parentID].document.layers[id]=new Layer(W,document.layers['menuLayer'].document.layers[parentID]);

  LR.name= id
  LR.left= L
  LR.top = T
  LR.clip.height=H
  LR.visibility=(null==visible || 1==visible ? 'show' : 'hide')

  if(null!=zIndex)  LR.zIndex=zIndex

    if(null!=bgColor) 
    {
  		if (bgColor!='transparent')
		{
		  LR.bgColor=bgColor;
		}
		else
		{
//		  LR.bgColor='null';
		}
    }
  
	if (bitmapImage!=null)
	{
		if (bitmapImage!='')
		{
		  bitmapImage=replaceSubstring(bitmapImage, "url(", "")
		  bitmapImage=replaceSubstring(bitmapImage, ");", "")
	      LR.background.src=bitmapImage;		  
		 }
	}


	LR.document.write('<div id="'+id+'">'+label+'</div>');
	LR.document.close();

	return;
 }
 
  var LYR= '\n<div id='+id+' style="position:absolute'
  +'; left:'+L
  +'; top:'+T
  +'; width:'+W
  +'; height:'+H
  +'; clip:rect(0,'+W+','+H+',0)'
  +'; visibility:'+(null==visible || 1==visible ? 'visible':'hidden')
  +(null==zIndex  ? '' : '; z-index:'+zIndex);

  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
	  LYR+='; background-color:'+bgColor;
	}
  }



  	if (borderStyle!=null)
	{
		if (borderStyle!='') LYR+=borderStyle;
	}
	
  	if (bitmapImage!=null)
	{
		if (bitmapImage!='')
		{
			LYR+='layer-background-image:'+bitmapImage;
			LYR+='background: '+bitmapImage;
		}
	}


  
   if (document.all) 
   {
	  LYR+='">'+label+'</div>';
 
		if (document.all[parentID]!=null)
		{	
			document.all[parentID].insertAdjacentHTML("BeforeEnd",LYR)
//			document.all[parentID].onmouseover = new Function("slideOutPanels('" + groupID + "')")
//			document.all[parentID].onmouseout = new Function("slideInPanels('" + groupID + "')")
		}
   }
   else
   {
   
	  LYR+='"><font color="#000000">'+label+'</font></div>';
   
   		var parent=document.getElementById(parentID);

		
			if (parent!=null)
			{
  			parent.innerHTML+=LYR;		
		   }
   }
	

}
//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Create Menu Link Layer
 * --vsi---
 *****************************************************/

function makeMenuLinkLayer(groupID,label,sidePanel,hyperlink,L,T,W,H,bgColor,visible,zIndex,borderStyle,bitmapImage) 
{
 
 parentID=groupID+'ContainerPanel';
 var id='menuPanel';

 if (document.layers) 
 {
  var LR=document.layers['menuLayer'].document.layers[parentID].document.layers[id]=new Layer(W,document.layers['menuLayer'].document.layers[parentID])
  LR.name= id
  LR.left= L
  LR.top = T
  LR.clip.height=H
  LR.visibility=(null==visible || 1==visible ? 'show' : 'hide')
  if(null!=zIndex)  LR.zIndex=zIndex

  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
		  LR.bgColor=bgColor;
	}
	else
	{
//	  LR.bgColor='null';
	}
  }
  
	if (bitmapImage!=null)
	{
		if (bitmapImage!='')
		{
		  bitmapImage=replaceSubstring(bitmapImage, "url(", "")
		  bitmapImage=replaceSubstring(bitmapImage, ");", "")
	      LR.background.src=bitmapImage;		  
		 }
	}
	
			var clickBehaviour="shrinkContentPanel();slideMenuPanel('" + sidePanel + "');insertExternalFile('" + hyperlink + "');";
			clickBehaviour='<span id="menuPanel"><u>'+label+'<u></span>';

	 var LYR='<layer id="menuPanel">'+clickBehaviour+'</layer>';
	 LR.document.write(LYR);
	 LR.document.close();
   return;
 }

  var LYR= '\n<div id='+id+' style="position:absolute'
  +'; left:'+L
  +'; top:'+T
  +'; width:'+W
  +'; height:'+H
  +'; clip:rect(0,'+W+','+H+',0)'
  +'; visibility:'+(null==visible || 1==visible ? 'visible':'hidden')
  +(null==zIndex  ? '' : '; z-index:'+zIndex);

  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
	  LYR+='; background-color:'+bgColor;
	}
  }


  	if (borderStyle!=null)
	{
		if (borderStyle!='') LYR+=borderStyle;
	}
	
  	if (bitmapImage!=null)
	{
		if (bitmapImage!='')
		{
			LYR+='layer-background-image:'+bitmapImage;
			LYR+='background: '+bitmapImage;
		}
	}

			var clickBehaviour="shrinkContentPanel();slideMenuPanel('" + sidePanel + "');insertExternalFile('" + hyperlink + "');";
			clickBehaviour='<a href="#" onClick="'+clickBehaviour+'"><font color="#330099"><u>'+label+'<u></font></a>';

  LYR+='">'+clickBehaviour+'</div>';
   
   if (document.all) 
   {
		if (document.all[parentID]!=null)
		{	
			document.all[parentID].insertAdjacentHTML("BeforeEnd",LYR)
		}
   }
   else
   {
   		var parent=document.getElementById(parentID);
	
			if (parent!=null)
			{
  			parent.innerHTML+=LYR;
		   }
   }
}

//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Create Menu Container
 * --vsi---
 *****************************************************/
/*
	makeMenuContainerLayer('company','menuLayer',0,0,100,126,'transparent',1,250,null,companyLBitmap);
	makeMenuLayer('company','Company',0,0,100,16,'transparent',1,251,null,null);
	makeMenuContainer('company','menuLayer',8,companyContainerContents,companyContainerSeparators,companyHyperLinks,companySidePanels,100,0,100,126,'transparent',1,249,null,companyRBitmap);
*/

function makeMenuContainer(groupID,parentID,spaces,contents,separators,hyperlinks,sidePanels,L,T,W,H,bgColor,visible,zIndex,borderStyle,bitmapImage) 
{
//  var LR=document.layers['menuLayer'].document.layers[parentID].document.layers[id]=new Layer(W,document.layers['menuLayer'].document.layers[parentID]);

 var id=groupID+'Container';

 if (document.layers) 
 {
  var LR=document.layers[parentID].document.layers[id] = new Layer(W, document.layers[parentID]);
  LR.name= id
  LR.left= L
  LR.top = T
  LR.clip.height=H
  LR.visibility=(null==visible || 1==visible ? 'show' : 'hide')
  if(null!=zIndex)  LR.zIndex=zIndex
  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
		  LR.bgColor=bgColor;
	}
	else
	{
//		  LR.bgColor='"null"';
	}
  }
  
	if (bitmapImage!=null)
	{
		if (bitmapImage!='')
		{
		  bitmapImage=replaceSubstring(bitmapImage, "url(", "")
		  bitmapImage=replaceSubstring(bitmapImage, ");", "")
	      LR.background.src=bitmapImage;		  
		 }
	}
	
 	var i,j;
	var	nMenuItems=contents.length
	var	menuContents='';
	var	nSeparators=0;
	var	nSpaces=parseInt(spaces);
	var	strSpaces="";
	
		for (i=0;i<nSpaces;i++)
		{
		//	strSpaces+="&nbsp;";
		}
			
		for (i=0;i<nMenuItems;i++)
		{
			nSeparators=parseInt(separators[i]);
			
				for (j=0;j<nSeparators;j++)
				{
					menuContents+='<br>';
				}
				
			menuContents+='<br>';
			menuContents+='<layer id="menuPanel">'+strSpaces+contents[i]+'</layer>';
		}
		
		LR.document.write(menuContents);
		LR.document.close();
		
		LR.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);	
  		LR.onmouseover = new Function("slideOutPanels('" + groupID + "')")
		LR.onmouseout = new Function("slideInPanels('" + groupID + "')")
        return;
 }

  var LYR= '\n<div id='+id+' align="center" style="position:absolute'
  +'; left:'+L
  +'; top:'+T
  +'; width:'+W
  +'; height:'+H
  +'; clip:rect(0,'+W+','+H+',0)'
  +'; visibility:'+(null==visible || 1==visible ? 'visible':'hidden')
  +(null==zIndex  ? '' : '; z-index:'+zIndex);

  if(null!=bgColor) 
  {
  	if (bgColor!='transparent')
	{
	  LYR+='; background-color:'+bgColor;
	}
  }


  	if (borderStyle!=null)
	{
		if (borderStyle!='') LYR+=';'+borderStyle;
	}
  	if (bitmapImage!=null)
	{
	
		if (bitmapImage!='')
		{
			LYR+=';layer-background-image:'+bitmapImage;
			LYR+=';background: '+bitmapImage;
		}
	}
 
 	var i,j;
	var	nMenuItems=contents.length
//var	menuContents='<div id="'+groupID+'Content">';
	var	menuContents='';
	var	nSeparators=0;
	var	nSpaces=parseInt(spaces);
	var	strSpaces="";
	
		for (i=0;i<nSpaces;i++)
		{
			strSpaces+="&nbsp;";
		}
			
		for (i=0;i<nMenuItems;i++)
		{
			nSeparators=parseInt(separators[i]);
			
				for (j=0;j<nSeparators;j++)
				{
					menuContents+='<br>';
				}
				
			menuContents+='<br>';
			var clickBehaviour="shrinkContentPanel();insertExternalFile('" + hyperlinks[i] + "');slideMenuPanel('" + sidePanels[i] + "');";
			menuContents+='<div id="'+sidePanels[i]+'"><span id="h1">'+strSpaces+'<a href="#" onClick="'+clickBehaviour+'">'+contents[i]+'</a></span></div>';
		}
//menuContents+='</div>';

   if (document.all) 
   {
		LYR+='">'+menuContents+'</div>';
		
		if (document.all[parentID]!=null)
		{	
 		document.all[parentID].insertAdjacentHTML("BeforeEnd",LYR)
		
		document.all[id].onmouseover = new Function("slideOutPanels('" + groupID + "')")
		document.all[id].onmouseout = new Function("slideInPanels('" + groupID + "')")
		
		}
   }
   else
   {
   		var parent=document.getElementById(parentID);
		
			if (parent!=null)
			{
			var mouseOverBehaviour="slideOutPanels('" + groupID + "');";
			var mouseOutBehaviour="slideInPanels('" + groupID + "');";
			var mouseBehaviour='<a  onmouseover="'+mouseOverBehaviour+'" onmouseout="'+mouseOutBehaviour+'">';
			
			LYR+='">'+menuContents+'</div>';
			
			var LYR1=mouseBehaviour+LYR+'</a>';

  			parent.innerHTML+=LYR1;
		   }
   }
}
//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Create Menu Container
 * --vsi---
 *****************************************************/

function makeSideMenuPanelContainer(id,parentID,label,tagLabel,subContents,subContentTags,subContentHyperlinks,L,T,W,H,bgColor,visible,zIndex,borderStyle,bitmapImage) 
{

  var containerID=id+'Container';
  var contentID=id+'Content';
  
 if (document.layers) 
 {
  var LR=document.layers[containerID]=new Layer(W)
  LR.name= id
  LR.left= L
  LR.top = T
  LR.clip.height=H
  LR.visibility=(null==visible || 1==visible ? 'show' : 'hide')
  if(null!=zIndex)  LR.zIndex=zIndex;
  if(null!=bgColor) LR.bgColor=bgColor;
  
   return;
 }

  var LYR= '\n<div id='+containerID+' align="left" style="position:absolute'
  +'; left:'+L
  +'; top:'+T
  +'; width:'+W
  +'; height:'+H
  +'; clip:rect(0,'+W+','+H+',0)'
  +'; visibility:'+(null==visible || 1==visible ? 'visible':'hidden')
  +(null==zIndex  ? '' : '; z-index:'+zIndex);
//  +(null==bgColor ? '' : '; background-color:'+bgColor);


  	if (borderStyle!=null)
	{
		if (borderStyle!='') LYR+=';'+borderStyle;
	}
	
	var content='<div id="'+contentID+'"><'+tagLabel+'>'+label+'</'+tagLabel+'>';
	
		if ((subContents!=null)&&(subContentTags!=null)&&(subContentHyperlinks!=null))
		{
			var i;
			var nSubContents=subContents.length;

				for (i=0;i<nSubContents;i++)
				{
					var subContentHead='<'+subContentTags[i]+'><a href="#" onClick="';
					var subContentClickBehaviour="insertExternalFile('"+ subContentHyperlinks[i] + "');";
					var subContentTail='">'+subContents[i]+'</a></'+subContentTags[i]+'>';
					content+=subContentHead+subContentClickBehaviour+subContentTail;
				}
		}
		
  	if (bitmapImage!=null)
	{	
		if (bitmapImage!='')
		{
			content+=bitmapImage;
		}
	}
	
	content+='</div>';
		
	LYR+='">'+content+'</div>';

    if (document.all) 
    {
		if (document.all[parentID]!=null)
		{	
			document.all[parentID].insertAdjacentHTML("BeforeEnd",LYR)
			
		}
	}
    else
    {
   		var parent=document.getElementById(parentID);
		
			if (parent!=null)
			{
  			parent.innerHTML+=LYR;
			}
	 }
	
}

//////////////////////////////////////////////////////////////////////////////////////////////////

/*****************************************************
 * Set up Menu Panels
 * --vsi---
 *****************************************************/

function setupMenuPanels()
{
	var	companyLBitmap='url(images/companyL.jpg);';
	var	companyRBitmap='url(images/companyR.jpg);';

	var	productsLBitmap='url(images/productsL.jpg);';
	var	productsRBitmap='url(images/productsR.jpg);';

	var servicesLBitmap='url(images/servicesL.jpg);';
	var servicesRBitmap='url(images/servicesR.jpg);';

	var newsLBitmap='url(images/newsL.jpg);';
	var newsRBitmap='url(images/newsR.jpg);';

	var contactLBitmap='url(images/contactL.jpg);';
	var contactRBitmap='url(images/contactR.jpg);';

	var linkBitmap='url(images/links.jpg);';
	
	var	companyContainerContents=new Array(3);
	var	companyContainerSeparators=new Array(3);
	var	companyHyperLinks=new Array(3);
	var	companySidePanels=new Array(3);

	var	productsContainerContents=new Array(2);
	var	productsContainerSeparators=new Array(2);
	var 	productsHyperLinks=new Array(2);
	var	productsSidePanels=new Array(2);

	var	servicesContainerContents=new Array(2);
	var	servicesContainerSeparators=new Array(2);
	var 	servicesHyperLinks=new Array(2);
	var	servicesSidePanels=new Array(2);

	var	newsContainerContents=new Array(1);
	var	newsContainerSeparators=new Array(1);
	var 	newsHyperLinks=new Array(1);
	var	newsSidePanels=new Array(1);

//	var	contactContainerContents=new Array(2);
//	var	contactContainerSeparators=new Array(2);
	var	contactContainerContents=new Array(1);
	var	contactContainerSeparators=new Array(1);
	var	contactHyperLinks=new Array(2);
	var	contactSidePanels=new Array(2);
	
	
	companyContainerContents[0]='About VSi';
	companyContainerContents[1]='Partners';
	companyContainerContents[2]='Clients';
	companyContainerContents[3]='Careers';

	companyContainerSeparators[0]=0;
	companyContainerSeparators[1]=0;
	companyContainerSeparators[2]=0;
	companyContainerSeparators[3]=0;

	companyHyperLinks[0]='company/aboutvsi.htm';
	companyHyperLinks[1]='company/partners.htm';
	companyHyperLinks[2]='company/clients.htm';
	companyHyperLinks[3]='company/careers.htm';

	companySidePanels[0]='aboutVSi';
	companySidePanels[1]='partners';
	companySidePanels[2]='clients';
	companySidePanels[3]='careers';
	
	productsContainerContents[0]='MIDaS&#8482;';
	productsContainerContents[1]='GALIS&#8482;';

	productsContainerSeparators[0]=1;
	productsContainerSeparators[1]=2;

	productsHyperLinks[0]='products/midas/midashome.htm';
	productsHyperLinks[1]='products/galis/galishome.htm';

	productsSidePanels[0]='midas';
	productsSidePanels[1]='galis';

	servicesContainerContents[0]='Technical Support and Maintenance';
	servicesContainerContents[1]='Technical Services';

	servicesContainerSeparators[0]=1;
	servicesContainerSeparators[1]=2;

	servicesHyperLinks[0]='services/vsitechicalsupport.htm';
	servicesHyperLinks[1]='services/vsiservices.htm';

	servicesSidePanels[0]='technicalSupportAndMaintenance';
	servicesSidePanels[1]='technicalServices';
	
	newsContainerContents[0]='Press Releases';
	newsContainerSeparators[0]=1;
	
	newsHyperLinks[0]='news/vsipress.htm';

	newsSidePanels[0]='pressReleases';
	
	contactContainerContents[0]='Contact Information';
/*	contactContainerContents[1]='Directions'; */
	
	contactContainerSeparators[0]=1;
/*		contactContainerSeparators[1]=2;  */

	contactHyperLinks[0]='contact/contact.htm';
/*		contactHyperLinks[1]='contact/directions.htm'; */

	contactSidePanels[0]='contactInformation';
/*	contactSidePanels[1]='directions'; */



	makeMenuContainerLayer('company','menuLayer',0,0,100,126,'transparent',1,250,null,companyLBitmap);
	makeMenuLayer('company','Company',0,0,100,16,'transparent',1,251,null,null);
	makeMenuContainer('company','menuLayer',8,companyContainerContents,companyContainerSeparators,companyHyperLinks,companySidePanels,100,0,100,126,'transparent',1,249,null,companyRBitmap);

	makeMenuContainerLayer('products','menuLayer',100,0,100,126,'transparent',1,250,null,productsLBitmap);
	makeMenuLayer('products','Products',0,0,100,16,'transparent',1,251,null,null);
	makeMenuContainer('products','menuLayer',0,productsContainerContents,productsContainerSeparators,productsHyperLinks,productsSidePanels,200,0,100,126,'transparent',1,249,null,productsRBitmap);

	makeMenuContainerLayer('services','menuLayer',200,0,100,126,'transparent',1,250,null,servicesLBitmap);
	makeMenuLayer('services','Services',0,0,100,16,'transparent',1,251,null,null);
	makeMenuContainer('services','menuLayer',0,servicesContainerContents,servicesContainerSeparators,servicesHyperLinks,servicesSidePanels,300,0,181,126,'transparent',1,249,null,servicesRBitmap);

	makeMenuContainerLayer('news','menuLayer',300,0,100,126,'transparent',1,250,null,newsLBitmap);
	makeMenuLayer('news','News',0,0,100,16,'transparent',1,251,null,null);
	makeMenuContainer('news','menuLayer',0,newsContainerContents,newsContainerSeparators,newsHyperLinks,newsSidePanels,400,0,100,126,'transparent',1,248,null,newsRBitmap);

	makeMenuContainerLayer('contact','menuLayer',400,0,100,126,'transparent',1,250,null,contactLBitmap);
	makeMenuLayer('contact','Contact',0,0,100,16,'transparent',1,251,null,null);
	makeMenuContainer('contact','menuLayer',0,contactContainerContents,contactContainerSeparators,contactHyperLinks,contactSidePanels,500,0,120,126,'transparent',1,250,null,contactRBitmap);

	makeMenuContainerLayer('links','menuLayer',500,0,179,126,'transparent',1,260,null,linkBitmap);
	makeMenuLayer('links','Links',0,0,179,16,'transparent',1,260,null,null);
	makeMenuLinkLayer('links','Links','links','reference/links.htm',0,0,179,16,'transparent',1,260,null,null);	
//	makeMenuContainer('links','menuLayer',0,linkContainerContents,linkContainerSeparators,linkHyperLinks,linkSidePanels,500,0,179,126,'transparent',0,0,null,linkBitmap);
}

//////////////////////////////////////////////////////////////////////////////////////////////////

function setupSideContainerPanels()
{

	var	aboutVSiBitmap='<img src="images/aboutvsi.jpg" border="0">';
	var	clientsBitmap='<img src="images/clients.jpg" border="0">';
	var     partnersBitmap='<img src="images/partners.jpg" border="0">';
	var 	careersBitmap='<img src="images/careers.jpg" border="0">';

	var midasBitmap='<img src="images/midas.jpg" border="0">';
	var galisBitmap='<img src="images/galis.jpg" border="0">';

	var tsmBitmap='<img src="images/tsm.jpg" border="0">';
	var tsBitmap='<img src="images/ts.jpg" border="0">';

	var pressReleasesBitmap='<img src="images/pressrelease.jpg" border="0">';
	
	var contactinfoBitmap='<img src="images/contactinfo.jpg" border="0">';
	var directionsBitmap='<img src="images/directions.jpg" border="0">';
	var referencesBitmap='<img src="images/referenceL.jpg" border="0">';
	var legalBitmap='<img src="images/legal.jpg" border="0">';

	
	var	midasSideMenuPanelSubContents=new Array(4);
	var	midasSideMenuPanelSubContentTags=new Array(4);
	var	midasSideMenuPanelSubContentHyperLinks=new Array(4);
	
	midasSideMenuPanelSubContents[0]='Current Practice';
	midasSideMenuPanelSubContentTags[0]='h3';
	midasSideMenuPanelSubContentHyperLinks[0]='products/midas/currentpractice1.htm';

	midasSideMenuPanelSubContents[1]='New Technology';
	midasSideMenuPanelSubContentTags[1]='h3';
	midasSideMenuPanelSubContentHyperLinks[1]='products/midas/newtechnology1.htm';

	midasSideMenuPanelSubContents[2]='MIDaS History';
	midasSideMenuPanelSubContentTags[2]='h3';
	midasSideMenuPanelSubContentHyperLinks[2]='products/midas/midasbackground1.htm';

	midasSideMenuPanelSubContents[3]='MIDaS';
	midasSideMenuPanelSubContentTags[3]='h3';
	midasSideMenuPanelSubContentHyperLinks[3]='products/midas/midas1.htm';

	var	galisSideMenuPanelSubContents=new Array(1);
	var	galisSideMenuPanelSubContentTags=new Array(1);
	var	galisSideMenuPanelSubContentHyperLinks=new Array(1);
	
	//galisSideMenuPanelSubContents[0]='Support';
	//galisSideMenuPanelSubContentTags[0]='h3';
	//galisSideMenuPanelSubContentHyperLinks[0]='http://www.vsi-us.com/majicsupport/';

//	var	directionsSideMenuPanelSubContents=new Array(3);
//	var	directionsSideMenuPanelSubContentTags=new Array(3);
//	var 	directionsSideMenuPanelSubContentHyperLinks=new Array(3);
	
	var	directionsSideMenuPanelSubContents=new Array(2);
	var	directionsSideMenuPanelSubContentTags=new Array(2);
	var 	directionsSideMenuPanelSubContentHyperLinks=new Array(2);


	directionsSideMenuPanelSubContents[0]='Baltimore';
	directionsSideMenuPanelSubContentTags[0]='h3';
	directionsSideMenuPanelSubContentHyperLinks[0]='contact/Baltimore.htm';
	
	directionsSideMenuPanelSubContents[1]='Washington, DC';
	directionsSideMenuPanelSubContentTags[1]='h3';
	directionsSideMenuPanelSubContentHyperLinks[1]='contact/WashingtonDC.htm';
	
/*
	directionsSideMenuPanelSubContents[2]='Charlotte-Douglas (CLT)';
	directionsSideMenuPanelSubContentTags[2]='h3';
	directionsSideMenuPanelSubContentHyperLinks[2]='contact/clt.htm';
*/
	var	legalSideMenuPanelSubContents=new Array(2);
	var	legalSideMenuPanelSubContentTags=new Array(2);
	var	legalSideMenuPanelSubContentHyperLinks=new Array(2);
	
	legalSideMenuPanelSubContents[0]='Terms of Use';
	legalSideMenuPanelSubContentTags[0]='h3';
	legalSideMenuPanelSubContentHyperLinks[0]='termsofuse.htm';

	legalSideMenuPanelSubContents[1]='Copyright';
	legalSideMenuPanelSubContentTags[1]='h3';
	legalSideMenuPanelSubContentHyperLinks[1]='tmandcopyright.htm';

	
	makeSideMenuPanelContainer('aboutVSi','sidePanel','About VSi','h4',null,null,null,0,0,100,440,'transparent',0,245,null,aboutVSiBitmap);
	makeSideMenuPanelContainer('partners','sidePanel','Partners','h4',null,null,null,0,0,100,440,'transparent',0,245,null,partnersBitmap);
	makeSideMenuPanelContainer('clients','sidePanel','Clients','h4',null,null,null,0,0,100,440,'transparent',0,245,null,clientsBitmap);
	makeSideMenuPanelContainer('careers','sidePanel','Careers','h4',null,null,null,0,0,100,440,'transparent',0,245,null,careersBitmap);

	makeSideMenuPanelContainer('midas','sidePanel','MIDaS&#8482;','h4',midasSideMenuPanelSubContents,midasSideMenuPanelSubContentTags,midasSideMenuPanelSubContentHyperLinks,0,0,100,440,'transparent',0,245,null,midasBitmap);
	//makeSideMenuPanelContainer('galis','sidePanel','GALIS&#8482;','h4',galisSideMenuPanelSubContents,galisSideMenuPanelSubContentTags,galisSideMenuPanelSubContentHyperLinks,0,0,100,440,'transparent',0,245,null,galisBitmap);
	makeSideMenuPanelContainer('galis','sidePanel','GALIS&#8482;','h4',null,null,null,0,0,100,440,'transparent',0,245,null,galisBitmap);

	makeSideMenuPanelContainer('technicalSupportAndMaintenance','sidePanel','Technical Support <br>And<br>Maintenance','h6',null,null,null,0,0,100,440,'transparent',0,245,null,tsmBitmap);
	makeSideMenuPanelContainer('technicalServices','sidePanel','Technical Services','h5',null,null,null,0,0,100,440,'transparent',0,245,null,tsBitmap);

	makeSideMenuPanelContainer('pressReleases','sidePanel','Press<br>Releases','h5',null,null,null,0,0,100,440,'transparent',0,245,null,pressReleasesBitmap);

	makeSideMenuPanelContainer('contactInformation','sidePanel','Contact Information','h5',null,null,null,0,0,100,440,'transparent',0,245,null,contactinfoBitmap);
	makeSideMenuPanelContainer('directions','sidePanel','Directions','h4',directionsSideMenuPanelSubContents,directionsSideMenuPanelSubContentTags,directionsSideMenuPanelSubContentHyperLinks,0,0,100,440,'transparent',0,245,null,directionsBitmap);

	makeSideMenuPanelContainer('links','sidePanel','Links','h4',null,null,null,0,0,100,440,'transparent',0,245,null,referencesBitmap);
	makeSideMenuPanelContainer('legal','sidePanel','Legal','h4',legalSideMenuPanelSubContents,legalSideMenuPanelSubContentTags,legalSideMenuPanelSubContentHyperLinks,0,0,100,440,'transparent',0,245,null,legalBitmap);
	

}


		
		// constructor
		function slideMenuPanel(panelID)
		{
			if (activePanelID!="")
			{
				ypSlideOutMenu.hideMenu(activePanelID);
				activePanelID="";
			}
				ypSlideOutMenu.showMenu(panelID);			
				activePanelID=panelID;
		}
		
		// constructor
		function slideOutPanels(panelID)
		{

			if (document.layers) 
			{
					var linkContainerPanel = document.layers['menuLayer'].document.layers['linksContainerPanel'];
					
					linkContainerPanel.zIndex=200;
					var contactContainerPanel = document.layers['menuLayer'].document.layers['contactContainerPanel'];
					contactContainerPanel.zIndex=260;
					var contactContainer = document.layers['menuLayer'].document.layers['contactContainer'];
					contactContainer.zIndex=190;
					var newsContainer = document.layers['menuLayer'].document.layers['newsContainer'];
					newsContainer.zIndex=190;
			}
			else
			{
					var linkContainerPanel = document.getElementById("linksContainerPanel");
					linkContainerPanel.style.zIndex=200;
					var contactContainerPanel = document.getElementById("contactContainerPanel");
					contactContainerPanel.style.zIndex=260;
					var contactContainer = document.getElementById("contactContainer");
					contactContainer.style.zIndex=190;
					var newsContainer = document.getElementById("newsContainer");
					newsContainer.style.zIndex=190;
			}

			var frameRate=10;
			if (browser.isNS6up) frameRate=60;
			
				if (panelID=='company')
				{

					P7AniMagic('productsContainerPanel',200,0,frameRate,30,0,0);
 					P7AniMagic('servicesContainerPanel',300,0,frameRate,30,0,0);
					P7AniMagic('newsContainerPanel',400,0,frameRate,30,0,0);
				    P7AniMagic('contactContainerPanel',500,0,frameRate,30,0,0);					
    
					ypSlideOutMenu.showMenu('company');								
			    }
				else if (panelID=='products')
				{
	
					P7AniMagic('servicesContainerPanel',300,0,frameRate,30,0,0);
					P7AniMagic('newsContainerPanel',400,0,frameRate,30,0,0);
					P7AniMagic('contactContainerPanel',500,0,frameRate,30,0,0);
					
					ypSlideOutMenu.showMenu('products');
			    }
				else if (panelID=='services')
				{
				
 				    P7AniMagic('newsContainerPanel',480,0,frameRate,30,0,0);
					P7AniMagic('contactContainerPanel',580,0,frameRate,30,0,0);
					
					ypSlideOutMenu.showMenu('services');
				}
				else if (panelID=='news')
				{
					if (document.layers) 
					{
							var newsContainer = document.layers['menuLayer'].document.layers['newsContainer'];
							newsContainer.zIndex=261;					
					}
					else
					{
							var newsContainer = document.getElementById("newsContainer");
							newsContainer.style.zIndex=261;
					}
				
					P7AniMagic('contactContainerPanel',500,0,frameRate,30,0,0);					
					
					ypSlideOutMenu.showMenu('news');					
				}
				else if (panelID=='contact')
				{
					if (document.layers) 
					{
							var contactContainerPanel = document.layers['menuLayer'].document.layers['contactContainerPanel'];
							contactContainerPanel.zIndex=260;					
							var contactContainer = document.layers['menuLayer'].document.layers['contactContainer'];
							contactContainer.zIndex=260;					
					}
					else
					{
							var contactContainerPanel = document.getElementById("contactContainerPanel");
							contactContainerPanel.style.zIndex=260;
							var contactContainer = document.getElementById("contactContainer");
							contactContainer.style.zIndex=260;
					}
				
					ypSlideOutMenu.showMenu('contact');
				}
				
		}

		function slideInPanels(panelID)
		{
			var frameRate=10;
			if (browser.isNS6up) frameRate=60;
			
				if (panelID=='company')
				{
					ypSlideOutMenu.hideMenu('company');

					P7AniMagic('productsContainerPanel',100,0,frameRate,30,0,0);
					P7AniMagic('servicesContainerPanel',200,0,frameRate,30,0,0);
					P7AniMagic('newsContainerPanel',300,0,frameRate,30,0,0);
					P7AniMagic('contactContainerPanel',400,0,frameRate,30,0,0);				
						
				}
				else if (panelID=='products')
				{
					ypSlideOutMenu.hideMenu('products');

					P7AniMagic('servicesContainerPanel',200,0,frameRate,30,0,0);
					P7AniMagic('newsContainerPanel',300,0,frameRate,30,0,0);
					P7AniMagic('contactContainerPanel',400,0,frameRate,30,0,0);
					
				}
				else if (panelID=='services')
				{
					ypSlideOutMenu.hideMenu('services');
					P7AniMagic('newsContainerPanel',300,0,frameRate,30,0,0);
					P7AniMagic('contactContainerPanel',400,0,frameRate,30,0,0);
					
					
				}
				else if (panelID=='news')
				{
					ypSlideOutMenu.hideMenu('news');
					
					if (document.layers) 
					{
							var newsContainer = document.layers['menuLayer'].document.layers['newsContainer'];
							newsContainer.zIndex=251;					
					}
					else
					{					
							var newsContainer = document.getElementById("newsContainer");
							newsContainer.style.zIndex=251;
					}

					P7AniMagic('contactContainerPanel',400,0,frameRate,30,0,0);					
				}
				else if (panelID=='contact')
				{
					
					if (document.layers) 
					{
							var contactContainerPanel = document.layers['menuLayer'].document.layers['contactContainerPanel'];
							contactContainerPanel.zIndex=260;					
							var contactContainer = document.layers['menuLayer'].document.layers['contactContainer'];
							contactContainer.zIndex=260;					
					var linkContainerPanel = document.layers['menuLayer'].document.layers['linksContainerPanel'];
					
					linkContainerPanel.zIndex=290;
					}
					else
					{
							var contactContainerPanel = document.getElementById("contactContainerPanel");
							contactContainerPanel.style.zIndex=260;
							var contactContainer = document.getElementById("contactContainer");
							contactContainer.style.zIndex=190;
					}
					
					ypSlideOutMenu.hideMenu('contact');
				}
				
		}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function P7AniMagic(el, x, y, a, b, c, s) { //v2.5 PVII
 var g,elo=el,f="",m=false,d="";x=parseInt(x);y=parseInt(y);
 var t = 'g.p7Magic = setTimeout("P7AniMagic(\''+elo+'\','; 
 
	if (document.layers) 
	{
		if (document.layers['menuLayer'].document.layers[el])
		{
			g=document.layers['menuLayer'].document.layers[el];
			g.moveTo(x,y);
			return;
		}
		else
		{
			alert('Not Netscape menuLayer child');
		}
	}
	else
	{
		 if ((g=MM_findObj(el))!=null) 
		 {
			d=(document.layers)?g:g.style;
		 }
		 else
		 {
			return;
		 }
	}
 if (parseInt(s)>0) {eval(t+x+','+y+','+a+','+b+','+c+',0)",' + s+')');return;}
 var xx=(parseInt(d.left))?parseInt(d.left):0;
 var yy=(parseInt(d.top))?parseInt(d.top):0;
 if(parseInt(c)==1) {x+=xx;y+=yy;m=true;c=0;}
 else if (c==2) {m=false;clearTimeout(g.p7Magic);}
 else {var i=parseInt(a);
  if (eval(g.moved)){clearTimeout(g.p7Magic);}
  if (xx<x){xx+=i;m=true;if(xx>x){xx=x;}}
  if (xx>x){xx-=i;m=true;if(xx<x){xx=x;}}
  if (yy<y){yy+=i;m=true;if(yy>y){yy=y;}}
  if (yy>y){yy-=i;m=true;if(yy<y){yy=y;}}}
 if (m) {if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4){
    xx+="px";yy+="px";}
  d.left=xx;d.top=yy;g.moved=true;eval(t+x+','+y+','+a+','+b+','+c+',0)",'+b+')');
  }else {g.moved=false;}
}

	function insertExternalFile(fname)
	{
		var	contentPanel=document.getElementById('contentPanel');
		var	contentFrame=document.getElementById('contentFrame');
   		contentFrame.setAttribute('src',fname);
 	}
	
	
	function showBitmap(bitmap,nShow,x,y) 
	{
		var id='rolloverBitmap';
		
				if (nShow==1)
				{
					var	rolloverBitmap='url('+bitmap+')';

					var currentX=parseInt(x)+100;
					var currentY=parseInt(y)+227;
					var	width=533;
					var height=389;
/*
					var xPos=currentX;
					var	yPos=currentY;
					var	radius=99;
					var	ok=0;
					var	angle=0;
					var dx=0;
					var dy=0;
					var	width=533;
					var height=389;
					
	alert('Initial: '+xPos+','+yPos);				
						while (ok==0)
						{
							radius+=10;
							for (i=0;(i<360)&&(ok==0);i=i+10)
							{
							  angle=i*Math.PI/180.0;
							  dx=radius*Math.cos(angle);
							  dy=radius*Math.sin(angle);
							  xPos=currentX-dx;
							  yPos=currentY-dy;
							  
							  	if (((currentY<(yPos-150))||(currentY>(yPos+height+150)))&&
									((currentX<(xPos-150))||(currentX>(xPos+width+150))))
								{
//alert('Current angle='+i+' radius='+radius+' ('+currentX+','+currentY+') Extents: ('+xPos+','+yPos+') to ('+(xPos+width)+','+(yPos+height)+')');							
									if ((xPos>0)&&((xPos+width)<1000)&&
									    (yPos>0)&&((yPos+height)<1000))
										{
alert('Current angle='+i+' radius='+radius+' ('+currentX+','+currentY+') Extents: ('+xPos+','+yPos+') to ('+(xPos+width)+','+(yPos+height)+')');							
//alert('stop at angle='+angle*180/Math.PI+' and radius='+radius);
										 ok=1;
										 }									
								}

							}
						}
//alert('Final: '+xPos+','+yPos);
*/						
				    var xPos=parseInt(x)+100;
					var yPos=parseInt(y)+227;
					
					var offsetX=100;
					var	offsetY=100;
					
						if ((yPos-offsetY)>0)
						{
							yPos-=420;
							xPos-=270;
							
							if (yPos<0) yPos+=451;

							if (xPos<0) xPos=100;
							if (xPos+533>780) xPos=780-533;
							
							
						}
						else
						{
							yPos+=420;
							xPos-=270;							
							if (xPos<0) xPos=100;
							if (xPos+533>780) xPos=780-533;
						}
						
					if (document.getElementById(id)==null)
					{ 
					/*												
					  yPos-=150;
					  xPos-=200;
					  if (yPos<0) yPos=20;
					  if (xPos<0) xPos=20;
					*/
					  yPos-=150;
					  xPos-=200;
					  if (yPos<0) yPos=20;
					  if (xPos<0) xPos=20;
					  
									if (yPos+height>780)
									{
										yPos=780-width;
									}
					  
							  	if ((currentY>yPos)&&(currentY<(yPos+height)))
								{
									yPos-=(currentY-yPos);

									if (xPos+width>780)
									{
										xPos=780-width;
									}
									
							  if (yPos<0) yPos=0;
							  if (xPos<0) xPos=0;
				  			}
							else if ((currentX>xPos)&&(currentX<(xPos+width)))
							{
									xPos+=1.4*(currentX-xPos);
									
									if (xPos+width>780)
									{
										xPos=780-width;
									}

							  if (yPos<0) yPos=0;
							  if (xPos<0) xPos=0;
							}
								
					
					  makeLayer(id,xPos,yPos,533,389,'null',1,350,'',rolloverBitmap);
					}
					else
					{
					  yPos-=227;
					  xPos-=200;
					  if (yPos<0) yPos=0;
					  if (xPos<0) xPos=0;
					  
							  	if ((currentY>yPos)&&(currentY<(yPos+height)))
								{
									yPos-=(currentY-yPos);

									if (xPos+width>780)
									{
										xPos=780-width;
									}
									
							  if (yPos<0) yPos=0;
							  if (xPos<0) xPos=0;
				  			}
							else if ((currentX>xPos)&&(currentX<(xPos+width)))
							{
									xPos+=1.6*(currentX-xPos);
									
									if (xPos+width>780)
									{
										xPos=780-width;
									}

							  if (yPos<0) yPos=0;
							  if (xPos<0) xPos=0;
							}
								

						document.getElementById(id).style.left=xPos;
						document.getElementById(id).style.top=yPos;
						document.getElementById(id).style.background=rolloverBitmap;						
						document.getElementById(id).style.visibility='visible';
					}
				}
				else
				{
					 if (document.layers && document.layers[id]) 
					 {
					  document.layers[id].visibility='hide'
					  delete document.layers[id]
					 }
					 else if (document.all && document.all[id]) 
					 {
					  document.all[id].innerHTML=''
					  document.all[id].outerHTML=''
					 }
					 else if (document.getElementById(id)!=null) 
					 {
					  document.getElementById(id).style.visibility='hidden';
					 }
				}
					
	}

		// constructor
		function showRolloverBitmapPanel(bitmap,nShow,x,y)
		{
			// Get Current Cursor Position
			
			window.parent.parent.showBitmap(bitmap,nShow,x,y);
			/*
			if (nShow==1)
			{

				var left=0;
				var top=0;
				var frame=window.top.document.getElementById('rolloverBitmap');
				frame.style.clip="rect("+left+"px, "+top+"px, "+533+"px, "+389+"px)"

			}
			*/
		}
