
window.onload = function()
{
	var oFCKeditor = new FCKeditor( 'fckeditor' ) ;
	oFCKeditor.BasePath = 'fckeditor/';
  oFCKeditor.ToolbarSet	= 'ASSU' ;
	oFCKeditor.ReplaceTextarea() ;
}

function setupSearchBox() {
	var searchBox = $("search");
	
  if (navigator.appName != "Microsoft Internet Explorer") {
  	searchBox.type = "search";
  	searchBox.setAttribute("placeholder", "Search ASSU");
  	searchBox.setAttribute("results", 0);
  }
  
	if (searchBox.type != "text") {
    searchBox.style.marginTop = '16px';
  	return;
	}
	
	searchBox.hasFocus = false;
	searchBox.style.backgroundImage = 'url(../images/search.jpg)';
	searchBox.style.paddingLeft = '20px';
	searchBox.value = searchBox.getAttribute("placeholder");
	searchBox.style.color = "gray";
	searchBox.onfocus = focusSearchBox;
	searchBox.onblur = defocusSearchBox;
	searchBox.style.marginBottom = "10px";
}

function focusSearchBox() {
	if (this.hasFocus)
		return;
  	
	this.hasFocus = true;
	this.value = "";
	this.style.color = "black";
}

function defocusSearchBox() {
	if (!this.hasFocus || this.value != "")
		return;
	
	this.hasFocus = false;
	this.value = this.getAttribute("placeholder");
	this.style.color = "gray";
}
