<!-- Begin Javascript
// MY SCRIPTS
// Use this area to add new scripts that you need for your site
function emsTweak()
{
	if ((document.createElement) && (document.createTextNode))
	{
		document.writeln('<div id="emsTest" style="position:absolute; visibility:hidden; font-family:arial,helvetica,sans-serif">&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br /></div>');
		var scaling=100;
		if ((navigator.platform=="Win32") && (navigator.appName=="Microsoft Internet Explorer")) scaling=105;
		var h=999;
		if (document.getElementById('emsTest').clientHeight) h=parseInt(document.getElementById('emsTest').clientHeight);
		else if (document.getElementById('emsTest').offsetHeight) h=parseInt(document.getElementById('emsTest').offsetHeight);
		if (h<85) document.body.style.fontSize=Math.round(scaling*90/h)+"%";
	}
}

var viewWin = null;
function goform(mypage)
{
	box = document.example.forms[0].navi;
	destination = box.options[box.selectedIndex].value;
	update = mypage + '#' + destination;
	settings = 'height=300,width=700,top=10,left=10,scrollbars=yes,status=1,resizable=yes,status=no,titlebar=no';
//	if (destination) alert (update);
	if (destination){
	viewWin = window.open(update,'view',settings);
		if(viewWin.window.focus){viewWin.window.focus();
		}
	}
}
function gopage(mypage,title)
{
	update = mypage;
	settings = 'height=300,width=700,top=10,left=10,scrollbars=yes,status=1,resizable=yes';
	viewWin = window.open(update,'view',settings);
		if(viewWin.window.focus){viewWin.window.focus();
		}
}

function CloseNewWin(){if(viewWin!=null && viewWin.open)viewWin.close()}
window.onfocus=CloseNewWin;

function showtip(current,e,text)
{
   if (document.all)
   {
      thetitle=text.split('<br>')
      if (thetitle.length > 1)
      {
        thetitles=""
        for (i=0; i<thetitle.length-1; i++)
           thetitles += thetitle[i] + "\r\n"
        current.title = thetitles
      }
      else current.title = text
   }

   else if (document.layers)
   {
       document.tooltip.document.write( 
           '<layer bgColor="#FFFFE7" style="border:1px ' +
           'solid black; font-size:12px;color:#000000;">' + text + '</layer>')
       document.tooltip.document.close()
       document.tooltip.left=e.pageX+5
       document.tooltip.top=e.pageY+5
       document.tooltip.visibility="show"
   }
}

function hidetip()
{
    if (document.layers)
        document.tooltip.visibility="hidden"
}

///////////////////////////////////
// Pop-up window script below
// Use:
// <a href="../item in question.ext" onClick="pictureWindow('item?',this.href,'viewer','376','450');return false" border="0">
//   TEST
// </a>
var viewWin = null;
function infoWindow(module,mypage,myname,w,h) {
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars= yes,resizable= yes,status= no, titlebar= no, toolbar= yes, location= no, menubar= yes';
viewWin = window.open(module,myname,settings);
	if(viewWin.window.focus){viewWin.window.focus();
}
}
function CloseNewWin(){if(viewWin!=null && viewWin.open)viewWin.close()}
window.onfocus=CloseNewWin;


var viewWin = null;
function smallWindow(module,mypage,myname,w,h) {
var url=(module.dir.options[module.dir.selectedIndex].value);
if (url == "") {
	return false;
}
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars= yes,resizable= yes,status= no, titlebar= no, toolbar= yes, location= no, menubar= yes';
viewWin = window.open(url,myname,settings);
	if(viewWin.window.focus){viewWin.window.focus();
}
}
function CloseNewWin(){if(viewWin!=null && viewWin.open)viewWin.close()}
window.onfocus=CloseNewWin;



// This will permit a drop-down to go to a link embedded in the <select> blocks...
//  name of the form 'jumpmenu' (required!)
function dropdown()
{
location=document.jumpmenu.links.value
}

// Iframe - need something that will size the Iframe to the height of a html page source
// This is to load the Retiree-Login screen
function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  window.alert( 'Width = ' + myWidth );
  window.alert( 'Height = ' + myHeight );
}

/* hide/unhide award section details */
function ShowPop(id)
{
   document.getElementById(id).style.visibility = "visible";
}
function HidePop(id)
{
   document.getElementById(id).style.visibility = "hidden";
}

/* used with hide/unhide abilities */
function hide(status) {
 if (status == "hidden") {
   document.getElementById("textbox").style.visibility = "hidden";
   document.getElementById("button").innerHTML = "<a onclick=\"hide(\'show\')\" href=\"#\">Show Textbox<\/a>";
   }
else {
   document.getElementById("textbox").style.visibility = "visible";
   document.getElementById("button").innerHTML = "<a onclick=\"hide(\'hidden\')\" href=\"#\">Hide Textbox<\/a>";
   }

 }

function one(status) {
 if (status == "hidden") {
   document.getElementById("text1").style.visibility = "hidden";
   document.getElementById("button1").innerHTML = "<a onclick=\"hide(\'show\')\" href=\"#\">Show Textbox<\/a>";
   }
else {
   document.getElementById("text1").style.visibility = "visible";
   document.getElementById("button1").innerHTML = "<a onclick=\"hide(\'hidden\')\" href=\"#\">Hide Textbox<\/a>";
   }

 }

function changeText(){
	document.getElementById('boldStuff').innerHTML = '<strong><em>Dianne Johnson </em></strong> began her employment in the Pension Office as a casual/seasonal summer employee in July of 1974 and hired fulltime in October of 1974. Throughout her career in this office, she has held various positions such as Sr. Clerk Typist in 1981 and progressed upward to where she will be retiring from her duties as a Human Resource Specialist II in July 2007 commemorating 31 years of professional service!<br>';
}

/* **********************************************
JQUERY MODULE:  accordian2
Purpose: use with Pensions Calendar section
added - 02/22/10
author - LGL
Info:
Each <p> assigned is part of an array.  To make one active (display first)
put it's number inside the eq() statements below.
********************************************** */
$(document).ready(function(){
	$("table.hilites tr:odd").addClass("rowShade");

	$(".accordion2 h3").eq(0).addClass("active");
	$(".accordion2 div.cont").eq(0).show();

	$(".accordion2 h3").click(function(){
		$(this).next("div.cont").slideToggle("slow")
		.siblings("div:visible").slideUp("slow");
		$(this).toggleClass("active");
		$(this).siblings("h3").removeClass("active");
	});


	//Default Action --  sliding panels actions
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

    var $panels = $('#slider .scrollContainer > div');
    var $container = $('#slider .scrollContainer');

    // if false, we'll float all the panels left and fix the width 
    // of the container
    var horizontal = true;

    // float the panels left if we're going horizontal
    if (horizontal) {
        $panels.css({
            'float' : 'left',
            'position' : 'relative' // IE fix to ensure overflow is hidden
        });

        // calculate a new width for the container (so it holds all panels)
        $container.css('width', $panels[0].offsetWidth * $panels.length);
    }

    // collect the scroll object, at the same time apply the hidden overflow
    // to remove the default scrollbars that will appear
    var $scroll = $('#slider .scroll').css('overflow', 'hidden');

    // apply our left + right buttons
    $scroll
        .before('<img class="scrollButtons left" src="/images/scroll_left.png" />')
        .after('<img class="scrollButtons right" src="/images/scroll_right.png" />');

    // handle nav selection
    function selectNav() {
        $(this)
            .parents('ul:first')
                .find('a')
                    .removeClass('selected')
                .end()
            .end()
            .addClass('selected');
    }

    $('#slider .navigation').find('a').click(selectNav);

    // go find the navigation link that has this target and select the nav
    function trigger(data) {
        var el = $('#slider .navigation').find('a[href$="' + data.id + '"]').get(0);
        selectNav.call(el);
    }

    if (window.location.hash) {
        trigger({ id : window.location.hash.substr(1) });
    } else {
        $('ul.navigation a:first').click();
    }

    // offset is used to move to *exactly* the right place, since I'm using
    // padding on my example, I need to subtract the amount of padding to
    // the offset.  Try removing this to get a good idea of the effect
    var offset = parseInt((horizontal ? 
        $container.css('paddingTop') : 
        $container.css('paddingLeft')) 
        || 0) * -1;


    var scrollOptions = {
        target: $scroll, // the element that has the overflow

        // can be a selector which will be relative to the target
        items: $panels,

        navigation: '.navigation a',

        // selectors are NOT relative to document, i.e. make sure they're unique
        prev: 'img.left', 
        next: 'img.right',

        // allow the scroll effect to run both directions
        axis: 'xy',

        onAfter: trigger, // our final callback

        offset: offset,

        // duration of the sliding effect
        duration: 500,

        // easing - can be used with the easing plugin: 
        // http://gsgd.co.uk/sandbox/jquery/easing/
        easing: 'swing'
    };

    // apply serialScroll to the slider - we chose this plugin because it 
    // supports// the indexed next and previous scroll along with hooking 
    // in to our navigation.
    $('#slider').serialScroll(scrollOptions);

    // now apply localScroll to hook any other arbitrary links to trigger 
    // the effect
    $.localScroll(scrollOptions);

    // finally, if the URL has a hash, move the slider in to position, 
    // setting the duration to 1 because I don't want it to scroll in the
    // very first page load.  We don't always need this, but it ensures
    // the positioning is absolutely spot on when the pages loads.
    scrollOptions.duration = 1;
    $.localScroll.hash(scrollOptions);


	// BG color for odd/even div or <tr><td> items
	//for div



});



// End Javascript -->