function version(){

var browser=navigator.appName
var b_version=navigator.appVersion
var version=parseFloat(b_version)
var pass = true;


if(b_version.indexOf('MSIE 5.0')!=-1)
	pass = false;
return pass;
}


function shw(id,state){
detail = document.getElementById(id);


	detail.style.display=state;

//alert(detail.style.display)

}



function popup(img){

	theImage = document.getElementById(img)
	newWin = window.open('/popup.htm?image='+theImage.src,'register','width=30,height=50,scrollbars=no');
	
	var myX = (screen.width - 50) / 2;
	var myY = ((screen.height - 50) / 2) - 20;	
	newWin.moveTo(myX, myY); 
	
	return false;
}

function boxit(inputField,state){

	//remove / replace text in search box
	if(state==1){
		inputField.altvalue=inputField.value;
		inputField.value='';
		}
	else if (inputField.value==''){
		inputField.value=inputField.altvalue;
		}




}

function imageSwap(imgRef,src,text){

	//swaps thumbnails around
	
	img = document.getElementById(imgRef);
	img.alt = text;
	img.src = src;
	
	clearTimeout(slideshow)
	
	return false;
}


function slideShow(){

	slideIndex++
	if(slideArray[slideIndex]=='')
	slideIndex=0;
	img = document.getElementById(slideImage);
	img.src = slideArray[slideIndex];
	img.alt = slideTextArray[slideIndex];
	
	
	clearTimeout(slideshow)
	slideshow = setTimeout('slideShow()',3000);
	
}


    function toggelopen(){

	var b_version=navigator.appVersion
	var width = 155
	
	if(b_version.indexOf('Safari')!=-1)
		width = 180


        if(opened==false){

            resizeDivWidth.custom(0,width);//First Number is starting height, Second is ending height.

            opened=true;

        }else{

            resizeDivWidth.custom(width,0);//First Number is starting height, Second is ending height.

            opened=false;

        }    
	
	return false;
    }
    
var opened=false;

    window.onload = function() {

	
	if(version()){
		resizeDivWidth = new fx.Width('searchBox',{duration:500});
	}
	
	alpha()

    };
    
    
function alpha(){
	
	//dicks around with div positions to give proper alphas without the contents being alpha'd
	box = document.getElementById('colB');
	boxback = document.getElementById('colBalt')

	if(box && boxback){
				boxback.style.height = box.offsetHeight +'px';
	}
	
	box = document.getElementById('colA');
	boxback = document.getElementById('colAalt')
	if(box && boxback){
		
		boxback.style.height = box.offsetHeight +'px';
	}
}
    
    
    