//used on the photo gallery page
function switchgalleryphoto(newphoto){
	document.getElementById('mainphoto').setAttribute("src",newphoto);
}
/************************************************************************/
$(function(){
	// dropdown menu

	$("ul.sf-menu").supersubs({ 
		animation     : {opacity:"show",height:"show"}
        ,delay        : 80
        ,speed        : "normal"
        ,oldJquery    : false  // set to true if using jQuery version below 1.2
        ,disableHI    : true   // set to true to disable hoverIntent detection
        ,autoArrows   : false  // disable generation of arrow mark-up 
		,minWidth:    12,   
		maxWidth:    27,    
		extraWidth:  1 
	}).superfish();	
	
	$('button, input:submit, .abutton').button();
	
	$("a[rel='colorbox']").colorbox({
		transition:"fade",
//		current: "{current} of {total}"
		current: ""
	});	
	
	// round corners
	$(".roundedcorner").corner();
});

//***********************************************************************************
function submitsearch(){ 
	document.searchform.submit();}
//***********************************************************************************
function loadpage(thepagename){
}
//***********************************************************************************
function getElementHeight(Elem) {
	if (ns4) {
		var elem = getObjNN4(document, Elem);
		return elem.clip.height;
	} else {
		if(document.getElementById) {
			var elem = document.getElementById(Elem);
		} else if (document.all){
			var elem = document.all[Elem];
		}
		if (op5) { 
			xPos = elem.style.pixelHeight;
		} else {
			xPos = elem.offsetHeight;
		}
		return xPos;
	} 
}
//*****************************************************************************************
String.prototype.trim = function() {
	return this.ltrim().rtrim();
};

String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}

String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}
//***********************************************************************************
