//Get File Name
var pathname = window.location.pathname;
var pathlen = pathname.length;
var pathpos = pathname.substring(0, pathlen);
var pathleng  = pathname.indexOf('main/index.aspx')
if(pathleng >= 1){
	TopOffsetHome = 24
	}
	else
	{
	TopOffsetHome = 0
	}
	//alert (TopOffsetHome);
	
// BROWSER DETECTION //
function BrowserDetect() {
   var ua = navigator.userAgent.toLowerCase(); 
 
   // browser engine name
   this.isGecko       = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
   this.isAppleWebKit = (ua.indexOf('applewebkit') != -1);

   // browser name
   this.isKonqueror   = (ua.indexOf('konqueror') != -1); 
   this.isSafari      = (ua.indexOf('safari') != - 1);
   this.isOmniweb     = (ua.indexOf('omniweb') != - 1);
   this.isOpera       = (ua.indexOf('opera') != -1); 
   this.isIcab        = (ua.indexOf('icab') != -1); 
   this.isAol         = (ua.indexOf('aol') != -1); 
   this.isIE          = (ua.indexOf('msie') != -1 && !this.isOpera && (ua.indexOf('webtv') == -1) ); 
   this.isMozilla     = (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
   this.isFirebird    = (ua.indexOf('firebird/') != -1);
   this.isFirefox    = (ua.indexOf('firefox/') != -1);   
   this.isNS          = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && !this.isOpera && !this.isSafari && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );

   // spoofing and compatible browsers
   this.isIECompatible = ( (ua.indexOf('msie') != -1) && !this.isIE);
   this.isNSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.isNS && !this.isMozilla);
   
   // rendering engine versions
   this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
   this.equivalentMozilla = ( (this.isGecko) ? parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) ) : -1 );
   this.appleWebKitVersion = ( (this.isAppleWebKit) ? parseFloat( ua.substring( ua.indexOf('applewebkit/') + 12) ) : -1 );
   
   // browser version
   this.versionMinor = parseFloat(navigator.appVersion); 
   
   // correct version number
   if (this.isGecko && !this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1 ) );
   }
   else if (this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
   }
   else if (this.isIE && this.versionMinor >= 4) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
   }
   else if (this.isKonqueror) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
   }
   else if (this.isSafari) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('safari/') + 7 ) );
   }
   else if (this.isOmniweb) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('omniweb/') + 8 ) );
   }
   else if (this.isOpera) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera') + 6 ) );
   }
   else if (this.isIcab) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab') + 5 ) );
   }
   
   this.versionMajor = parseInt(this.versionMinor); 
   
   // 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);

  NetscapeVer = navigator.userAgent; 
  NSVersion = NetscapeVer.substring(82,85);
  this.isNS7even = (NSVersion == 7.0);

   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);
   this.isIEMac = (this.isIE && this.isMac);
}
var browser = new BrowserDetect();

if (browser.isNS47x) {
	alert("It appears you are using an outdated version of Netscape, you will now be redirected to the Netscape site.");
	location.href = "http://channels.netscape.com/ns/browsers/default.jsp";	
}


// IMAGE SWAPPING AND PRELOADING
function init() {
	MM_preloadImages(
		'/images/nav/learn_on.gif',
		'/images/nav/explore_on.gif',
		'/images/nav/contact_on.gif',
		'/images/nav/about_on.gif',
		'/images/nav/search_on.gif',
		'/images/forfinancialprof_on.gif',
		'/images/forbenefitsmang_on.gif',
		'/images/menu_arrow.gif'
	);
}

function imgRoll (OorF,imName,subPath) {
	if (subPath == 'nav') { subPath = '/nav/'; } else { subPath = ''; }
	document.images[imName].src = '/images/' + subPath + imName + '_' + OorF + '.gif';
}

function nav_imgRoll (OorF,imName) {
	document.getElementById(imName).src = '/images/nav/' + imName + '_' + OorF + '.gif';
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

	
ypSlideOutMenu.Registry = []
ypSlideOutMenu.aniLen = 600
ypSlideOutMenu.hideDelay = 750
ypSlideOutMenu.minCPUResolution = 10
// constructor
function ypSlideOutMenu(id, dir, left, top, width, height) {
	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.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
		this.gRef = "ypSlideOutMenu_"+id
		eval(this.gRef+"=this")
		ypSlideOutMenu.Registry[id] = this
		var d = document
		var strCSS = '<style type="text/css">';
		strCSS += '#' + this.id + 'Container { visibility:hidden; '
		strCSS += 'left:' + left + 'px; '
		strCSS += 'top:' + top + 'px; '
		strCSS += 'overflow:hidden; z-index:10; }'
		strCSS += '#' + this.id + 'Container, #' + this.id + 'Content { position:absolute; '
		strCSS += 'width:' + width + 'px; '
		strCSS += 'height:' + height + 'px; '
		strCSS += '}'
		strCSS += '</style>'
		d.write(strCSS)
		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.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 obj = ypSlideOutMenu.Registry[id]
	if (obj.container) {
		obj.over = true
		for (menu in reg) if (id != menu) ypSlideOutMenu.hide(menu)
		if (obj.hideTimer) { reg[id].hideTimer = window.clearTimeout(reg[id].hideTimer) }
		if (!obj.open && !obj.aniTimer) reg[id].startSlide(true)
	}
}
ypSlideOutMenu.hideMenu = function(id) {
	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)
	obj.hideTimer = 0
	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])
}
ypSlideOutMenu.prototype.onactivate = function() { }
ypSlideOutMenu.prototype.ondeactivate = function() { }

/* --- DROP DOWN POSITIONING --- */
	/* menu heights */
	menu1Height = 300;
	menu2Height = 300;
	menu3Height = 300;
	menu4Height = 210;
	menu5Height = 200;	
	menu6Height = 300;
	menu7Height = 300;
	menu8Height = 300;
	menu9Height = 300;
	menu10Height = 300;
	
	/* menu left positioning */
	LeftOffset1 = -225;
	LeftOffset2 = -125;
	LeftOffset3 = -25;	
	LeftOffset4 = -10;
	LeftOffset5 = 0;	
	LeftOffset6 = 0;
	LeftOffset7 = 0;	
	LeftOffset8 = 0;
	LeftOffset9 = 0;
	LeftOffset10 = 0;
	
	/* menu top positioning */
	TopOffset = 0;
	
	if (browser.isMozilla || browser.isNS7up) {
		LeftOffset1 = LeftOffset1 + 10;
		LeftOffset3 = LeftOffset3 + 10;
		LeftOffset2 = LeftOffset2 + 10;
		LeftOffset4 = LeftOffset4 + 10;		
		LeftOffset5 = LeftOffset5 + 10;		
		LeftOffset6 = LeftOffset6 + 10;
		LeftOffset7 = LeftOffset7 + 10;
		LeftOffset8 = LeftOffset8 + 10;
		LeftOffset9 = LeftOffset9 + 10;
		LeftOffset10 = LeftOffset10 + 10;
		TopOffset = TopOffset + 2;
	}
	if (browser.isSafari || browser.isIEMac || browser.isFirefox || browser.isOpera) {
		menu1Height = menu1Height - 4;
		menu2Height = menu2Height - 12;
		menu3Height = menu3Height - 2;
		menu4Height = menu4Height - 14;
		menu5Height = menu5Height - 4;
		menu6Height = menu6Height - 4;
		menu7Height = menu7Height - 4;
		menu8Height = menu8Height - 4;
		menu9Height = menu9Height - 4;
		menu10Height = menu10Height - 4;
		LeftOffset1 = LeftOffset1 + 10;
		LeftOffset2 = LeftOffset2 + 10;
		LeftOffset3 = LeftOffset3 + 10;
		LeftOffset4 = LeftOffset4 + 10;
		LeftOffset5 = LeftOffset5 + 10;		
		LeftOffset6 = LeftOffset6 + 10;
		LeftOffset7 = LeftOffset7 + 10;
		LeftOffset8 = LeftOffset8 + 10;
		LeftOffset9 = LeftOffset9 + 10;
		LeftOffset10 = LeftOffset10 + 10;
		TopOffset = TopOffset + 2;
	}
	if ( (browser.isFirefox && browser.isWin) || (browser.isOpera && browser.isWin) ) {
		menu1Height = menu1Height + 4;
		menu2Height = menu2Height + 12;
		menu3Height = menu3Height + 2;		
		menu4Height = menu4Height + 14;
		menu5Height = menu5Height + 4;			
		menu6Height = menu6Height + 4;
		menu7Height = menu7Height + 4;
		menu8Height = menu8Height + 4;
		menu9Height = menu9Height + 4;
		menu10Height = menu10Height + 4;
	}
	if (browser.isOpera && browser.isMac) {
		menu1Height = menu1Height + 2;
		menu2Height = menu2Height + 6;
		menu3Height = menu3Height + 1;
		menu4Height = menu4Height + 7;
		menu5Height = menu5Height + 2;
		menu6Height = menu6Height + 2;
		menu7Height = menu7Height + 2;
		menu8Height = menu8Height + 2;
		menu9Height = menu9Height + 2;
		menu10Height = menu10Height + 2;
	}	
	if (browser.isIEMac || (browser.isFirefox && browser.isWin) || (browser.isNS7up && browser.isMac) ) {
		TopOffset = TopOffset - 1;
	}
	if (browser.isNS7up && browser.isMac) {
		menu1Height = menu1Height - 4;
		menu2Height = menu2Height - 12;
		menu3Height = menu3Height - 2;
		menu4Height = menu4Height - 14;
		menu5Height = menu5Height - 4;
		menu6Height = menu6Height - 4;
		menu7Height = menu7Height - 4;
		menu8Height = menu8Height - 4;
		menu9Height = menu9Height - 4;
		menu10Height = menu10Height - 4;
	}
	
var myMenu1 = new ypSlideOutMenu("menu1", "down", 0, 0, 400, menu1Height)
var myMenu2 = new ypSlideOutMenu("menu2", "down", 0, 0, 400, menu2Height)
var myMenu3 = new ypSlideOutMenu("menu3", "down", 0, 0, 400, menu3Height)
var myMenu4 = new ypSlideOutMenu("menu4", "down", 0, 0, 400, menu4Height)
var myMenu5 = new ypSlideOutMenu("menu5", "down", 0, 0, 400, menu5Height)
var myMenu6 = new ypSlideOutMenu("menu6", "down", 0, 0, 400, menu6Height)
var myMenu7 = new ypSlideOutMenu("menu7", "down", 0, 0, 400, menu7Height)
var myMenu8 = new ypSlideOutMenu("menu8", "down", 0, 0, 400, menu8Height)
var myMenu9 = new ypSlideOutMenu("menu9", "down", 0, 0, 400, menu9Height)
var myMenu10 = new ypSlideOutMenu("menu10", "down", 0, 0, 400, menu10Height)

myMenu1.onactivate = repositionMenu1
myMenu2.onactivate = repositionMenu2
myMenu3.onactivate = repositionMenu3
myMenu4.onactivate = repositionMenu4
myMenu5.onactivate = repositionMenu5
myMenu6.onactivate = repositionMenu6
myMenu7.onactivate = repositionMenu7
myMenu8.onactivate = repositionMenu8
myMenu9.onactivate = repositionMenu9
myMenu10.onactivate = repositionMenu10

menu1ID = 'aboutahd';
menu2ID = 'IMG1';
menu3ID = 'healthpk';
menu4ID = 'abtdxb';
menu5ID = 'contact';
menu6ID = 'services';
menu7ID = 'pservices';
menu8ID = 'career';
menu9ID = 'intpatient';
menu10ID = 'hosptur';

browsMin_Top = 0;

function repositionMenu1() {
	menu1Left = getWindowWidth() / 2 + LeftOffset1;	
	if (getWindowWidth() < 777) {
		menu1Left = 0;
	}
	
	menu1Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu1Top = browsMin_Top;
	}	
	myMenu1.container.style ? myMenu1.container.style.left = menu1Left + "px" : myMenu1.container.left = menu1Left;
	// Biju Modified
	myMenu1.container.style ? myMenu1.container.style.top = 152 + "px" : myMenu1.container.left = menu1Top;
}
function repositionMenu2() {
	menu2Left = getWindowWidth() / 2 + LeftOffset2;
	if (getWindowWidth() < 777) {
		menu2Left = 271;
	}	
	menu2Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu2Top = browsMin_Top;
	}		
	myMenu2.container.style ? myMenu2.container.style.left = menu2Left + "px" : myMenu2.container.left = menu2Left;
	myMenu2.container.style ? myMenu2.container.style.top = 152 + "px" : myMenu2.container.left = menu2Top;
}
function repositionMenu3() {
	menu3Left = getWindowWidth() / 2 + LeftOffset3;
	if (getWindowWidth() < 777) {
		menu3Left = 433;
	}	
	menu3Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu3Top = browsMin_Top;
	}		
	myMenu3.container.style ? myMenu3.container.style.left = menu3Left + "px" : myMenu3.container.left = menu3Left;
	myMenu3.container.style ? myMenu3.container.style.top = 152 + "px" : myMenu3.container.left = menu3Top;
}
function repositionMenu4() {
	menu4Left = getWindowWidth() / 2 + LeftOffset4;
	if (getWindowWidth() < 777) {
		menu4Left = 530;
	}	
	menu4Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu4Top = browsMin_Top;
	}	
	myMenu4.container.style ? myMenu4.container.style.left = menu4Left + "px" : myMenu4.container.left = menu4Left;
	myMenu4.container.style ? myMenu4.container.style.top = 152 + "px" : myMenu4.container.left = menu4Top;
}
function repositionMenu5() {
	menu5Left = getWindowWidth() / 2 + LeftOffset5;
	if (getWindowWidth() < 777) {
		menu5Left = 684;
	}	
	menu5Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu5Top = browsMin_Top;
	}	
	myMenu5.container.style ? myMenu5.container.style.left = 620 + "px" : myMenu5.container.left = menu5Left;
	myMenu5.container.style ? myMenu5.container.style.top = 152 + "px" : myMenu5.container.left = menu5Top;
}
function repositionMenu6() {
	menu6Left = getWindowWidth() / 2 + LeftOffset6;	
	if (getWindowWidth() < 777) {
		menu6Left = 0;
	}
	
	menu6Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu6Top = browsMin_Top;
	}	
	myMenu6.container.style ? myMenu6.container.style.left = menu6Left + "px" : myMenu6.container.left = menu6Left;
	myMenu6.container.style ? myMenu6.container.style.top = 178 + "px" : myMenu6.container.left = menu6Top;
}

function repositionMenu7() {
	menu7Left = getWindowWidth() / 2 + LeftOffset7;
	if (getWindowWidth() < 777) {
		menu7Left = 433;
	}	
	menu7Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu7Top = browsMin_Top;
	}		
	
	if(pathleng >= 1){
	menu7Toptemp = 313
	}
	else
	{
	menu7Toptemp = 338
	}	
	myMenu7.container.style ? myMenu7.container.style.left = menu7Left + "px" : myMenu7.container.left = menu7Left;
	myMenu7.container.style ? myMenu7.container.style.top = menu7Toptemp + "px" : myMenu7.container.left = menu7Top;
}
function repositionMenu8() {
	menu8Left = getWindowWidth() / 2 + LeftOffset8;
	if (getWindowWidth() < 777) {
		menu5Left = 684;
	}	
	menu8Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu8Top = browsMin_Top;
	}	
	myMenu8.container.style ? myMenu8.container.style.left = 600 + "px" : myMenu8.container.left = menu8Left;
	myMenu8.container.style ? myMenu8.container.style.top = 152 + "px" : myMenu8.container.left = menu8Top;
}
function repositionMenu9() {
	menu9Left = getWindowWidth() / 2 + LeftOffset9;
	if (getWindowWidth() < 777) {
		menu9Left = 433;
	}	
	menu9Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu9Top = browsMin_Top;
	}		
	
	if(pathleng >= 1){
	menu9Toptemp = 363
	}
	else
	{
	menu9Toptemp = 388
	}	
	myMenu9.container.style ? myMenu9.container.style.left = menu9Left + "px" : myMenu9.container.left = menu7Left;
	myMenu9.container.style ? myMenu9.container.style.top = menu9Toptemp + "px" : myMenu9.container.left = menu9Top;
}
//Added by Biju on July 4th 2006 starts
function repositionMenu10() {
	menu10Left = getWindowWidth() / 2 + LeftOffset10;
	if (getWindowWidth() < 777) {
		menu10Left = 230;
	}	
	menu10Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() < 507) {
		menu10Top = browsMin_Top;
	}	
	myMenu10.container.style ? myMenu10.container.style.left = 500 + "px" : myMenu10.container.left = menu10Left;
	myMenu10.container.style ? myMenu10.container.style.top = 152 + "px" : myMenu10.container.left = menu10Top;
}
//Added by Biju on July 4th 2006 ends

function getWindowWidth() {
	return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
}

function getWindowHeight() {
	return window.innerHeight ? window.innerHeight : document.body.offsetHeight;
}

function getImgX(menID) {
	return document.getElementById(menID).x ? document.getElementById(menID).x : document.all[menID].offsetLeft;
}
function getImgY(menID) {
	return document.getElementById(menID).y ? document.getElementById(menID).y : document.getElementById(menID).offsetTop;
}

/* ---- SUB MENU FLY-OUTS ---- */
ypSlideOutSubMenu.Registry = []
ypSlideOutSubMenu.aniLen = 300
ypSlideOutSubMenu.hideDelay = 750
ypSlideOutSubMenu.minCPUResolution = 10
// constructor
function ypSlideOutSubMenu(id, dir, left, top, width, height) {
	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.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
		this.gRef = "ypSlideOutSubMenu_"+id
		eval(this.gRef+"=this")
		ypSlideOutSubMenu.Registry[id] = this
		var d = document
		var strCSS = '<style type="text/css">';
		strCSS += '#' + this.id + 'Container { visibility:hidden; '
		strCSS += 'left:' + left + 'px; '
		strCSS += 'top:' + top + 'px; '
		strCSS += 'overflow:hidden; z-index:10; }'
		strCSS += '#' + this.id + 'Container, #' + this.id + 'Content { position:absolute; '
		strCSS += 'width:' + width + 'px; '
		strCSS += 'height:' + height + 'px; '
		strCSS += '}'
		strCSS += '</style>'
		d.write(strCSS)
		this.load()
	}
}
ypSlideOutSubMenu.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) / ypSlideOutSubMenu.aniLen / ypSlideOutSubMenu.aniLen 
		// set event handlers.
		if (this.ns4) this.menu.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
		this.menu.onmouseover = new Function("ypSlideOutSubMenu.showMenu('" + this.id + "')")
		this.menu.onmouseout = new Function("ypSlideOutSubMenu.hideMenu('" + this.id + "')")
		//set initial state
		this.endSlide()
	}
}
ypSlideOutSubMenu.showMenu = function(id) {
	var reg = ypSlideOutSubMenu.Registry
	var obj = ypSlideOutSubMenu.Registry[id]
	if (obj.container) {
		obj.over = true
		for (menu in reg) if (id != menu) ypSlideOutSubMenu.hide(menu)
		if (obj.hideTimer) { reg[id].hideTimer = window.clearTimeout(reg[id].hideTimer) }
		if (!obj.open && !obj.aniTimer) reg[id].startSlide(true)
	}
}
ypSlideOutSubMenu.hideMenu = function(id) {
	var obj = ypSlideOutSubMenu.Registry[id]
	if (obj.container) {
		if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
		obj.hideTimer = window.setTimeout("ypSlideOutSubMenu.hide('" + id + "')", ypSlideOutSubMenu.hideDelay);
	}
}
ypSlideOutSubMenu.hideAll = function() {
	var reg = ypSlideOutSubMenu.Registry
	for (menu in reg) {
		ypSlideOutSubMenu.hide(menu);
		if (menu.hideTimer) window.clearTimeout(menu.hideTimer);
	}
}
ypSlideOutSubMenu.hide = function(id) {
	var obj = ypSlideOutSubMenu.Registry[id]
	obj.over = false
	if (obj.hideTimer) window.clearTimeout(obj.hideTimer)
	obj.hideTimer = 0
	if (obj.open && !obj.aniTimer) obj.startSlide(false)
}
ypSlideOutSubMenu.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()", ypSlideOutSubMenu.minCPUResolution)
}
ypSlideOutSubMenu.prototype.slide = function() {
	var elapsed = (new Date()).getTime() - this.startTime
	if (elapsed > ypSlideOutSubMenu.aniLen) this.endSlide()
	else {
		var d = Math.round(Math.pow(ypSlideOutSubMenu.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)
	}
}
ypSlideOutSubMenu.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)
	}
}
ypSlideOutSubMenu.prototype.setVisibility = function(bShow) { 
	var s = this.ns4 ? this.container : this.container.style
	s.visibility = bShow ? "visible" : "hidden"
}
ypSlideOutSubMenu.prototype.moveTo = function(p) { 
	this.style[this.orientation == "h" ? "left" : "top"] = this.ns4 ? p : p + "px"
}
ypSlideOutSubMenu.prototype.getPos = function(c) {
	return parseInt(this.style[c])
}
ypSlideOutSubMenu.prototype.onactivate = function() { }
ypSlideOutSubMenu.prototype.ondeactivate = function() { }

// DROP DOWN POSITIONING
/* menu heights */
submenu1aHeight = 150;
submenu1bHeight = 150;
submenu2aHeight = 195;
submenu2bHeight = 240;
submenu3aHeight = 195;
submenu3bHeight = 195;
submenu3cHeight = 195;
submenu3dHeight = 240;
submenu8aHeight = 195;


if (browser.isSafari || browser.isIEMac || browser.isFirefox || (browser.isNS7up && browser.isMac)) {
	submenu1aHeight = submenu1aHeight - 10;
	submenu1bHeight = submenu1bHeight - 10;
	submenu2aHeight = submenu2aHeight - 10;
	submenu2bHeight = submenu2bHeight - 10;
	submenu3aHeight = submenu3aHeight - 10;
	submenu3bHeight = submenu3bHeight - 10;
	submenu3cHeight = submenu3cHeight - 10;
	submenu3dHeight = submenu3dHeight - 10;
	submenu8aHeight = submenu8aHeight - 10;
}
if (browser.isFirefox && browser.isWin) {
	submenu1aHeight = submenu1aHeight + 10;
	submenu1bHeight = submenu1bHeight + 10;
	submenu2aHeight = submenu2aHeight + 10;
	submenu2bHeight = submenu2bHeight + 10;
	submenu3aHeight = submenu3aHeight + 10;
	submenu3bHeight = submenu3bHeight + 10;
	submenu3cHeight = submenu3cHeight + 10;
	submenu3dHeight = submenu3dHeight + 10;
	submenu8aHeight = submenu8aHeight + 10;
}
if (browser.isOpera && browser.isMac) {
	submenu1aHeight = submenu1aHeight - 5;
	submenu1bHeight = submenu1bHeight - 5;
	submenu2aHeight = submenu2aHeight - 5;
	submenu2bHeight = submenu2bHeight;
	submenu3aHeight = submenu3aHeight - 5;
	submenu3bHeight = submenu3bHeight - 5;
	submenu3cHeight = submenu3cHeight - 5;
	submenu3dHeight = submenu3dHeight - 5;
	submenu8aHeight = submenu8aHeight - 5;
}

var mySubMenu1a = new ypSlideOutSubMenu("submenu1a", "right", 0, 0, 180, submenu1aHeight)
var mySubMenu1b = new ypSlideOutSubMenu("submenu1b", "right", 0, 0, 180, submenu1bHeight)
var mySubMenu2a = new ypSlideOutSubMenu("submenu2a", "right", 0, 0, 180, submenu2aHeight)
var mySubMenu2b = new ypSlideOutSubMenu("submenu2b", "right", 0, 0, 180, submenu2bHeight)
var mySubMenu3a = new ypSlideOutSubMenu("submenu3a", "right", 0, 0, 180, submenu3aHeight)
var mySubMenu3b = new ypSlideOutSubMenu("submenu3b", "right", 0, 0, 180, submenu3bHeight)
var mySubMenu3c = new ypSlideOutSubMenu("submenu3c", "right", 0, 0, 180, submenu3cHeight)
var mySubMenu3d = new ypSlideOutSubMenu("submenu3d", "right", 0, 0, 180, submenu3dHeight)
var mySubMenu8a = new ypSlideOutSubMenu("submenu8a", "right", 0, 0, 200, submenu8aHeight)

mySubMenu1a.onactivate = repositionSubMenu1a
mySubMenu1b.onactivate = repositionSubMenu1b
mySubMenu2a.onactivate = repositionSubMenu2a
mySubMenu2b.onactivate = repositionSubMenu2b
mySubMenu3a.onactivate = repositionSubMenu3a
mySubMenu3b.onactivate = repositionSubMenu3b
mySubMenu3c.onactivate = repositionSubMenu3c
mySubMenu3d.onactivate = repositionSubMenu3d
mySubMenu8a.onactivate = repositionSubMenu8a

subLeftPos = 201;

function repositionSubMenu1a() {	
	submenuLeft = menu1Left + subLeftPos;
	submenuTop = menu1Top;
	mySubMenu1a.container.style ? mySubMenu1a.container.style.left = submenuLeft + "px" : mySubMenu1a.container.left = submenuLeft;
	mySubMenu1a.container.style ? mySubMenu1a.container.style.top = 205 + "px" : mySubMenu1a.container.top = submenuTop;
}
function repositionSubMenu1b() {
	submenuLeft = menu1Left + subLeftPos;
	submenuTop = menu1Top;
	mySubMenu1b.container.style ? mySubMenu1b.container.style.left = submenuLeft + "px" : mySubMenu1b.container.left = submenuLeft;
	mySubMenu1b.container.style ? mySubMenu1b.container.style.top = 160 + "px" : mySubMenu1b.container.top = submenuTop;
}
function repositionSubMenu1c() {
	submenuLeft = menu1Left + subLeftPos;
	submenuTop = menu1Top;
	mySubMenu1c.container.style ? mySubMenu1b.container.style.left = submenuLeft + "px" : mySubMenu1b.container.left = submenuLeft;
	mySubMenu1c.container.style ? mySubMenu1b.container.style.top = 0 + "px" : mySubMenu1c.container.top = submenuTop;
}
function repositionSubMenu2a() {
	submenuLeft = menu2Left + subLeftPos;
	submenuTop = menu2Top;
	mySubMenu2a.container.style ? mySubMenu2a.container.style.left = submenuLeft + "px" : mySubMenu2a.container.left = submenuLeft;
	mySubMenu2a.container.style ? mySubMenu2a.container.style.top = submenuTop + "px" : mySubMenu2a.container.top = submenuTop;
}
function repositionSubMenu2b() {
	submenuLeft = menu2Left + subLeftPos;
	submenuTop = menu2Top;
	mySubMenu2b.container.style ? mySubMenu2b.container.style.left = submenuLeft + "px" : mySubMenu2b.container.left = submenuLeft;
	mySubMenu2b.container.style ? mySubMenu2b.container.style.top = submenuTop + "px" : mySubMenu2b.container.top = submenuTop;
}
function repositionSubMenu3a() {
	submenuLeft = menu3Left + subLeftPos;
	submenuTop = menu3Top;
	mySubMenu3a.container.style ? mySubMenu3a.container.style.left = submenuLeft + "px" : mySubMenu3a.container.left = submenuLeft;
	mySubMenu3a.container.style ? mySubMenu3a.container.style.top = 311 - TopOffsetHome + "px" : mySubMenu3a.container.top = submenuTop;
}
function repositionSubMenu3b() {
	submenuLeft = menu3Left + subLeftPos;
	submenuTop = menu3Top;
	mySubMenu3b.container.style ? mySubMenu3b.container.style.left = submenuLeft + "px" : mySubMenu3b.container.left = submenuLeft;
	mySubMenu3b.container.style ? mySubMenu3b.container.style.top = 333 - TopOffsetHome + "px" : mySubMenu3b.container.top = submenuTop;
}
function repositionSubMenu3c() {
	submenuLeft = menu3Left + subLeftPos;
	submenuTop = menu3Top;
	mySubMenu3c.container.style ? mySubMenu3c.container.style.left = submenuLeft + "px" : mySubMenu3c.container.left = submenuLeft;
	mySubMenu3c.container.style ? mySubMenu3c.container.style.top = 287 - TopOffsetHome + "px" : mySubMenu3c.container.top = submenuTop;
}
function repositionSubMenu3d() {
	submenuLeft = menu7Left + subLeftPos;
	submenuTop = menu7Top;
	mySubMenu3d.container.style ? mySubMenu3d.container.style.left = submenuLeft + "px" : mySubMenu3d.container.left = submenuLeft;
	mySubMenu3d.container.style ? mySubMenu3d.container.style.top = 360 - TopOffsetHome + "px" : mySubMenu3d.container.top = submenuTop;
}

//Added By Biju Starts
function repositionSubMenu8a() {
	submenuLeft = menu8Left - subLeftPos;
	submenuTop = menu8Top;
	mySubMenu8a.container.style ? mySubMenu8a.container.style.left = submenuLeft + "px" : mySubMenu8a.container.left = submenuLeft;
	mySubMenu8a.container.style ? mySubMenu8a.container.style.top = 198 - TopOffsetHome + "px" : mySubMenu8a.container.top = submenuTop;
}
//Added By Biju Ends

function subActive(id,OorF) {
	classN = 'menuAr';
	if (OorF == 'on') { classN = 'hover'; }
	document.getElementById(id).className = classN;
}	


if (browser.isNS7x && browser.isWin) {
	document.write('<style type="text/css">.menu { -moz-opacity: 0.7; } .sub-menu { -moz-opacity: 0.7; } </style>');
}
