	function ap(text) {
				document.getElementById("bannerstatus").value = (text == "Stop") ? "Stop" : "Start";
				if (document.getElementById("rotatestatus").value=="out")
					rotate();
			}
			
			function change(index) {
				current = index;
				document.getElementById('bannerHome').style.background = 'url('+trim(preLoad[current])+') no-repeat';
				if (document.getElementById)  { 
					document.getElementById('change_b').href= Link[current];
					document.getElementById('change_c').setAttribute("className",side[current]);
					document.getElementById('change_c').setAttribute("class",side[current]);
					$("#change_a").html(Caption[current]);
				}
							
			}
			function rotate() {
				if (document.getElementById("bannerstatus").value == "Start") {
					current = (current == Picture.length-1) ? 1 : current+1;
					change(current);
					document.getElementById("rotatestatus").value="in";
					window.setTimeout("rotate()", rotate_delay);
				}
				else
				{
					document.getElementById("rotatestatus").value="out";
				}
			}
function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function ltrim(stringToTrim) {
	return stringToTrim.replace(/^\s+/,"");
}
function rtrim(stringToTrim) {
	return stringToTrim.replace(/\s+$/,"");
}
			
