function test() {
	jQuery('#test ul li').css({opacity: 0.0});
	jQuery('#test ul li:nth-child(1)').css({opacity: 1.0});
	setInterval('rotate_testimonials()',8000);
	
}

function rotate_testimonials() {	
	var current = (jQuery('#test ul li.show')?  jQuery('#test ul li.show') : jQuery('#test ul li:nth-child(2)'));
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? jQuery('div#test ul li:nth-child(2)') :current.next()) : jQuery('div#test ul li:nth-child(2)'));	
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
}

function gallery() {
	
	jQuery('#banner ul li').css({opacity: 0.0});
	jQuery('#banner ul li:first').css({opacity: 1.0});
	setInterval('rotate_galley()',4000);
	
}


/* Main Gallery */
function rotate_galley() {	
	var current = (jQuery('#banner ul li.show')?  jQuery('#banner ul li.show') : jQuery('#banner ul li:first'));
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? jQuery('div#banner ul li:first') :current.next()) : jQuery('div#banner ul li:first'));	
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
}





// getCheckedValue - does what it says on the tin //
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

// removeAtt
function removeAtt(id) {
 var current = document.getElementById(id);
 
 if(current !=null) {
	 current.removeAttribute("disabled");
 }
}

// switchbutton
function switchbutton(id, divid) {

 var current = document.getElementById(id)
   current.removeAttribute("disabled");

   if(current !=null) {

 var currentid = current.getAttribute('id');

 if(currentid == 'step3') {
	 current.removeAttribute('id');
	 current.setAttribute('id', 'step4');
 } else {
	 current.removeAttribute('id');
	 current.setAttribute('id', 'step3');
 }
 
  current.removeAttribute("disabled");
  }
		 
}

// switchbutton
function switchRow(id) {
 

	 var current = document.getElementById(id)
	 	 
	 if(current !=null) {
	
	 if(current.style.visibility == 'visible') {
		 current.style.visibility = 'hidden';
	 } else {
		 current.style.visibility = 'visible';
	 }
	 
	 }


}
