﻿//SET SLIDE DIV DESCRIPTIONS BELOW
//Extend or contract array as needed

//Do not edit below here

iens6=document.all||document.getElementById
ns4=document.layers

<!--GLOBAL VARIABLES-->
var thename
var theobj
var thetext
var winHeight
var winPositionFromTop
var winWidth
var startH=5
var openTimer
var slidingup = 0
var count = 1
var slidecomplete=0;
<!--END GLOBAL VARIABLES-->

<!--GLOBAL FUNCTIONS-->

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function setObj(text,theswitch,inwidth,inheight,index) {
	thetext=text
	if(iens6){
		thename = "viewer"
		theobj=document.getElementById? document.getElementById(thename):document.all.thename
		winHeight=100
			if(iens6&&document.all) {
				winPositionFromTop=!window.opera? ietruebody().clientHeight : document.body.clientHeight
				winWidth=(ietruebody().clientWidth-ietruebody().leftMargin)
			}
			if(iens6&&!document.all) {
				winPositionFromTop=window.innerHeight
				winWidth=(window.innerWidth-(ietruebody().offsetLeft+30))
			}
			if(theswitch=="override") {
				winWidth=inwidth
				winHeight=inheight
			}
		theobj.style.width=winWidth+"px"
		theobj.style.height=startH+"px"
			if(iens6&&document.all) {
				theobj.style.top=ietruebody().scrollTop+winPositionFromTop+"px"
				//window.status=winPositionFromTop
				theobj.innerHTML =""
				theobj.insertAdjacentHTML("BeforeEnd","<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>")
			}
			if(iens6&&!document.all) {
				theobj.style.top=window.pageYOffset+winPositionFromTop+"px"
				theobj.innerHTML = ""
				theobj.innerHTML="<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>"
			}
	}
	if(ns4){
		thename = "nsviewer"
		theobj = eval("document."+thename)
		winPositionFromTop=window.innerHeight
		winWidth=window.innerWidth
		winHeight=100
			if(theswitch=="override") {
				winWidth=inwidth
				winHeight=inheight
			}
		theobj.moveTo(0,eval(window.pageYOffset+winPositionFromTop))
		theobj.width=winWidth
		theobj.clip.width=winWidth
		theobj.document.write("<table cellspacing=0 width="+winWidth+" height="+winHeight+" border=0><tr><td width=100% valign=top><font type='times' size='2' style='color:black;font-weight:normal'>"+thetext+"</font></td></tr></table>")
		theobj.document.close()
	}
	if (count<=1)
		viewIt(index)
}

function viewIt(index) {
	var tab="tab_"+index;
	if(startH<=winHeight) {
		count += 1;
		slidingup = 1;
		if(iens6) {
			theobj.style.visibility="visible"
				if(iens6 && document.getElementById) {
			
				//var X = document.getElementById("tab_1").offsetLeft;;
                //var Y = document.getElementById("tab_1").y;
				function getRealLeft(tab) {
					xPos = document.getElementById(tab).offsetLeft;
					tempEl = document.getElementById(tab).offsetParent;
					  while (tempEl != null) {
						  xPos += tempEl.offsetLeft;
						  tempEl = tempEl.offsetParent;
					  }
					return xPos;
				}
				
				function getRealTop(tab) {//
					yPos = document.getElementById(tab).offsetTop;
					tempEl = document.getElementById(tab).offsetParent;
					while (tempEl != null) {
						  yPos += tempEl.offsetTop;
						  tempEl = tempEl.offsetParent;
					  }
					return yPos;
				}

				var X=	getRealLeft(tab);
				var Y=  getRealTop(tab);
				//alert(X);
				//alert(Y);
				
					theobj.style.top=Y-startH+"px"
					theobj.style.left= X +"px"
				}
				
				
				if(iens6&&!document.getElementById) {
					theobj.style.top=(window.pageYOffset+winPositionFromTop)-startH+"px"
					
				}
			theobj.style.height=startH+"px"
			startH+=5
			openTimer=setTimeout("viewIt("+index+")",3)
		}
		if(ns4) {
			theobj.visibility = "visible"
			theobj.moveTo(0,(eval(window.pageYOffset+winPositionFromTop)-startH))
			theobj.height=startH
			theobj.clip.height=(startH)
			startH+=5
			openTimer=setTimeout("viewIt("+index+")",3)
		}
	}else{
		clearTimeout(openTimer)
		slidingup=0;
		slidecomplete=1;
	}
}

function stopIt() {
	count = 1;
	slidingup=0;
	slidecomplete=0;
	clearTimeout(openTimer)
	if(iens6) {
		theobj.innerHTML = ""
		theobj.style.visibility="hidden"
		startH=5
	}
	if(ns4) {
		theobj.document.write("")
		theobj.document.close()
		theobj.visibility="hidden"
		theobj.width=0
		theobj.height=0
		theobj.clip.width=0
		theobj.clip.height=0
		startH=5
	}
}

function slideup(index){
	if(slidecomplete==1){
		stopIt();
		for (i=1; i<=3; i++)
			tabrollOut(i);
	}
	if(slidingup==0){
		clearTimeout(openTimer);
		setObj(description[index],'override',286,105,index);
	}
	tabrollOver(index);
}

function slidedivrollover(index){
	slidingup=0; 
	tabrollOver(index);
}
function slidedivrollout(index){
	stopIt();
	tabrollOut(index);
}

function tabrollOver(index) {
	var obj = document.getElementById("tab_" + index);
	if (index == 1)
		obj.className='home_tab_feature_over';
	if (index == 2)
		obj.className='home_tab_event_over';
	if (index == 3)
		obj.className='home_tab_news_over';
}

function tabrollOut(index) {
	var obj = document.getElementById("tab_" + index);
	if (index == 1)
		obj.className='home_tab_feature';
	if (index == 2)
		obj.className='home_tab_event';
	if (index == 3)
		obj.className='home_tab_news';
}
<!--END GLOBAL FUNCTIONS-->

if (iens6){
document.write("<div id='viewer' style=visibility:hidden;position:absolute;left:0;width:0;height:0;z-index:1;overflow:hidden;border:0px ridge white'></div>")
}
if (ns4){
	hideobj = eval("document.nsviewer")
	hideobj.visibility="hidden"
}

function doPosition() {
	var obj = document.getElementById('home_tab_div');
	obj.style.top=document.getElementById('main_table').offsetTop + 589 + "px";
	obj.style.display="block";
}
