jQuery(document).ready(function(){
	if(document.getElementById("photos")) {
	  jQuery('#photos').css("display","inline");
		jQuery(function() {
			jQuery('#photos').cycle({
				delay: 2000,
				speed: 4000,
				before: onBefore
			});
			function onBefore() {
				jQuery('#caption').html(this.alt);
			}
		});
	}
//	if(document.getElementById("photobox")) {
//		if (prevID == imageID) {
//			jQuery('.prev_button').css("display","none");
//			jQuery('#footer_nav').css("padding-right","30px");
//		}
//		if (nextID == imageID) {
//			jQuery('.next_button').css("display","none");
//			jQuery('.prev_button').css("right","4px");
//			jQuery('#footer_nav').css("padding-right","30px");
//		}
//	}
});

//

function gId(idName) {
  return document.getElementById(idName);
}
function Position() {
	var viewWidth = 0, viewHeight = 0, iHeight = 0, baHeight = 0, iFrame = gId('image_frame'), baFrame = gId('container'); //browse_about_frame is now container
	if ( typeof ( window.innerWidth ) == 'number' ) {
	  //Non-IE
		viewWidth = window.innerWidth;
		viewHeight = window.innerHeight;
	} else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
		viewWidth = document.documentElement.clientWidth;
		viewHeight = document.documentElement.clientHeight;
	} else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
		viewWidth = document.body.clientWidth;
		viewHeight = document.body.clientHeight;
	}
	// Image
	if (iFrame != null) {
  	iHeight = (viewHeight-imageHeight)/2-40;
  	if ( iHeight < 10 ) { iHeight = 10; }
		iFrame.style.top=+ iHeight + 'px';
	}
	// Browse about frame is 689px
	if (baFrame != null) {
		baHeight = (viewHeight-baBoxHeight)/2-30;
		if ( baHeight < 10 ) { baHeight = 10; }
		baFrame.style.top=+ baHeight + 'px';
	}
}
window.onresize = Position;
jQuery.noConflict();

