	function GetTopLeft(elm) {
		var x, y = 0;
		x = elm.offsetLeft;
		y = elm.offsetTop;
		elm = elm.offsetParent;
		while(elm != null) {
			x = parseInt(x) + parseInt(elm.offsetLeft);
			y = parseInt(y) + parseInt(elm.offsetTop);
			elm = elm.offsetParent;
		}
		return {Top:y, Left: x};
	}

	function blurbPic () {
		var BI = document.getElementById('burnerImage');
		var slideXY = GetTopLeft(BI);
		document.getElementById('blurb').style.top = slideXY.Top - 70 + 'px';
		document.getElementById('blurb').style.left = slideXY.Left - 130 + 'px';
	}

	function blurbBlurb () {
		var BI = document.getElementById('blurb1');
		var slideXY = GetTopLeft(BI);
		document.getElementById('blurb2').style.top = slideXY.Top + 'px';
		document.getElementById('blurb2').style.left = slideXY.Left - 130 + 'px';
	}


	function expandBox (bNum) {
		var theTextBox = document.getElementById("expanderText"+bNum);
		if (theTextBox.style.display == "none") {
			if (bNum == 1) {
				displayBox (2, false);
				displayBox (1, true);
			} else {
				displayBox (1, false);
				displayBox (2, true);
			}
		} else {
			displayBox (bNum, false);
		}
	}

	function expandBox2 (bNum) {
		var theTextBox = document.getElementById("expanderText"+bNum);
		if (theTextBox.style.display == "none") {
			for (c=1;c<=5;c++) {
				if (c != bNum) {
					displayBox (c, false);
				}
			}
			displayBox (bNum, true);
		} else {
			displayBox (bNum, false);
		}
	}


	function displayBox (bNum, onFlag) {
		var theTextBox = document.getElementById("expanderText"+bNum);
		var theSmallbox = document.getElementById("expander"+bNum);
		var theRightBox = document.getElementById("expanderRight"+bNum);

		if (onFlag) {
			theSmallbox.src = "/images/style/minus_box.gif";
			theSmallbox.alt = "Click to collapse";
			theSmallbox.title = "Click to collapse";
			theTextBox.style.display = 'inline';
			theRightBox.style.display = 'inline';
		} else {
			theSmallbox.src = "/images/style/plus_box.gif";
			theSmallbox.alt = "Click to expand";
			theSmallbox.title = "Click to expand";
			theTextBox.style.display = 'none';
			theRightBox.style.display = 'none';
		}
	}

var browserName;
var majorVersion;

$(document).ready(function() {        

var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
browserName  = navigator.appName;
var fullVersion  = ''+parseFloat(navigator.appVersion); 
majorVersion = parseInt(navigator.appVersion,10);
var nameOffset,verOffset,ix;

// In MSIE, the true version is after "MSIE" in userAgent
if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
 browserName = "Microsoft Internet Explorer";
 fullVersion = nAgt.substring(verOffset+5);
}
// In Opera, the true version is after "Opera" 
else if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
 browserName = "Opera";
 fullVersion = nAgt.substring(verOffset+6);
}
// In Chrome, the true version is after "Chrome" 
else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
 browserName = "Chrome";
 fullVersion = nAgt.substring(verOffset+7);
}
// In Safari, the true version is after "Safari" 
else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
 browserName = "Safari";
 fullVersion = nAgt.substring(verOffset+7);
}
// In Firefox, the true version is after "Firefox" 
else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
 browserName = "Firefox";
 fullVersion = nAgt.substring(verOffset+8);
}
// In most other browsers, "name/version" is at the end of userAgent 
else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) < (verOffset=nAgt.lastIndexOf('/')) ) 
{
 browserName = nAgt.substring(nameOffset,verOffset);
 fullVersion = nAgt.substring(verOffset+1);
 if (browserName.toLowerCase()==browserName.toUpperCase()) {
  browserName = navigator.appName;
 }
}
// trim the fullVersion string at semicolon/space if present
if ((ix=fullVersion.indexOf(";"))!=-1) fullVersion=fullVersion.substring(0,ix);
if ((ix=fullVersion.indexOf(" "))!=-1) fullVersion=fullVersion.substring(0,ix);

majorVersion = parseInt(''+fullVersion,10);
if (isNaN(majorVersion)) {
 fullVersion  = ''+parseFloat(navigator.appVersion); 
 majorVersion = parseInt(navigator.appVersion,10);
}

//document.write('Browser name  = '+browserName+'<br>');
//document.write('Full version  = '+fullVersion+'<br>');
//document.write('Major version = '+majorVersion+'<br>');
//document.write('navigator.appName = '+navigator.appName+'<br>');
//document.write('navigator.userAgent = '+navigator.userAgent+'<br>');

	function browserInfo () {
		document.getElementById("browser_javascript_enabled").value='yes';
		document.getElementById("browser_name").value=browserName;
		document.getElementById("browser_full_version").value=fullVersion;
		document.getElementById("browser_major_version").value=majorVersion;
		document.getElementById("browser_user_agent").value=navigator.userAgent;
	}

	//Initialize the accordion
	accordionGo();

	//Initialize the content boxes
	contentGo();

	$('.content_box').click(function () {
		var bID = (this).id;
		$('#' + bID + '_content').fadeIn(1000);
		$('#' + bID + '_box_close').fadeIn(1000);
	});
	$('.content_box_close').click(function () {
		var bID = (this).id.replace('_box_close','');
		$('#' + bID + '_content').fadeOut(500);
		$('#' + bID + '_box_close').fadeOut(500);
	});

	//Execute the slideShow  
	slideShow();

	//Page Content Minimum Height
	pageContentHeight();

  
});  


function pageContentHeight () {
	if (!document.getElementById('pageContent')) {
		return;
	}
	var myContent = document.getElementById('pageContent');
	if (myContent.offsetHeight < 400) {
		myContent.style.height = '400px';
	}
}

function contentGo() {
	if (!document.getElementById('content_bar')) {
		return;
	}
	//Position content bar boxes
	var c=0;
	cTop = parseInt(document.getElementById('b1').offsetTop);
	cLeft = parseInt(document.getElementById('b1').offsetLeft);
	if ((browserName == 'Microsoft Internet Explorer') && (majorVersion == 8)) {
		cTop -= 10;
		cLeft -= 10;
	}
	for (c=1;c<=4;c++) {
		var myCon = document.getElementById('b'+c+'_content');
		var myBut = document.getElementById('b'+c+'_box_close');
		myCon.style.top = cTop + 'px';
		myCon.style.left = cLeft + 1 +  'px';
		myCon.style.zIndex = 520 + c;
		myBut.style.top = '131px';
		myBut.style.left = cLeft + 940 +  'px';
		myBut.style.zIndex = 550 + c;
		myBut.style.margin='0';
		myBut.style.padding='0';
		myBut.style.border='none';
		myBut.style.background='none';
		myBut.style.float='none';
	}
}


var aTop;
var aLeft;
function accordionGo() {
	if (!document.getElementById('accordion')) {
		return;
	}
	//Position accordion images
	var c=0;
	aTop = parseInt(document.getElementById('accordion').offsetTop);
	aLeft = parseInt(document.getElementById('accordion').offsetLeft);
	if ((browserName == 'Microsoft Internet Explorer') && (majorVersion == 8)) {
		aTop -= 10;
		aLeft -= 10;
	}
	//alert(browserName);
	for (c=1;c<=3;c++) {
		var myAcc = document.getElementById('acc'+c);
		myAcc.style.top = aTop + 1 + 'px';
		myAcc.style.left = ((c-1)*26) + 'px';
		myAcc.style.clip='rect(0px, 929px, 250px, 0px)';
		myAcc.style.zIndex = 120 + c;
		myAcc.style.display='inline';
	}
}

var theAccordion = new Array();
var theAccordionLeft = new Array();;
theAccordionLeft[1] = 0;
theAccordionLeft[2] = 0;
theAccordionLeft[3] = 0;
var accOffset = new Array();
accOffset[1] = 0;
accOffset[2] = 0;
accOffset[3] = 0;
var accDiff = new Array();
var accDirection = new Array();
accDirection[1] = 1;
accDirection[2] = 1;
accDirection[3] = 1;
var accClip;

function moveAccordion(aNumber) {
	theAccordion[1] = document.getElementById('acc1');
	theAccordion[2] = document.getElementById('acc2');
	theAccordion[3] = document.getElementById('acc3');
	if (aNumber == 1) {
		if ((accDirection[2] == 1)&(accDirection[3] == 1)) {
			accPlay(3, 0);
			accPlay(2, 0);
		} else if ((accDirection[2] == 0)&(accDirection[3] == 0)) {
			accPlay(2, 1);
			accPlay(3, 1);
		} else if ((accDirection[2] == 1)&(accDirection[3] == 0)) {
			accPlay(2, 0);
		}
	} else if (aNumber == 2) {
		if (accDirection[2] == 1) {
			if (accDirection[3] == 1) {
				accPlay(3, 0);
			} else if (accDirection[3] == 0) {
				accPlay(3, 1);
			}
		} else {
				accPlay(2, 1);
		}
	} else if (aNumber == 3) {
		if (accDirection[3] == 1) {
			accPlay(3, 0);
		} else {
			if (accDirection[2] == 0) {
				accPlay(2, 1);
			}
			accPlay(3, 1);
		}
	}
}
function accPlay(aNum, aDir) {
	accDirection[aNum] = aDir;
	accDiff[aNum] = 1;
	accOffset[aNum] = 0;
	theAccordionLeft[aNum] = theAccordion[aNum].offsetLeft;
	t=setTimeout("accordionPlay("+aNum+","+aDir+")",10);
}
function accordionPlay(aNum, aDir) {
	if (aDir == 0) {
		if (accOffset[aNum] < 900) {
			accDiff[aNum]+=accDiff[aNum];
			accOffset[aNum]+=accDiff[aNum];
			theAccordion[aNum].style.left = theAccordionLeft[aNum] + accOffset[aNum] + 'px';
			accClip = 'rect(0px, ' + parseInt(929 - accOffset[aNum]) + 'px, 250px, 0px)';
			theAccordion[aNum].style.clip=accClip;
			t=setTimeout("accordionPlay("+aNum+","+aDir+")",10);
		} else {
			theAccordion[aNum].style.left = 884 + (aNum*24) + 'px';
			theAccordion[aNum].style.clip='rect(0px, 25px, 250px, 0px)';
		}
	} else {
		if (accOffset[aNum] < 900) {
			accDiff[aNum]+=accDiff[aNum];
			accOffset[aNum]+=accDiff[aNum];
			theAccordion[aNum].style.left = theAccordionLeft[aNum] - accOffset[aNum] + 'px';
			accClip = 'rect(0px, ' + parseInt(accOffset[aNum]) + 'px, 250px, 0px)';
			theAccordion[aNum].style.clip=accClip;
			t=setTimeout("accordionPlay("+aNum+","+aDir+")",10);
		} else {
			theAccordion[aNum].style.left = ((aNum-1)*26) + 'px';
			theAccordion[aNum].style.clip='rect(0px, 929px, 250px, 0px)';
		}
	}
	//document.getElementById('text_content_bar').innerHTML = accOffset[accNum] + ' ' + accClip;
}

function slideShow() {
	if (!document.getElementById('gallery')) {
		return;
	}

    //Set the opacity of all images to 0  
    $('#gallery a').css({opacity: 0.0});  
      
    //Get the first image and display it (set it to full opacity)  
    $('#gallery a:first').css({opacity: 1.0});  
      
    //Set the caption background to semi-transparent  
    $('#gallery .caption').css({opacity: 0.7});  
  
    //Resize the width of the caption according to the image width  
    $('#gallery .caption').css({width: $('#gallery a').find('img').css('width')});  
      
    //Get the caption of the first image from REL attribute and display it  
    $('#gallery .content').html($('#gallery a:first').find('img').attr('rel'))  
    .animate({opacity: 0.7}, 400);  
      
    //Call the gallery function to run the slideshow, 3000 = change to next image after 3 seconds  
    setInterval('gallery()',4000);  
      
}  
  
function gallery() {  
      
    //if no IMGs have the show class, grab the first image  
    var current = ($('#gallery a.show')?  $('#gallery a.show') : $('#gallery a:first'));  
  
    //Get next image, if it reached the end of the slideshow, rotate it back to the first image  
    var next = ((current.next().length) ? ((current.next().hasClass('caption'))? $('#gallery a:first') :current.next()) : $('#gallery a:first'));     
      
    //Get next image caption  
    var caption = next.find('img').attr('rel');   
      
    //Set the fade in effect for the next image, show class has higher z-index  
    next.css({opacity: 0.0})  
    .addClass('show')  
    .animate({opacity: 1.0}, 1000);  
  
    //Hide the current image  
    current.animate({opacity: 0.0}, 1000)  
    .removeClass('show');  
      
    //Set the opacity to 0 and height to 1px  
    //$('#gallery .caption').animate({opacity: 0.0}, { queue:false, duration:0 }).animate({height: '1px'}, { queue:true, duration:300 });   
      
    //Animate the caption, opacity to 0.7 and height to 54px, a slide up effect  
    //$('#gallery .caption').animate({opacity: 0.7},100 ).animate({height: '54px'},500 );  
      
    //Display the content  
    //$('#gallery .content').html(caption);  
          
}

