/**********************************************************************************   NewsMenu *   Copyright (C) 2001 <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a>*   This script was released at DHTMLCentral.com*   Visit for more great scripts!*   This may be used and changed freely as long as this msg is intact!*   We will also appreciate any links you could give us.**   Made by <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a> *********************************************************************************///////////////////////////// Credits for the browsercheck are listed above// Rest of the page was Written by Dylan Oster 11/6/01///////////////////////////////////////////////////// Browsercheck (needed)/////////////////////////function lib_bwcheck () { 	this.ver=navigator.appVersion	this.agent=navigator.userAgent.toLowerCase()	this.dom=document.getElementById?true:false;	this.op=(this.agent.indexOf("opera")>-1 && window.opera)?true:false;	this.op5=(this.agent.indexOf("opera 5")>-1 && window.opera)?true:false;	this.op6=(this.agent.indexOf("opera 6")>-1 && window.opera)?true:false;	this.op7=(this.agent.indexOf("opera 7")>-1 && window.opera)?true:false;  	this.ie5=(this.agent.indexOf("msie 5")>-1 && !this.op5 && !this.op6 && !this.op7)?true:false;  	this.ie55=(this.ie5 && this.agent.indexOf("msie 5.5")>-1)?true:false;  	this.ie6=(this.agent.indexOf("msie 6")>-1 && !this.op5 && !this.op6 && !this.op7)?true:false;  	this.ie7=(this.agent.indexOf("msie 7")>-1 && !this.op5 && !this.op6 && !this.op7)?true:false;  	this.ie8=(this.agent.indexOf("msie 8")>-1 && !this.op5 && !this.op6 && !this.op7)?true:false;  	this.ie=(this.ie4 || this.ie5 || this.ie6 || this.ie7 || this.ie8)?true:false;	this.mac=(this.agent.indexOf("mac")>-1)?true:false;	this.sa=(this.agent.indexOf("safari")>-1)?true:false;	this.ff=(this.agent.indexOf("firefox")>-1)?true:false;	this.ff15=(this.agent.indexOf("firefox/1.5")>-1)?true:false;	this.ff2=(this.agent.indexOf("firefox/2.0")>-1)?true:false;	this.ff3=(this.agent.indexOf("firefox/3.0")>-1)?true:false;	this.ns6=(this.agent.indexOf("gecko")>-1 &&!this.sa  || window.sidebar)?true:false;	this.ns4=(!this.dom && document.layers)?true:false;	this.bw=(this.ie8 || this.ie7 || this.ie6 || this.ie5 || this.ns4 || this.ns6 || this.op5 || this.op6)	return this}var bw=new lib_bwcheck()//////////////////////////////////// Calendar popup that uses the OverLib class to choose a date//////////////////////////////////// Date variablesvar monthName = new Array("","January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");var monthDays = new Array(0,31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);var week = new Array("Su", "Mo", "Tu", "We", "Th", "Fr", "Sa");var today = new Date();var disMonth = today.getMonth()+1;var year = today.getFullYear();var day = today.getDay();var dayN = today.getDate();var days = monthDays[disMonth];if (year%4 == 0 && disMonth == 2) days = 29;function getDays() {	if ((year%4 == 0) && (disMonth == 2))		d = 29;	else		d = monthDays[disMonth];	return d;}// The OverLib class can't accept functions with arguments the following two classes work around that issuefunction drawListEndDate() {	return drawCalendar("end_date");}function drawListStartDate() {	return drawCalendar("start_date");}function drawBusLicDate0() {	return drawCalendar("bus_lic_date[0]");}function drawBusLicDate1() {	return drawCalendar("bus_lic_date[1]");}function drawLicDate0() {	return drawCalendar("lic_date[0]");}function drawLicDate1() {	return drawCalendar("lic_date[1]");}function drawLicDate2() {	return drawCalendar("lic_date[2]");}function drawOpenDate1() {	return drawCalendar("open_1_date");}function drawOpenDate2() {	return drawCalendar("open_2_date");}// Used as the template for display in the OverLib classfunction drawCalendar(input) {	txt='<table border="0" cellpadding="0" cellspacing="0" width="139">';	txt+='<tr>';	txt+='	<td class="popcalmonth">';	txt+='	<table border="0" cellpadding="0" cellspacing="0" width="139">';	txt+='	<tr>';	txt+='		<td width="12"><a href="javascript:changeMonth(-1,\''+input+'\');"><img src="/resources/img/buttons/white-uparrow.gif" border="0" /></a></td>';	txt+='		<td width="115" style="text-align: center;"><div id="monthDiv">'+loadMonth()+'</div></td>';	txt+='		<td width="12"><a href="javascript:changeMonth(1,\''+input+'\');"><img src="/resources/img/buttons/white-downarrow.gif" border="0" /></a></td>';	txt+='	</tr>';	txt+='	</table>';	txt+='	</td>';	txt+='</tr>';		txt+='<tr>';	txt+='	<td><div id="daysDiv">'+loadDays(input)+'</div></td>';	txt+='</tr></table>';	return txt;}// Loads the current month and year along the top of drawCalendar functionfunction loadMonth () {	return monthName[disMonth] + '  ' + year;}// Loads the current days in the drawCalendar functionfunction loadDays (input) {	firstOfMonth = new Date (year,(disMonth-1),1);	firstDay = firstOfMonth.getDay();	txt='<table cellspacing="0" class="popcaldays">';	txt+='<tr>';	for (var i=0; i<7; i++) {		txt+='<td class="weekday">' + week[i] + '</td>';	}	txt+='</tr>';	var jumped = 0;	var inserted = 1;	var start = firstDay;	if (start < 0) start += 7;	var weeks = parseInt((start + days)/7);	if ((start + days)%7 != 0) weeks++;	for (var i=weeks; i>0; i--) {	  txt+='<tr>';	  for (var j=7; j>0; j--) {	    // Build onClick for calendar		if (inserted<10)			clickDay='0'+inserted;		else			clickDay=inserted;		if (disMonth<10)			clickMonth='0'+disMonth;		else			clickMonth=disMonth;		clickDate=' id="c'+inserted+'" onClick="changeInputDate(\''+input+'\',\''+clickDay+'\',\''+clickMonth+'\','+year+'); cClick();" onMouseOver="showHand(\'c'+inserted+'\');"';			    if (jumped<start) {	      txt+='<td></td>';	      jumped++;		} else if (inserted>days) {		  txt+='<td></td>';	      jumped++;		} else {		  txt+='<td class="day"'+clickDate+'>' + inserted + '</td>';	      inserted++;	    }	  }	  txt+='</tr>';	}	txt+='</table>';		return txt;}// Used for the up and down arrows next to calendar month and yearfunction changeMonth(monthChange,input) {	disMonth += monthChange;	if (disMonth > 12) {		disMonth -= 12;		year += 1;	} else if (disMonth <= 0) {		disMonth += 12;		year -= 1;	}	newMonth=loadMonth();	days = getDays();	newDays=loadDays(input);	document.getElementById('monthDiv').innerHTML=newMonth;	document.getElementById('daysDiv').innerHTML=newDays;}// Gets the day/month/year indexes as well as the days in monthfunction changeInputDate(input,day,month,year) {	obj = eval("document.getElementById('" + input + "')");	obj.value = month + "/" + day + "/" + year;}function popupWin(sUrl, target, w, h, scrollable) {	x = Math.floor((screen.width - w) / 2);	y = Math.floor((screen.height - h) / 2); 		winContent = window.open(sUrl, target, "top="+y+",left="+x+",height="+h+",width="+w+",resizable=yes,menubar=no,toolbar=no,location=no");	winContent.focus();	return true;}//////////////////////////////////// returns the inner width of the browser window, outer width can't be used// because of AOL and the Netscape 6 toolbar. Add around 15 to 20 pixels to compensate// for outer width//////////////////////////////////function getWindowWidth () {	if (bw.ie) {		return document.body.offsetWidth;	} else {                                                		return window.innerWidth;	}}function getWindowHeight () {	var windowHeight = 0;	if (typeof(window.innerHeight) == 'number') {		windowHeight = window.innerHeight;	} else {		if (document.documentElement && document.documentElement.clientHeight) {			windowHeight = document.documentElement.clientHeight;		} else {			if (document.body && document.body.clientHeight) {				windowHeight = document.body.clientHeight;			}		}	}	return windowHeight;}function setFooter () {	if (document.getElementById) {		var windowHeight = getWindowHeight();		if (windowHeight > 0) {			// Get page height			var contentHeight = document.getElementById('page').offsetHeight;			// Get header and leftnav height			var headerHeight = document.getElementById('header').offsetHeight;			var leftHeight = document.getElementById('mainl').offsetHeight;						var footerElement = document.getElementById('footer');			var footerHeight  = footerElement.offsetHeight;						// Get the greater value between page and leftnav height 			if (windowHeight - (contentHeight + footerHeight) >= 0 && (headerHeight+leftHeight) - windowHeight < 0) {				footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';			} else if ((headerHeight+leftHeight) - windowHeight >= 0 && footerHeight < windowHeight && contentHeight < windowHeight) {				footerElement.style.top = ((headerHeight+leftHeight) - (footerHeight + contentHeight)) + 'px';				document.getElementById('leftbg').style.height = (headerHeight+ leftHeight) + 'px';			} else {				footerElement.style.top = '0px';				document.getElementById('leftbg').style.height = (contentHeight + footerHeight) + 'px';			}					}	}}////////////////////////////// Tab functions////////////////////////////function overNav (id) {	if( id != document.body.className ) {		// Main tab		document.getElementById(id).style.backgroundImage = "url('/resources/img/tab-mouseover-left.gif')";		document.getElementById(id).childNodes[0].style.backgroundImage = "url('/resources/img/tab-mouseover-right.gif')";	}}function outNav (id) {	if( id != document.body.className ) {		// Main tab		document.getElementById(id).style.backgroundImage = "url('/resources/img/tab-unfocus-left.gif')";		document.getElementById(id).childNodes[0].style.backgroundImage = "url('/resources/img/tab-unfocus-right.gif')";	}}function getObjectStyle (obj) {	if ((bw.dom) && (!bw.ie)) {		return eval("document.getElementById('" + obj + "').style");	} else if (bw.ie) {		return eval("document.all." + obj + ".style");	}}function showObj (obj) {	var theObj = getObjectStyle(obj);	theObj.display = 'block';	theObj.visibility = 'visible';}function hideObj (obj) {	var theObj = getObjectStyle(obj);	theObj.display = 'none';	theObj.visibility = 'hidden';}////////////////////////////////// Show hand////////////////////////////////function showHand(obj) {	var theObj = getObjectStyle(obj);	theObj.cursor = 'pointer';}////////////////////////////////// Thumbnail Navigator/////////////////////////////////**********************************************************************************   SideScrollMenu *   Copyright (C) 2001 <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a>*   This script was released at DHTMLCentral.com*   Visit for more great scripts!*   This may be used and changed freely as long as this msg is intact!*   We will also appreciate any links you could give us.**   Made by <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a>  and modified by Michael van Ouwerkerk*********************************************************************************//**************************************************************************Scrolling functions***************************************************************************/function mLeft(){	if (!noScroll && oMenu.x<sArrowwidth){		oMenu.moveBy(sScrollPx,0)		tim = setTimeout("mLeft()",sScrollspeed)	}	showObj('divArrowRight');	if (!noScroll && oMenu.x>=sArrowwidth){		hideObj('divArrowLeft');	} else {		showObj('divArrowLeft');	}}function mRight(){	if (!noScroll && oMenu.x>-(oMenu.scrollWidth-(pageWidth))){		oMenu.moveBy(-sScrollPx,0)		tim = setTimeout("mRight()",sScrollspeed)	}	showObj('divArrowLeft');	if (!noScroll && oMenu.x<=-(oMenu.scrollWidth-(pageWidth))){		hideObj('divArrowRight');	} else {		showObj('divArrowRight');	}}function noMove(){	clearTimeout(tim);	noScroll = true;	sScrollPx = sScrollPxOriginal;}/**************************************************************************Object part***************************************************************************/function makeObj(obj,nest,menu){	nest = (!nest) ? "":'document.'+nest+'.';	this.elm = bw.ns4?eval(nest+"document.layers." +obj):bw.ie4?document.all[obj]:document.getElementById(obj);   	this.css = bw.ns4?this.elm:this.elm.style;	this.scrollWidth = bw.ns4?this.css.document.width:this.elm.offsetWidth;	this.x = bw.ns4?this.css.left:this.elm.offsetLeft;	this.y = bw.ns4?this.css.top:this.elm.offsetTop;	this.moveBy = b_moveBy;	this.moveIt = b_moveIt;	this.clipTo = b_clipTo;	return this;}function b_moveIt(x,y){	if (x!=null){this.x=x; this.css.left=this.x+px;}	if (y!=null){this.y=y; this.css.top=this.y+px;}}function b_moveBy(x,y){this.x=this.x+x; this.y=this.y+y; this.css.left=this.x+px; this.css.top=this.y+px;}function b_clipTo(t,r,b,l){	if(bw.ns4){this.css.clip.top=t; this.css.clip.right=r; this.css.clip.bottom=b; this.css.clip.left=l;}	else this.css.clip="rect("+t+"px "+r+"px "+b+"px "+l+"px)";}/**************************************************************************Object part end***************************************************************************//**************************************************************************Init function. Set the placements of the objects here.***************************************************************************/function sideInit(){// Get table width to see if arrows are needed	//Making the objects...	oBg = new makeObj('divBg')	oMenu = new makeObj('divMenu','divBg',1)	oArrowRight = new makeObj('divArrowRight','divBg')		//Placing the menucontainer, the layer with links, and the right arrow.	oMenu.moveIt(sArrowwidth,null)	oArrowRight.css.width = sArrowwidth;		//Setting the width and the visible area of the links.	if (!bw.ns4) oBg.css.overflow = "hidden";	// Disabled because of Firefox 1.5 & 2	if (bw.ns6 && !bw.ff15 &!bw.ff2 &!bw.ff3) oMenu.css.position = "relative";	oBg.css.width = pageWidth+px;	oBg.clipTo(0,pageWidth+4,sMenuheight,0);	oBg.css.borderColor = "#a9a9a9";	oBg.css.borderWidth = "1px";	oBg.css.borderStyle = "solid";	oBg.css.visibility = "visible";		// Get table width to see if arrows are needed	tWidth = document.getElementById('divMenu').offsetWidth;	if(tWidth > pageWidth) {		showObj('divArrowRight');	}}function swapImage(newImg, mpeg, key, type) {	document.getElementById('imageMain').src     = newImg;	if(mpeg != 0) {		document.getElementById('hrefMain').href         = 'javascript:popupWin("/sitetools/video.php?listing_vid='+mpeg+'&listing_key='+key+'", "video","405","390");void(null);';		document.getElementById('hrefMain').style.cursor = 'pointer';	} else {		document.getElementById('hrefMain').href         = 'javascript:void(null);';		document.getElementById('hrefMain').style.cursor = 'default';	}}