	 
function addLoadEvent(func) { 
	var oldonload = window.onload; 
	if (typeof window.onload != 'function') { 
		window.onload = func; 
	} else { 
		window.onload = function() { 
	      if (oldonload) { 
	        oldonload(); 
	      } 
	      func(); 
	    } 
	  } 
	} 
	 
	/* GETS SEVER TIME */
	addLoadEvent(LoadSlider);
	


function LoadSlider() {
	var SliderHTML;
	var textselect = document.getElementById("textsection-1").offsetHeight;
	
	SliderHTML = '<div id="slidertop"><img src="images/slider_top.png" onmouseover="scrollContent(\'textslider\',-1)" onmouseout="cancelScroll(\'textslider\')" /></div><div id="sliderbottom"><img src="images/slider_bottom.png"onmouseover="scrollContent(\'textslider\',1)" onmouseout="cancelScroll(\'textslider\')" /></div>';
	
	if (textselect > 220) {
		document.getElementById("slidebar").innerHTML = SliderHTML;
		document.getElementById("slidebar").style.backgroundImage = "url(images/slider_bg.png)";
	} else {
		document.getElementById("slidebar").innerHTML = "";
		document.getElementById("slidebar").style.background = "none";
	}
}

function SwitchImg(ImgSrc) {
	var ImgSrc = ImgSrc.replace(/_thumb/,'');
	var MainImg = document.getElementById("MainImg");
	MainImg.src = ImgSrc;
	
}
