<!--//--><![CDATA[//><!--

// Menu Loader
var mnu = new Array();
window.onload = function(){
    var folder = document.getElementById("currentFolder");
    if (folder != null){
    	if (folder.innerHTML.length > 0){
        	mnu[0] = new xMenu5('vNav', 'xMenuBtn', folder.innerHTML);
        } else {
       		mnu[0] = new xMenu5('vNav', 'xMenuBtn');
        }
    } else {
	    mnu[0] = new xMenu5('vNav', 'xMenuBtn');
    }	
}

window.onunload = function(){
    if (mnu[0] != null){
	    mnu[0].onUnload();
    }
}

function validateSearch(obj) {
	if(obj.value == "") {
		alert("Please enter a search phrase");
		return false;
	} else {
		location.href = '/cms/search/search2.asp?zoom_query=' + obj.value;
		return false;
	}
}

function flashWrite(flashfile,x,y,flashvar) {
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+ x +"' height='"+ y +"'>");
	document.write("<param name='movie' value='"+ flashfile +"' />");
	document.write("<param name='quality' value='high' />");
	document.write("<param name='flashvars' value='"+ flashvar +"' />");
	document.write("<param name='wmode' value='transparent' />");
	document.write("<embed src='"+ flashfile +"' wmode='transparent' ");
	document.write("flashvars='"+ flashvar +"'  ");
	document.write("quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ x +"' height='"+ y +"'></embed>");
	document.write("</object>");
}

function printYear() {
	var today = new Date();
	document.write(today.getFullYear());
}

function writeEmail(email) {
	document.write('<a href="mailto:'+email+'">'+email+'</a>');
}

function changeTextSize(textSize) {
	document.body.className = 'site ' + textSize;
	return false;
}

function printPage() {
	window.print();
	return false;
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function hideStart(cntrl){
     var cPanel = document.getElementById(cntrl);
     
     if (cPanel != null)
     {
        cPanel.style.display = 'none';
     }
}

function showStart(cntrl){
     var cPanel = document.getElementById(cntrl);
     cPanel.style.display = 'block';
}

// Create overlay divs, taken from lightbox
//function initOverlay(){
//	var objBody = document.getElementsByTagName("body").item(0);
//	
//	var objOverlay = document.createElement("div");
//	objOverlay.setAttribute('id','applyOverlay');
//	objOverlay.style.display = 'none';
//	objBody.appendChild(objOverlay);
//	
//	var objApp = document.createElement("div");
//	objApp.setAttribute('id','applyDiv');
//	objApp.style.display = 'none';
//	objBody.appendChild(objApp);
//	
//	objApp.appendChild(document.getElementById('divCL'));
//	objApp.appendChild(document.getElementById('divCV'));
//	
//	// stretch overlay to fill page
//	var arrayPageSize = getPageSize();
//	var ov = document.getElementById('applyOverlay');
//	ov.style.height = arrayPageSize[1] + "px";
//}

function getPageSize(){
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}

	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}

var xOff = 200, yOff = -0.2;
var yScroll;
var tipDiv;
var px = document.layers ? "" : "px";
var cvViewed = false;
var clViewed = false;


function SetMenu(id)
{
	var div=document.getElementById(id);
	div.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};

	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}
	
	var arrayPageSize2 = getPageSize();
	div.x = (arrayPageSize2[2] / 2) - xOff;
	div.y = yScroll;
	div.y -= (arrayPageSize2[3] * yOff);
	return div;
}

function moveMe()
{
	if (self.pageYOffset) {
	    yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
	    yScroll = document.documentElement.scrollTop;
    } else if (document.body) {// all other Explorers
	    yScroll = document.body.scrollTop;
	}
    
    var arrayPageSize2 = getPageSize();
   	tipDiv.y += (yScroll - (arrayPageSize2[3] * yOff) - tipDiv.y)/10;
	tipDiv.sP(tipDiv.x, tipDiv.y);
	setTimeout("moveMe()", 10);
}

Event.observe(window, 'load', function(){
    if ($('ttFullTime1') != null && $('ttFullTime2') != null) {
        $('ttFullTime1').observe('mouseover', function(){$('ttFullTime2').show();});
        $('ttFullTime1').observe('mouseout', function(){$('ttFullTime2').hide();});
        $('ttPartTime1').observe('mouseover', function(){$('ttPartTime2').show();});
        $('ttPartTime1').observe('mouseout', function(){$('ttPartTime2').hide();});
    }

    if ($('adcarousel') != null) {
        adCount = $('adcarousel').select('td').size();
        adDisplay = $('slide_inner').getWidth() / $('adcarousel').down('td').getWidth();
        currentAd=1;
        adWidth = $('adcarousel').down('td').getWidth();
        
        movingLeft = false;
        movingRight = false;
        
        function moveRight(){
            if (currentAd < adCount - adDisplay + 1 && movingRight==false){
                currentAd++;
                movingRight = true;
                adTable = $('slide_inner').down('table');
                new Effect.Move(adTable, { x: -adWidth, y: 0, duration:0.5, afterFinish:function(){movingRight=false;}, queue: {scope: 'carousel', position: 'end'}});
            }
        }
        
        function moveLeft(){
            if (currentAd > 1 && movingLeft==false){
                currentAd--;
                movingLeft = true;
                adTable = $('slide_inner').down('table');
                new Effect.Move(adTable, { x: adWidth, y: 0, duration:0.5, afterFinish:function(){movingLeft=false;}, queue: {scope: 'carousel', position: 'end'}});
            }
        }
        
        Event.observe($('adcarousel').down('a.next'), 'click', function(event){
            event.stop();
            moveRight();
        });
        Event.observe($('adcarousel').down('a.prev'), 'click', function(event){
            event.stop();
            moveLeft();
        });
        
        pe = new PeriodicalExecuter(function() {
            //alert("CurrentAd = " + currentAd + ", " + "AdCount=" + adCount);
            //alert(currentAd);
            if (currentAd >= adCount - adDisplay + 1){
                movingLeft = true;
                currentAd = 1;
                new Effect.Move(adTable, { x: (adWidth * (adCount-adDisplay)), y: 0, duration:0.5, afterFinish:function(){movingLeft=false;}, queue: {scope: 'carousel', position: 'end'}});
            } else {
                moveRight();
            }
        }, 5);
    }
});

//--><!]]>=======

