
// Preload Navbar Rollover Images
preloadImage('assets/images/navbg_b.gif');
preloadImage('assets/images/navbg_right_b.gif');
preloadImage('assets/images/navbg_left_b.gif');


function changeImage(obj,src){ 
	obj.setAttribute('src',src); 
}

function preloadImage(src){
	if (document.images)
	{
		var image;
		image = new Image();
		image.src = src;
	}
}

function toggleTab(id,title) {
	//var title = document.getElementById('motiveTitle');
	title.className = (title.className != 'sectionTitleOff' ? 'sectionTitleOff' : 'sectionTitleOn');
	toggleDiv(id);
}

function toggleDiv(id) {
	var div = document.getElementById(id);
	div.className = (div.className != 'sectionOff' ? 'sectionOff' : 'sectionOn' );
}


function popUp(file) {
	var newWindow;
	newWindow = window.open(file,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=320,height=320');
	newWindow.focus();
}

function mapUp(file) {
	var newWindow;
	newWindow = window.open(file,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=400,height=480');
	newWindow.focus();
}

function imageUp(file) {
	var newWindow;
	newWindow = window.open(file,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=620,height=500');
	newWindow.focus();
}

function appUp(file) {
	var newWindow;
	newWindow = window.open(file,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=705,height=600');
	newWindow.focus();
}

function idxUp(file) {
	var newWindow;
	newWindow = window.open(file,'','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=750,height=600');
	newWindow.focus();
}


function image_scroller_clicked(info)
{
  var index = info.index;    
  var linkURL = info.linkURL;
  var thumbURL = info.thumbURL;
  var thumbWidth = info.thumbWidth;
  var thumbHeight = info.thumbHeight;
  
  imageUp(linkURL);
}
