// MUHAMMAD AZHAR BUTT / A2Z CREATORZ //

// 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.ischrome      = (ua.indexOf('chrome') != - 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";	
}

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 openPopR(pg,wt,ht) {

	var centerWidth = getWindowWidth()/2 - wt/2;
	//alert(centerWidth);
	var centerHeight = getWindowHeight()/2 - ht/2;
	//alert(centerHeight);
	
	var str="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+wt+",height="+ht+",left="+centerWidth+",top="+centerHeight+"";
	pop=window.open(pg,"JohnHancockR",str);
	pop.focus();
}

function openPopV(pg,wt,ht) {

	var centerWidth = getWindowWidth()/2 - wt/2;
	//alert(centerWidth);
	var centerHeight = getWindowHeight()/2 - ht/2;
	//alert(centerHeight);
	
	var str="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+wt+",height="+ht+",left="+centerWidth+",top="+centerHeight+"";
	pop=window.open(pg,"JohnHancockV",str);
	pop.focus();
}

function openPopPrint(pg,wt,ht) {

	var centerWidth = getWindowWidth()/2 - wt/2;
	//alert(centerWidth);
	var centerHeight = getWindowHeight()/2 - ht/2;
	//alert(centerHeight);
	
	var str="toolbar=yes,location=yes,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+wt+",height="+ht+",left="+centerWidth+",top="+centerHeight+"";
	pop=window.open(pg,"JohnHancockPrint",str);
	pop.focus();
}


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];}}
}

function printPage() { 
	if ( ((browser.isMac) && (browser.isIE5x)) || (browser.isOpera) ) {
		alert('To Print This Page Press: Apple-P, or click the print icon in your browsers toolbar');
	}
	else {
		window.print();
	}
}

function noSpam(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
}
	
ypSlideOutMenu.Registry = []
ypSlideOutMenu.aniLen = 500
ypSlideOutMenu.hideDelay = 700
ypSlideOutMenu.minCPUResolution = 1
// 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 = 270;
	menu2Height = 310;
	menu3Height = 300;
	menu4Height = 300;
	menu5Height = 200;
	menu6Height = 150;
	menu7Height = 300;
	menu8Height = 180;

	/* menu left positioning */
	LeftOffset1 = -190;
	LeftOffset2 = -273;
	LeftOffset3 = -273;	
	LeftOffset4 = -273;
	LeftOffset5 = -273;
	LeftOffset6 = -273;
	LeftOffset7 = -273;
	LeftOffset8 = -273;

	/* menu top positioning */
	TopOffset = -25;
	
if (browser.ischrome || browser.isFirefox || browser.isMozilla || browser.isNS7up) {
		LeftOffset1 = LeftOffset1 - 9;
		LeftOffset2 = LeftOffset2 - 9;
		LeftOffset3 = LeftOffset3 - 9;
		LeftOffset4 = LeftOffset4 - 9;	
		LeftOffset5 = LeftOffset5 - 9;	
		LeftOffset6 = LeftOffset6 - 9;	
		LeftOffset7 = LeftOffset7 - 9;
		LeftOffset8 = LeftOffset8 - 9;
	}
	
var myMenu1 = new ypSlideOutMenu("menu1", "right", 0, 0, 160, menu1Height)
var myMenu2 = new ypSlideOutMenu("menu2", "right", 0, 0, 205, menu2Height)
var myMenu3 = new ypSlideOutMenu("menu3", "right", 0, 0, 205, menu3Height)
var myMenu4 = new ypSlideOutMenu("menu4", "right", 0, 0, 205, menu4Height)
var myMenu5 = new ypSlideOutMenu("menu5", "right", 0, 0, 205, menu5Height)
var myMenu6 = new ypSlideOutMenu("menu6", "right", 0, 0, 225, menu6Height)
var myMenu7 = new ypSlideOutMenu("menu7", "right", 0, 0, 225, menu7Height)
var myMenu8 = new ypSlideOutMenu("menu8", "right", 0, 0, 205, menu8Height)

myMenu1.onactivate = repositionMenu1
myMenu2.onactivate = repositionMenu2
myMenu3.onactivate = repositionMenu3
myMenu4.onactivate = repositionMenu4
myMenu5.onactivate = repositionMenu5
myMenu6.onactivate = repositionMenu6
myMenu7.onactivate = repositionMenu7
myMenu8.onactivate = repositionMenu8

menu1ID = 'Image2';
menu2ID = 'Image3';
menu3ID = 'Image4';
menu4ID = 'Image6';
menu5ID = 'Image7';
menu6ID = 'Image68';
menu7ID = 'Image71';
menu8ID = 'Image72';

browsMin_Top = 0;

function repositionMenu1() {
	menu1Left = getWindowWidth() / 2 + LeftOffset1;	
	if (getWindowWidth() < 934) {
		menu1Left = 90;
	}	
	menu1Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() > 1) {
		menu1Top = browsMin_Top +178;
	}	
	myMenu1.container.style ? myMenu1.container.style.left = menu1Left + "px" : myMenu1.container.left = menu1Left;
	myMenu1.container.style ? myMenu1.container.style.top = menu1Top + "px" : myMenu1.container.left = menu1Top;
}
function repositionMenu2() {
	menu2Left = getWindowWidth() / 2 + LeftOffset2;
	if (getWindowWidth() < 934) {
		menu2Left = 202;
	}	
	menu2Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() > 1) {
		menu2Top = browsMin_Top +212;
	}		
	myMenu2.container.style ? myMenu2.container.style.left = menu2Left + "px" : myMenu2.container.left = menu2Left;
	myMenu2.container.style ? myMenu2.container.style.top = menu2Top + "px" : myMenu2.container.left = menu2Top;
}
function repositionMenu3() {
	menu3Left = getWindowWidth() / 2 + LeftOffset3;
	if (getWindowWidth() < 934) {
		menu3Left = 336;
	}	
	menu3Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() > 1) {
		menu3Top = browsMin_Top +240;
	}		
	myMenu3.container.style ? myMenu3.container.style.left = menu3Left + "px" : myMenu3.container.left = menu3Left;
	myMenu3.container.style ? myMenu3.container.style.top = menu3Top + "px" : myMenu3.container.left = menu3Top;
}
function repositionMenu4() {
	menu4Left = getWindowWidth() / 2 + LeftOffset4;
	if (getWindowWidth() < 934) {
		menu4Left = 491;
	}	
	menu4Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() > 1) {
		menu4Top = browsMin_Top +436;
	}	
	myMenu4.container.style ? myMenu4.container.style.left = menu4Left + "px" : myMenu4.container.left = menu4Left;
	myMenu4.container.style ? myMenu4.container.style.top = menu4Top + "px" : myMenu4.container.left = menu4Top;
}
function repositionMenu5() {
	menu5Left = getWindowWidth() / 2 + LeftOffset5;	
	if (getWindowWidth() < 934) {
		menu5Left = 491;
	}	
	menu5Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() > 1) {
		menu5Top = browsMin_Top +464;
	}	
	myMenu5.container.style ? myMenu5.container.style.left = menu5Left + "px" : myMenu5.container.left = menu5Left;
	myMenu5.container.style ? myMenu5.container.style.top = menu5Top + "px" : myMenu5.container.left = menu5Top;
}
function repositionMenu6() {
	menu6Left = getWindowWidth() / 2 + LeftOffset6;	
	if (getWindowWidth() < 934) {
		menu6Left = 491;
	}	
	menu6Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() > 1) {
		menu6Top = browsMin_Top +576;
	}	
	myMenu6.container.style ? myMenu6.container.style.left = menu6Left + "px" : myMenu6.container.left = menu6Left;
	myMenu6.container.style ? myMenu6.container.style.top = menu6Top + "px" : myMenu6.container.left = menu6Top;
}
function repositionMenu7() {
	menu7Left = getWindowWidth() / 2 + LeftOffset7;	
	if (getWindowWidth() < 934) {
		menu7Left = 491;
	}	
	menu7Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() > 1) {
		menu7Top = browsMin_Top +475;
	}	
	myMenu7.container.style ? myMenu7.container.style.left = menu7Left + "px" : myMenu7.container.left = menu7Left;
	myMenu7.container.style ? myMenu7.container.style.top = menu7Top + "px" : myMenu7.container.left = menu7Top;
}
function repositionMenu8() {
	menu8Left = getWindowWidth() / 2 + LeftOffset8;	
	if (getWindowWidth() < 934) {
		menu8Left = 491;
	}	
	menu8Top = ((getWindowHeight() - 500)/2) + TopOffset;
	if (getWindowHeight() > 1) {
		menu8Top = browsMin_Top +626;
	}	
	myMenu8.container.style ? myMenu8.container.style.left = menu8Left + "px" : myMenu8.container.left = menu8Left;
	myMenu8.container.style ? myMenu8.container.style.top = menu8Top + "px" : myMenu8.container.left = menu8Top;
}

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 = 500
ypSlideOutSubMenu.hideDelay = 200
ypSlideOutSubMenu.minCPUResolution = 1
// 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 = 100;
submenu1bHeight = 100;
submenu2aHeight = 104;
submenu2bHeight = 78;
submenu2cHeight = 52;
submenu2dHeight = 52;
submenu2eHeight = 78;
submenu2fHeight = 52;
submenu2gHeight = 78;
submenu2hHeight = 52;
submenu2iHeight = 52;



var mySubMenu1a = new ypSlideOutSubMenu("submenu1a", "right", 0, 0, 171, submenu1aHeight)
var mySubMenu1b = new ypSlideOutSubMenu("submenu1b", "right", 0, 0, 171, submenu1bHeight)
var mySubMenu2a = new ypSlideOutSubMenu("submenu2a", "right", 0, 0, 171, submenu2aHeight)
var mySubMenu2b = new ypSlideOutSubMenu("submenu2b", "right", 0, 0, 171, submenu2bHeight)
var mySubMenu2c = new ypSlideOutSubMenu("submenu2c", "right", 0, 0, 171, submenu2cHeight)
var mySubMenu2d = new ypSlideOutSubMenu("submenu2d", "right", 0, 0, 171, submenu2dHeight)
var mySubMenu2e = new ypSlideOutSubMenu("submenu2e", "right", 0, 0, 171, submenu2eHeight)
var mySubMenu2f = new ypSlideOutSubMenu("submenu2f", "right", 0, 0, 171, submenu2fHeight)
var mySubMenu2g = new ypSlideOutSubMenu("submenu2g", "right", 0, 0, 171, submenu2gHeight)
var mySubMenu2h = new ypSlideOutSubMenu("submenu2h", "right", 0, 0, 171, submenu2hHeight)
var mySubMenu2i = new ypSlideOutSubMenu("submenu2i", "right", 0, 0, 171, submenu2iHeight)

mySubMenu1a.onactivate = repositionSubMenu1a
mySubMenu1b.onactivate = repositionSubMenu1b
mySubMenu2a.onactivate = repositionSubMenu2a
mySubMenu2b.onactivate = repositionSubMenu2b
mySubMenu2c.onactivate = repositionSubMenu2c
mySubMenu2d.onactivate = repositionSubMenu2d
mySubMenu2e.onactivate = repositionSubMenu2e
mySubMenu2f.onactivate = repositionSubMenu2f
mySubMenu2g.onactivate = repositionSubMenu2g
mySubMenu2h.onactivate = repositionSubMenu2h
mySubMenu2i.onactivate = repositionSubMenu2i

subLeftPos = 191;

function repositionSubMenu1a() {	
	submenuLeft = menu1Left + subLeftPos;
	submenuTop = menu1Top + 5;
	mySubMenu1a.container.style ? mySubMenu1a.container.style.left = submenuLeft + "px" : mySubMenu1a.container.left = submenuLeft;
	mySubMenu1a.container.style ? mySubMenu1a.container.style.top = submenuTop + "px" : mySubMenu1a.container.top = submenuTop;
}
function repositionSubMenu1b() {
	submenuLeft = menu1Left + subLeftPos;
	submenuTop = menu1Top + 32;
	mySubMenu1b.container.style ? mySubMenu1b.container.style.left = submenuLeft + "px" : mySubMenu1b.container.left = submenuLeft;
	mySubMenu1b.container.style ? mySubMenu1b.container.style.top = submenuTop + "px" : mySubMenu1b.container.top = submenuTop;
}
function repositionSubMenu2a() {
	submenuLeft = menu2Left + subLeftPos;
	submenuTop = menu2Top + 0;
	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 + 25;
	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 repositionSubMenu2c() {
	submenuLeft = menu2Left + subLeftPos;
	submenuTop = menu2Top + 52;
	mySubMenu2c.container.style ? mySubMenu2c.container.style.left = submenuLeft + "px" : mySubMenu2c.container.left = submenuLeft;
	mySubMenu2c.container.style ? mySubMenu2c.container.style.top = submenuTop + "px" : mySubMenu2c.container.top = submenuTop;
}
function repositionSubMenu2d() {
	submenuLeft = menu2Left + subLeftPos;
	submenuTop = menu2Top + 78;
	mySubMenu2d.container.style ? mySubMenu2d.container.style.left = submenuLeft + "px" : mySubMenu2d.container.left = submenuLeft;
	mySubMenu2d.container.style ? mySubMenu2d.container.style.top = submenuTop + "px" : mySubMenu2d.container.top = submenuTop;
}
function repositionSubMenu2e() {
	submenuLeft = menu2Left + subLeftPos;
	submenuTop = menu2Top + 104;
	mySubMenu2e.container.style ? mySubMenu2e.container.style.left = submenuLeft + "px" : mySubMenu2e.container.left = submenuLeft;
	mySubMenu2e.container.style ? mySubMenu2e.container.style.top = submenuTop + "px" : mySubMenu2e.container.top = submenuTop;
}
function repositionSubMenu2f() {
	submenuLeft = menu2Left + subLeftPos;
	submenuTop = menu2Top + 128;
	mySubMenu2f.container.style ? mySubMenu2f.container.style.left = submenuLeft + "px" : mySubMenu2f.container.left = submenuLeft;
	mySubMenu2f.container.style ? mySubMenu2f.container.style.top = submenuTop + "px" : mySubMenu2f.container.top = submenuTop;
}
function repositionSubMenu2g() {
	submenuLeft = menu2Left + subLeftPos;
	submenuTop = menu2Top + 156;
	mySubMenu2g.container.style ? mySubMenu2g.container.style.left = submenuLeft + "px" : mySubMenu2g.container.left = submenuLeft;
	mySubMenu2g.container.style ? mySubMenu2g.container.style.top = submenuTop + "px" : mySubMenu2g.container.top = submenuTop;
}
function repositionSubMenu2h() {
	submenuLeft = menu2Left + subLeftPos;
	submenuTop = menu2Top + 182;
	mySubMenu2h.container.style ? mySubMenu2h.container.style.left = submenuLeft + "px" : mySubMenu2h.container.left = submenuLeft;
	mySubMenu2h.container.style ? mySubMenu2h.container.style.top = submenuTop + "px" : mySubMenu2h.container.top = submenuTop;
}
function repositionSubMenu2i() {
	submenuLeft = menu2Left + subLeftPos;
	submenuTop = menu2Top + 208;
	mySubMenu2i.container.style ? mySubMenu2i.container.style.left = submenuLeft + "px" : mySubMenu2i.container.left = submenuLeft;
	mySubMenu2i.container.style ? mySubMenu2i.container.style.top = submenuTop + "px" : mySubMenu2i.container.top = submenuTop;
}


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>');
}

//Flash module loader Added 12/13/04 //// Cory
function targetOpener( siteLink ){
            var newWindow = '';
            if ( siteLink.substring(0,4) == "http" ) {
                        newWindow = window.open( siteLink ,'offsite','height=600,width=800,scrollbars=yes,resizable=yes');
                        if ( !newWindow.opener ) newWindow.opener = self;
                        window.focus();
            } else {
                        window.opener.location.href=siteLink
            }
}

// printThis
function printThis(fName, vName, vValue)
{
	alert(fName + "  " + vName + "  " + vValue);

	fObj = window.document.forms[fName];
	
	if (fObj != null)
	{
		vObj = fObj.elements[vName];
		
		if (vObj != null)
		{
			vObj.value = vValue;
			fObj.submit();
		}
	}
}

function printLink()
	{
		document.getElementById('printLink').style.visibility = "hidden";
	}

	

