// JavaScript Document
// Author: Mike T - Mindblossom Inc.
// Edited: Kelly K - Mindblossom Inc.
var x1, hm_x, wo_x1, wo_x2;
function detectVersion() {
    var browserName=navigator.appName; 
    var browserVer=parseInt(navigator.appVersion); 
    if (browserName=="Netscape") { 
        x1 = 158;
        hm_x = 155;
        wo_x1 = 160;
        wo_x2 = 160;
    }
    else 
    { 
        if (browserName=="Microsoft Internet Explorer") {
            x1 = 158;
            hm_x = 157;
            wo_x1 = 160;
            wo_x2 = 164;
        }
        else {
            x1 = 158;
            hm_x = 155;
            wo_x1 = 160;
            wo_x2 = 160;
        }
    }
}
function changeScrolling1() {
    scrolling1 = false;
}
function changeScrolling2() {
    scrolling2 = false;
}
var scrolling1, scrolling2
scrolling1 = false;
scrolling2 = false;
detectVersion();
//the following functions are used to scroll images left and right within the image scroller
function moveToPrevious(){
if (scrolling1) {
return;
}
scrolling1 = true;
  if(currentImage > 0)  {
	new Effect.Move('photo_scroll_inside', { x: x1, y: 0, transition: Effect.Transitions.sinoidal });
	currentImage--;
  }//if
    setTimeout("changeScrolling1()", 1000);
}//function
function moveToNext(){
if (scrolling1) {
return;
}
scrolling1 = true;
  if(currentImage < totalImages-viewSize)  {
	new Effect.Move('photo_scroll_inside', { x: -x1, y: 0, transition: Effect.Transitions.sinoidal });
	currentImage++;
  }//if
    setTimeout("changeScrolling1()", 1000);
}//function

//For Honour Members page
function hm_moveToPrevious(){
if (scrolling1) {
return;
}
scrolling1 = true;
  if(currentImage > 0)  {
	new Effect.Move('photo_scroll_inside_v2', { x: hm_x, y: 0, transition: Effect.Transitions.sinoidal });
	currentImage--;
  }//if
    setTimeout("changeScrolling1()", 1000);
}//function
function hm_moveToNext(){
if (scrolling1) {
return;
}
scrolling1 = true;
  if(currentImage < totalImages-viewSize)  {
	new Effect.Move('photo_scroll_inside_v2', { x: -hm_x, y: 0, transition: Effect.Transitions.sinoidal });
	currentImage++;
  }//if
    setTimeout("changeScrolling1()", 1000);
}//function


//For What's on page
function moveToPrevious01(){
if (scrolling1) {
return;
}
scrolling1 = true;
  if(currentImage01 > 0)  {
	new Effect.Move('photo_scroll_inside_01', { x: wo_x1, y: 0, transition: Effect.Transitions.sinoidal });
	currentImage01--;
  }//if
    setTimeout("changeScrolling1()", 1000);
}//function
function moveToNext01(){
if (scrolling1) {
return;
}
scrolling1 = true;
  if(currentImage01 < totalImages01-viewSize01)  {
	new Effect.Move('photo_scroll_inside_01', { x: -wo_x1, y: 0, transition: Effect.Transitions.sinoidal });
	currentImage01++;
  }//if
    setTimeout("changeScrolling1()", 1000);
}//function


function moveToPrevious02(){
if (scrolling2) {
return;
}
scrolling2 = true;
  if(currentImage02 > 0)  {
	new Effect.Move('photo_scroll_inside_02', { x: wo_x2, y: 0, transition: Effect.Transitions.sinoidal });
	currentImage02--;
  }//if
    setTimeout("changeScrolling2()", 1000);
}//function
function moveToNext02(){
if (scrolling2) {
return;
}
scrolling2 = true;
  if(currentImage02 < totalImages02-viewSize02)  {
	new Effect.Move('photo_scroll_inside_02', { x: -wo_x2, y: 0, transition: Effect.Transitions.sinoidal });
	currentImage02++;
  }//if
    setTimeout("changeScrolling2()", 1000);
}//function



<!--


function setMainNav(el){
	var obj = document.getElementById(el);
	if(obj != null){
		document.getElementById(el).className = el + '_on';
	}
}


// set down state for current about us navigation
// parameter is the id of the nav hyperlink
// we then append "_on" to the id to get the css class name
function setAboutNav(el){
	var obj = document.getElementById(el);
	if(obj != null){
		document.getElementById(el).className = el + '_on';
	}
}



//-->
