
/* landopt.js */

// TOC

// addLoadEvent()
// getHost()
// debugColors()
// hideExpiredDate()
// matchDivHeight() 
// openClientLogin()
// openSelfServicePortal()
// scrollToTop()
// scrollToTopTeam()
// scrollWin()
// showBoardBiobox()   
// showContentPillars()   
// showNetworkBiobox() 
// showHideObject()
// showTeamBiobox()  
// swapImage()   


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		addLoadEvent()
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



// to add "body onLoad" type functions due to 
// Dreamweavers template not allowing changes
function addLoadEvent(func) 
{
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}

/*
addLoadEvent(function() { 
	//do something
});


*/
// End //////////////
/////////////////////


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		getHost()
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function getHost()
{
	//document.write("location.hostname = "+window.location.hostname)
	var av = document.getElementById("pallet");
	
	if(window.location.hostname == ""){
		//alert("location.hostname = "+window.location.hostname)
		//var a = document.getElementById("container");
	   //  a.style.backgroundColor = "Blue";
	}else{
		//alert("location.hostname = "+window.location.hostname)
	}
}

// End //////////////
/////////////////////








////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		debugColors()
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



// to add "body onLoad" type functions due to 
// Dreamweavers template not allowing changes
function debugColors() 
{
	var a = document.getElementById("container");
	a.style.backgroundColor = "Blue";
	
	var b = document.getElementById("main");
	b.style.backgroundColor = "Red";
	
	var b = document.getElementById("home_testimonials");
	b.style.backgroundColor = "Orange";
	//b.style.display = "none";
	
	/*var b = document.getElementById("main");
	b.style.backgroundColor = "Red";
	
	var b = document.getElementById("main");
	b.style.backgroundColor = "Red";*/
	
	//alert(a)
}

// End //////////////
/////////////////////









////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		hideExpiredDate()
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


var xVar = 0
function hideExpiredDate(fMonth,fDay,fYear,divID){
	
	// added the -1 so you can put in the logical number
	// for the date instead of 0 for January, 1 for december
	// etc.
	var fMonth2 = fMonth-1
	
	// setup last day to show
	var finalDay = new Date();
	finalDay.setFullYear(fYear,fMonth2,fDay);
	
	var today = new Date();
	
	////////////////////////////////
	////  testing future dates  ////
	////////////////////////////////
	function testDate(xYear,xMonth,xDay){

		//var today = new Date(); // comment out inside of hideExpiredDate()'
		today.setFullYear(xYear,xMonth-1,xDay);
		
		//alert once
		if (xVar == 0){
		//if (xVar <= 5){
			alert(today)
			xVar++
		}
	}
	//testDate(2010,10,21)
	
	// setup item to hide or change
	var dv = document.getElementById(divID);
	
	if (today>finalDay)
	{
		//dv.style.display="none";
		
		//dv.style.color="#FAA";
		//dv.textContent="EXPIRED"
		//dv.style.border="2px solid red"
		
		dv.style.filter="alpha(opacity = 30)";
		dv.style.opacity=".3";
		//$('#'+dv).find('p .expander_title_box_mid_p').toggleClass('expired_cal_item');
		//$(dv).find('p').css('border','2px solid red');
		//$('#ppp').css('border','2px solid red');
		
		//$(dv).child('#ppp').css('backgroundColor','#ff0');

		//alert('date');
		
		//$(dv).addClass("expired_cal_item");
		
		//$(dv).children('p').css('background-color', 'red');
		
		//$('#princmeet_feb2').children('p').css('color', 'green'); //worked
		
		//$('div').children('.expander_title_box_mid_p').css('color', 'green'); //worked
		
		//$('#princmeet_feb2').children().children().children('p').css('color', 'green'); //worked
		
		//$('#princmeet_feb2').children().children().children().children('p').css('color', '#CCC'); //worked
		
			//$('#princmeet_feb2').children().children().children().children('.expander_title_box_mid_p').css('color', '#CCC'); //worked
		//$(dv).children().children().children().children('.expander_title_box_mid_p').css('color', '#CCC'); //worked
		
		//$(dv).children().children().children().children('.expander_title_box_mid_p').css('opacity', '.3'); //worked FF
		
		// IE not dimming correctly so...
		if (navigator.appName == 'Microsoft Internet Explorer'){
			// for title box text
			$(dv).children().children().children().children('.expander_title_box_mid_p').toggleClass('expired_color');
			// for trainingcal.htm type individual text dates
			$(dv).addClass('expired_date');
		};
		
		
		
		// $("p").filter(".selected, :first")
	}
	  
}
// hideExpiredDate(12,23,2009,'divID');

// End //////////////
/////////////////////









////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		matchDivHeight()   
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



// used on employ.htm, contact.htm
function matchDivHeight(findHeightdiv, setHeightdiv, correction)
{
	// find the height of this div
	var findHeight = document.getElementById(findHeightdiv).offsetHeight
	
	// gets the div whos height is to be set
	var setHeight = document.getElementById(setHeightdiv);
	
	// correction deals with height difference caused
	// by padding, margins, borders etc.
	var cor = correction;
	
	var isIE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
	/*if (isIE6 == true){
		//var cor = correction - 20
	}*/

	//alert (findHeight+cor+"|"+findHeight)
	// set height for setHeightdiv
	if((findHeight+cor)< findHeight){
		setHeight.style.height = ((findHeight+cor)+'px')
	}else
	{
		// in case the right column is shorter than the left
		setHeight.style.height = "auto"//(min_height+'px')
		setHeight.style.height = ((findHeight+cor)+'px')
	}
	//alert(findHeight+"||"+corrector+"   |   "+setHeight.style.height)
}

/*$(document).ready(function() {
	matchDivHeight('all_col_2_525', 'employ_col_1_content', -70);
})*/
// End //////////////
/////////////////////









////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		openClientLogin()
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



// used on client links in footer and header
function openClientLogin(){
	//window.location = "http://landopt.sharepointspace.com/licensee/default.aspx";
	window.open ("http://landopt.sharepointspace.com/licensee/default.aspx","mywindow");
}
// End //////////////
/////////////////////









////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		openSelfServicePortal()
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



// used on client links in footer and header
function openSelfServicePortal(){
	//window.location = "https://na4.salesforce.com/sserv/login.jsp?orgId=00D3000000019wV";
	window.location = "ssportal.htm";
	
	//<a href="https://na4.salesforce.com/sserv/login.jsp?orgId=00D3000000019wV" target="_self">
}
// End //////////////
/////////////////////








////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		scrollToTop()
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



function scrollToTop()
{
	$.scrollTo( '#body_top', 1500, { easing:'easeinout' });
}
// End //////////////
/////////////////////









////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		scrollToTopTeam()
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////





function scrollToTopTeam()
{
	$.scrollTo( '#body_top', 1500, { easing:'easeinout' });
	window.setTimeout(
		function() {
			showTeamBiobox('TS','noscroll');
		}, 1600);
	/*showTeamBio('TS','noscroll');
	window.setTimeout(
		function() {
			$.scrollTo( '#body_top', 1500, { easing:'easeinout' });
		}, 500);*/
			
	//$.scrollTo( '#body_top', 1000, { easing:'easeinout' });
}
// End //////////////
/////////////////////









////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		scrollWin()
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



function scrollWin(divName)
{
	/*$('#toc a').click(function(){//$.scrollTo works EXACTLY the same way, but scrolls the whole screen
		$.scrollTo( this.hash, 1500, { easing:'elasout' });
		$(this.hash).find('span.message').text( this.title );
		return false;
	});*/
	$('#divName').click(function(){//$.scrollTo works EXACTLY the same way, but scrolls the whole screen
		$.scrollTo( this.hash, 1500, { easing:'elasout' });
		$(this.hash).find('span.message').text( this.title );
		return false;
	});
	//$('html, body').animate({scrollTop: $('#'+divName).offset().top}, 1000);
}
// End //////////////
/////////////////////







////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		showBoardBiobox()   
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



// used in team.htm
function showBoardBiobox(member, dontScroll)
{
	// hide all divs first 
	hideBoardBioboxAll(member);
	// setup main styles 
	setBoardBioboxStyle(member);
	// setup inner styles 
	setBoardBioboxStyleInner(member)
	// setup height for the inner and outer BioBox // ***** not in use - height set to 'auto' *****
	//setBoardBioboxHeight();   
	 
	// lineup bio with member
	setBoardBioboxPosition("board2_memberbox_"+member,"board2_biobox_"+member);
	// so it does not scroll when first entering page 
	if(dontScroll!="noscroll"){
		//$.scrollTo( "#board2_memberbox_"+member, 1000, { easing:'easeinout' });
		
		var mbox = "board2_memberbox_"+member
		var mbox2 = (284-20);
		var offset = document.getElementById(mbox).offsetTop;
		var mpos = offset + mbox2
		$.scrollTo( mpos, 1000, { easing:'easeinout' });
		
	}else{
	// Reset all scrollable panes to (0,0)
		//$('div.pane').scrollTo( 0 );
	// Reset the screen to (0,0)
		//$.scrollTo( 0 );
		//gotoTop()
	}
}
/////////////////////////////////////////
/////////////////////////////////////////
//
// child functions of showBoardBiobox
//
/////////////////////////////////////////
/////////////////////////////////////////

// setup div styles 
function setBoardBioboxStyle(member)
{
	var dv = document.getElementById("board2_biobox_"+member);
	dv.style.position = "relative";
	dv.style.zIndex = "99";
	dv.style.display= "block";
	dv.style.margin = "0px 0px 20px 30px";
	dv.style.height = "auto"
	dv.style.width = "450px"
	dv.style.opacity = "1";
	dv.style.filter = "alpha(opacity = 100)";
}
// setup inner styles 
function setBoardBioboxStyleInner(member)
{
	var dv_inner = document.getElementById("board2_biobox_"+member+'_inner');
	dv_inner.style.display = "block";
	dv_inner.style.height = "auto";
	dv_inner.style.width = "auto";
	dv_inner.style.padding = "70px 60px 70px 60px"
}
// sets height of box
function setBoardBioboxHeight()
{
	var height = boxHeight;
	dv.style.height = height + "px";
	dv_inner.style.height = ((height-sizeDiff)+"px");
}
// hides one member
function hideBoardBiobox(member)
{
	var dv = document.getElementById("board2_biobox_"+member);
	//dv.style.position = "absolute";
	dv.style.zIndex = "1";
	dv.style.opacity = "0";
	dv.style.filter = "alpha(opacity = 0)";
	dv.style.display = "none";
	
}
// hides all board members 
function hideBoardBioboxAll()
{ 
	// !!! modify array when adding/subtracting board members
	var boardMembers = ["GF","BK","PM","DS","TS","JV","DE"];
	for (var i = 0; i < boardMembers.length; i++) {
		var boardMember = boardMembers[i];
		hideBoardBiobox(boardMember)
	}
}
//
function setBoardBioboxPosition(findThis,setThis)
{
	var dv1 = document.getElementById(findThis).offsetTop;
	var dv2 = document.getElementById(setThis);
	
	var dvBioCol = document.getElementById("all_col_2_525");//all_col_2_525
	var dvBioCol_inner = document.getElementById("all_col_2_525_inner");

	var bioHeight = document.getElementById(setThis).offsetHeight
	var memberColHeight = document.getElementById("col_1_content").height;
	
	var newHeight = bioHeight + dv1 + 50;
	
	dv2.style.position = "absolute";
	dv2.style.top = (dv1-10)+"px";
	
	dvBioCol.style.height = newHeight+"px"
	//dvBioCol.style.marginLeft = "10px";
	dvBioCol_inner.style.height = ((newHeight-60)+"px")	
}

// End //////////////
/////////////////////
/*$(function () {
  $('img.swap').hover(function () {
    this.src = 'images/sad.jpg';
  }, function () {
    this.src = 'images/happy.jpg';
  });
});*/
$(document).ready(function() {
	/*$("img").hover(function(){
	  //$(this).addClass("hover");
	  this.src = 'images/top_btn_2_over.gif';
	  //this.src = '../landopt_dev12567/images/top_btn_over.gif';
	  //alert("HI");
	},function(){
	  //$(this).removeClass("hover");
	  this.src = 'images/top_btn_2_up.gif';
	 // this.src = '../landopt_dev12567/images/top_btn.gif';
	}); */
	
	/*var navDuration = 150; //time in miliseconds
      var navJumpHeight = "0px";

      $('#top_btn').hover(function() {
          $(this).animate({ top : "-="+navJumpHeight }, navDuration);            
      }, function() {
          $(this).animate({ top : "66px" }, navDuration);
      });*/
	 
	 /*$("#top_btn").hover(function(){
      $("#top_btn").animate({ 
        opacity: 100,
	   bottom: "+=10px",
	   left: "+=50px"
      }, 1000 );
	 
   	 });
	 $("#top_btn").rollout(function(){
      $("#top_btn").animate({ 
        left: "-=50px",
      }, 1500 );
	 
   	 });*/
	 
	 $(function() {
			$('#top_btn .content').hover(function(){
				$(this).find('img').animate({
					top:'0px',
					opacity:1
					//filter:'alpha(opacity=30)';		   
				},{queue:false,duration:100});
			}, function(){
				$(this).find('img').animate({
					top:'-4px',
					opacity:0.5
				},{queue:false,duration:50});
			});
		});
//$(".block").animate({"left": "+=50px"}, "slow");

	 
})
/*$('#top_btn')(function () {
    $('<div class="fader" />').css('opacity', 0).prependTo(this);
  }).hover(function () {
    $('img', this).stop().animate({
      marginLeft : 5
    }, 250);
    
    $('.fader', this).stop().animate({
      opacity : 0.15
    });
    
  }, function () {
    $('img', this).stop().animate({
      marginLeft : 10
    }, 250);
    
    $('.fader', this).stop().animate({
      opacity : 0
    });
  }).find('img').css('marginLeft', 10);*/


// End showBoardBiobox()  //////////////
////////////////////////////////////////





////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		showContentPillars()   
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



// used in pillars.htm 
function showContentPillars(divName2)
{
	
/* 
	hide all divs first 
*/
	hideContentPillarsAll();
	
/* 
	"show" chosen div 
*/
	var dv2 = document.getElementById(divName2);
	dv2.style.position = "absolute";
	dv2.style.left = "0px";
	dv2.style.top = "0px";
	dv2.style.zIndex = "99";
	dv2.style.opacity = "1";
	dv2.style.filter = "alpha(opacity = 100)";
	dv2.style.top = "0";
	dv2.style.left = "0";
	dv2.style.display = "inline";
	dv2.style.padding = "0";
	dv2.style.margin= "30px 0px 0px 30px";
	dv2.style.width = "450px";
	dv2.style.height = "auto";
	
	var dv44 = document.getElementById("pillars_box_2");
	//var dv44 = document.getElementById("font_test");
	dv44.style.fontSize = "12px";
	//dv44.style.fontFamily="Lucida Sans Unicode", "Lucida Grande", "sans-serif"
	dv44.style.fontFamily="Arial, Helvetica, sans-serif"
/*	font-size:14px;
	font-family:  "Lucida Sans Unicode", "Lucida Grande", sans-serif;
	line-height: 22px;
	text-align: left;*/
/* 
	refresh "pillars_col_2"'s width and height - seems to need this 
*/	
	setHeightPillarsCol2(divName2);
	
		function checkIE(){
			var xVersion = checkVersionIE()
			if (xVersion==6){
				//alert("IE6")
				matchDivHeight('pillars_col_2', 'pillars_btns', -88);
			}else
			if (xVersion==7){
				//alert("IE7")
				matchDivHeight('pillars_col_2', 'pillars_btns', -88);
			}else{
				matchDivHeight('pillars_col_2', 'pillars_btns', -100);
			}

		}
		//alert (cor)
		checkIE();
		/*tr = document.getElementById('pillars_col_2');
		tr.style.width = "525px";
		tr.style.height = "auto";*/

	/*tr2 = document.getElementById('#pillars_col_2 #content');
	tr2.style.width = "485px";
	tr2.style.height = "1050px";	
	tr2.style.backgroundColor = "#186321"*/
	
	/* change bg color (not needed) */
	/*
	if(divName2 == 'box_SAM'){
		tr.style.backgroundColor = "#186321";
	}else if(divName2 == 'box_HRM'){
		 tr.style.backgroundColor = "#0B0049";
	}else if(divName2 == 'box_OM'){
		 tr.style.backgroundColor = "#D6B202";
	}else if(divName2 == 'box_BM'){
		 tr.style.backgroundColor = "#BA151B";
	}
	*/
	
	//return false
}
function setHeightPillarsCol2(findThis)
{
		var dv1 = document.getElementById(findThis).offsetHeight;
		var dv2 = document.getElementById('pillars_col_2');
		var dv3 = document.getElementById('pillars_col_2_content');
		
		dv2.style.height = (dv1+80)+"px";
		//dv2.style.margin = "0px 0px 0px 10px"; //was screwing IE6 UP so gave the margin to pillars_col_1
		dv2.style.margin = "0px 0px 0px 0px";
		
		dv3.style.height = (dv1-10)+"px";
		//dv3.style.margin = "10px";
		dv3.style.padding = "30px 10px 40px 10px";
		
}
function hideContentPillars(divName2)
{
	var dvhide = document.getElementById(divName2);
	
	dvhide.style.position = "absolute";
	dvhide.style.left = "0px";
	dvhide.style.top = "0px";
	dvhide.style.zIndex = "1";
	dvhide.style.opacity = "0";
	dvhide.style.filter = "alpha(opacity = 0)";
	dvhide.display= "hidden";
}
function hideContentPillarsAll()
{
	hideContentPillars('box_INT');
	hideContentPillars('box_SM');
	hideContentPillars('box_HRM');
	hideContentPillars('box_OM');
	hideContentPillars('box_BM');
	//alert("Hide")
}
// End //////////////
/////////////////////








////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		showNetworkBiobox()   
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



// used in team.htm
function showNetworkBiobox(member, dontScroll)
{
	// hide all divs first 
	hideNetworkBioboxAll(member);
	// setup main styles 
	setNetworkBioboxStyle(member);
	// setup inner styles 
	setNetworkBioboxStyleInner(member)
	// setup height for the inner and outer BioBox // ***** not in use - height set to 'auto' *****
	//setNetworkBioboxHeight();   
	 
	// lineup bio with member
	setNetworkBioboxPosition("memberbox_"+member,"network_biobox_"+member);
	// so it does not scroll when first entering page 
	if(dontScroll!="noscroll"){
		// old
		//$.scrollTo( "#memberbox_"+member, 1000, { easing:'easeinout' });
		
		// new
		
		/*<--- works  */
		
		var mbox = "memberbox_"+member
		var mbox2 = (284-20);
		var offset = document.getElementById(mbox).offsetTop;
		var mpos = offset + mbox2
		$.scrollTo( mpos, 1000, { easing:'easeinout' });
		//alert(offset)
		
		/*  works - end  --->*/
		
		/*var mbox = "memberbox_"+member
		var mbox2 = (284-20);
		var offset = document.getElementById(mbox).offsetTop;
		var offset2 = $(mbox).offset();
		var offset3 = offset2.left
		var mpos = offset
		$.scrollTo( (mpos+mbox2), 1000, { easing:'easeinout' });*/
		//console.log(offset3)
		//var dv1 = document.getElementById(mbox).offsetTop;
	}else{
	// Reset all scrollable panes to (0,0)
		//$('div.pane').scrollTo( 0 );
	// Reset the screen to (0,0)
		//$.scrollTo( 0 );
		//gotoTop()
	}
}
/////////////////////////////////////////
/////////////////////////////////////////
//
// child functions of showNetworkBiobox
//
/////////////////////////////////////////
/////////////////////////////////////////

// setup div styles 
function setNetworkBioboxStyle(member)
{
	var dv = document.getElementById("network_biobox_"+member);
	dv.style.position = "relative";
	dv.style.zIndex = "99";
	dv.style.display= "block";
	dv.style.margin = "0px 0px 20px 30px";
	dv.style.height = "auto"
	dv.style.width = "450px"
	dv.style.opacity = "1";
	dv.style.filter = "alpha(opacity = 100)";
}
// setup inner styles 
function setNetworkBioboxStyleInner(member)
{
	var dv_inner = document.getElementById("network_biobox_"+member+'_inner');
	dv_inner.style.display = "block";
	dv_inner.style.height = "auto";
	dv_inner.style.width = "auto";
	dv_inner.style.padding = "70px 60px 70px 60px"
}
// sets height of box
function setNetworkBioboxHeight()
{
	var height = boxHeight;
	dv.style.height = height + "px";
	dv_inner.style.height = ((height-sizeDiff)+"px");
}
// hides one member
function hideNetworkBiobox(member)
{
	var dv = document.getElementById("network_biobox_"+member);
	//dv.style.position = "absolute";
	dv.style.zIndex = "1";
	dv.style.opacity = "0";
	dv.style.filter = "alpha(opacity = 0)";
	dv.style.display = "none";
	
}
// hides all network members 
function hideNetworkBioboxAll()
{ 
	// !!! modify array when adding/subtracting network members
	var networkMembers = ["EL","BB","SG","MV","GE","NU","MT","UP","TR","CC","ML","TO","CA","PRO","PROS","JC","BT"];
	for (var i = 0; i < networkMembers.length; i++) {
		var networkMember = networkMembers[i];
		hideNetworkBiobox(networkMember)
	}
}
//
function setNetworkBioboxPosition(findThis,setThis)
{
	var dv1 = document.getElementById(findThis).offsetTop;
	var dv2 = document.getElementById(setThis);
	
	var dvBioCol = document.getElementById("all_col_2_525");//all_col_2_525
	var dvBioCol_inner = document.getElementById("all_col_2_525_inner");

	var bioHeight = document.getElementById(setThis).offsetHeight
	var memberColHeight = document.getElementById("col_1_content").height;
	
	var newHeight = bioHeight + dv1 + 50; 
	
	dv2.style.position = "absolute";
	dv2.style.top = (dv1-10)+"px";
	
	dvBioCol.style.height = newHeight+"px"
	//dvBioCol.style.marginLeft = "10px";
	dvBioCol_inner.style.height = ((newHeight-60)+"px")	
}

// End //////////////
/////////////////////

$(document).ready(function() {
	 
	 $(function() {
			$('#top_btn .content').hover(function(){
				$(this).find('img').animate({
					top:'0px',
					opacity:1
					//filter:'alpha(opacity=30)';		   
				},{queue:false,duration:100});
			}, function(){
				$(this).find('img').animate({
					top:'-4px',
					opacity:0.5
				},{queue:false,duration:50});
			});
		});
//$(".block").animate({"left": "+=50px"}, "slow");

	 
})
// End showNetworkBiobox()  //////////////
////////////////////////////////////////




////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		showHideObject()
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



function showHideObject(ob1)
{
	
	var e = document.getElementById(ob1);

	if(e.style.opacity == '1'){
		e.style.opacity  = '0';
		e.style.filter = "alpha(opacity = 0)";
	}else{
		e.style.opacity  = '1';
		e.style.filter = "alpha(opacity = 100)";
	}

		//alert(e.style.display);

}
// End //////////////
/////////////////////






////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		showTeamBiobox()   
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



// used in team.htm
function showTeamBiobox(member, dontScroll)
{
	// hide all divs first 
	hideTeamBioboxAll(member);
	// setup main styles 
	setTeamBioboxStyle(member);
	// setup inner styles 
	setTeamBioboxStyleInner(member)
	// setup height for the inner and outer BioBox // ***** not in use - height set to 'auto' *****
	//setTeamBioboxHeight();   
	 
	// lineup bio with member
	setTeamBioboxPosition("team_memberbox_"+member,"team_biobox_"+member);
	// so it does not scroll when first entering page 
	if(dontScroll!="noscroll"){
		//$.scrollTo( "#team_memberbox_"+member, 1000, { easing:'easeinout' });
		
		
		var mbox = "team_memberbox_"+member
		var mbox2 = (284-20);
		var offset = document.getElementById(mbox).offsetTop;
		var mpos = offset + mbox2
		$.scrollTo( mpos, 1000, { easing:'easeinout' });
		//alert("");
		
		
	}else{
	// Reset all scrollable panes to (0,0)
		//$('div.pane').scrollTo( 0 );
	// Reset the screen to (0,0)
		//$.scrollTo( 0 );
		//gotoTop()
	}
}
/////////////////////////////////////////
/////////////////////////////////////////
//
// child functions of showTeamBiobox
//
/////////////////////////////////////////
/////////////////////////////////////////

// setup div styles 
function setTeamBioboxStyle(member)
{
	var dv = document.getElementById("team_biobox_"+member);
	dv.style.position = "relative";
	dv.style.zIndex = "99";
	dv.style.display= "block";
	dv.style.margin = "0px 0px 20px 30px";
	dv.style.height = "auto"
	dv.style.width = "450px"
	dv.style.opacity = "1";
	dv.style.filter = "alpha(opacity = 100)";
}
// setup inner styles 
function setTeamBioboxStyleInner(member)
{
	var dv_inner = document.getElementById("team_biobox_"+member+'_inner');
	dv_inner.style.display = "block";
	dv_inner.style.height = "auto";
	dv_inner.style.width = "auto";
	dv_inner.style.padding = "70px 60px 70px 60px"
}
// sets height of box
function setTeamBioboxHeight()
{
	var height = boxHeight;
	dv.style.height = height + "px";
	dv_inner.style.height = ((height-sizeDiff)+"px");
}
// hides one member
function hideTeamBiobox(member)
{
	var dv = document.getElementById("team_biobox_"+member);
	//dv.style.position = "absolute";
	dv.style.zIndex = "1";
	dv.style.opacity = "0";
	dv.style.filter = "alpha(opacity = 0)";
	dv.style.display = "none";
	
}
// hides all team members 
function hideTeamBioboxAll()
{ 
	// !!! modify array when adding/subtracting team members
	var teamMembers = ["TS","NE","NR","MG","DG","SB","RG","JS","RC"];
	for (var i = 0; i < teamMembers.length; i++) {
		var teamMember = teamMembers[i];
		hideTeamBiobox(teamMember)
	}
}
//
function setTeamBioboxPosition(findThis,setThis)
{
	var dv1 = document.getElementById(findThis).offsetTop;
	var dv2 = document.getElementById(setThis);
	
	var dvBioCol = document.getElementById("all_col_2_525");//all_col_2_525
	var dvBioCol_inner = document.getElementById("all_col_2_525_inner");

	var bioHeight = document.getElementById(setThis).offsetHeight
	var memberColHeight = document.getElementById("col_1_content").height;
	
	var newHeight = bioHeight + dv1 + 50;
	
	dv2.style.position = "absolute";
	dv2.style.top = (dv1-10)+"px";
	
	dvBioCol.style.height = newHeight+"px"
	//dvBioCol.style.marginLeft = "10px";
	dvBioCol_inner.style.height = ((newHeight-60)+"px")	
}

// End //////////////
/////////////////////
/*$(function () {
  $('img.swap').hover(function () {
    this.src = 'images/sad.jpg';
  }, function () {
    this.src = 'images/happy.jpg';
  });
});*/
$(document).ready(function() {
	/*$("img").hover(function(){
	  //$(this).addClass("hover");
	  this.src = 'images/top_btn_2_over.gif';
	  //this.src = '../landopt_dev12567/images/top_btn_over.gif';
	  //alert("HI");
	},function(){
	  //$(this).removeClass("hover");
	  this.src = 'images/top_btn_2_up.gif';
	 // this.src = '../landopt_dev12567/images/top_btn.gif';
	}); */
	
	/*var navDuration = 150; //time in miliseconds
      var navJumpHeight = "0px";

      $('#top_btn').hover(function() {
          $(this).animate({ top : "-="+navJumpHeight }, navDuration);            
      }, function() {
          $(this).animate({ top : "66px" }, navDuration);
      });*/
	 
	 /*$("#top_btn").hover(function(){
      $("#top_btn").animate({ 
        opacity: 100,
	   bottom: "+=10px",
	   left: "+=50px"
      }, 1000 );
	 
   	 });
	 $("#top_btn").rollout(function(){
      $("#top_btn").animate({ 
        left: "-=50px",
      }, 1500 );
	 
   	 });*/
	 
	 $(function() {
			$('#top_btn .content').hover(function(){
				$(this).find('img').animate({
					top:'0px',
					opacity:1
					//filter:'alpha(opacity=30)';		   
				},{queue:false,duration:100});
			}, function(){
				$(this).find('img').animate({
					top:'-4px',
					opacity:0.5
				},{queue:false,duration:50});
			});
		});
//$(".block").animate({"left": "+=50px"}, "slow");

	 
})
/*$('#top_btn')(function () {
    $('<div class="fader" />').css('opacity', 0).prependTo(this);
  }).hover(function () {
    $('img', this).stop().animate({
      marginLeft : 5
    }, 250);
    
    $('.fader', this).stop().animate({
      opacity : 0.15
    });
    
  }, function () {
    $('img', this).stop().animate({
      marginLeft : 10
    }, 250);
    
    $('.fader', this).stop().animate({
      opacity : 0
    });
  }).find('img').css('marginLeft', 10);*/


// End //////////////
/////////////////////







////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////
////
////
////		swapImage()   
////
////
////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



// used in team.htm
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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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


function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName == 'Microsoft Internet Explorer')
  {
    var ua = navigator.userAgent;
    var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv = parseFloat( RegExp.$1 );
  }
  return rv;
}
function checkVersionIE()
{
  var msg = "You're not using Internet Explorer.";
  var ver = getInternetExplorerVersion();

 /* if ( ver > -1 )
  {
    if ( ver == 7 ) {
     // msg = "You're using IE"+versionCheck+".";
	 var version7=true;
  	}else{
      msg = "You should upgrade your copy of Internet Explorer.";
	}
  }*/
 // alert( ver );
  return ver;
}
//getInternetExplorerVersion()
//checkVersionIE()
function isIE7(){
	/*if (x==true){
	 	alert( x );
	}else{
		alert( "not IE7" );
	}*/
	//return x
}
function checkit(){
var yy = isIE7()
	if (yy==true){
	 	alert( yy );
	}else{
		alert( "not IE7" );
	}

}
//checkit()









/*  end landopt.js  */