// JavaScript Document
function input_update_selector(obj) {
	Bluora.log('OLD FEATURE (input_update_selector) being used. Should use (Bluora.SELECTupdateRecordMovers)');
	Bluora.SELECTupdateRecordMovers(obj);
}

function input_change_selector(obj) {
	Bluora.log('OLD FEATURE (input_change_selector) being used. Should use (Bluora.INPUTupdateRecordMover)');
	Bluora.INPUTupdateRecordMover(obj);	
}

function input_highlight_activate(obj) {
	Bluora.log('OLD FEATURE (input_highlight_activate) being used. Should use (Bluora.INPUTactiviate)');
	Bluora.INPUTactiviate(obj);
}

function input_highlight_deactivate(obj) {
	Bluora.log('OLD FEATURE (Bluora.INPUTdeactiviate) being used.  Should use (Bluora.INPUTdeactiviate)');
	Bluora.INPUTdeactiviate(obj);
}

function loadingImageById(id, text) {
	Bluora.log('OLD FEATURE (loadingImageById) being used.');
	loadingImage(document.getElementById(id), text);
}

function loadingImage(object, text) {
	Bluora.log('OLD FEATURE (loadingImage) being used');
	changeHtmlContent(object, '<div align="center"><img src="'+WEBROOT_SITE+'_images/bwloader.gif"><br />'+text+'</div>');
}

function changeHtmlContentById(id, html) { 
	Bluora.log('OLD FEATURE (changeHtmlContentById) being used. Should use $().update');
	Element.update(id,html);
}

function changeHtmlContent(object, html) { 
	Bluora.log('OLD FEATURE (changeHtmlContent) being used.  Should use $().update');
	Element.update(object,html);
}

function changeSelectOptionsById(id, options_arrays) {
	Bluora.log('OLD FEATURE (changeSelectOptionsById('+id+')) being used');
	changeSelectOptions($(id), options_arrays);
}

function changeSelectOptions(object, options_arrays) { 
	Bluora.log('OLD FEATURE (changeSelectOptions) being used.  Should use $().update');
	object.update(options_arrays);
}

function changeTbodyContent(old_tbody, rows) {
	Bluora.log('OLD FEATURE (changeTbodyContent) being used');
	Bluora.TBODYupdate($(old_tbody),rows);
}

function changeTbodyContentLoadPage(old_tbody, content, number_of_columns, stylings) {
	Bluora.log('OLD FEATURE (changeTbodyContentLoadPage) being used');
	new_td = MochiKit.DOM.TD({'colspan':number_of_columns,'style':stylings}, '');
	Element.update(new_td, content);
	new_tr = MochiKit.DOM.TR(null, new_td);
	new_tbody = MochiKit.DOM.TBODY({'id': old_tbody}, new_tr);
	MochiKit.DOM.swapDOM(old_tbody, new_tbody);
}

function hidden_content_oc(hidden_content_id, content_changer_id, content_changer_text_open, content_changer_text_close, content_other) {
	Bluora.log('OLD FEATURE (hidden_content_oc) being used');
	var content_other_array = content_other.split(',');
	var content_other_size = content_other_array.length;
	var content_other_split;
	
	if ($(hidden_content_id).style.display == '') {
		content_other_split = Math.floor(100/content_other_size);
		Element.hide(hidden_content_id);
		Element.update(content_changer_id, 'add content');
		$(hidden_content_id).style.width = '0%';
	} else {
		content_other_split = Math.floor(100/(content_other_size+1));
		Element.show(hidden_content_id);
		Element.update(content_changer_id, 'close');
		$(hidden_content_id).style.width = content_other_split+'%';
	}
	
	content_other_array.each(
		 function(include) { $(include).style.width = content_other_split+'%'; }					 
	)
}

function changeFeedback(id, html) {
	Bluora.log('OLD FEATURE (changeFeedback) being used');
	if (html != '') {
		Element.show(id);
		Element.update($(id).cells[0], html);
	} else {
		Element.hide(id);
	}
}

function loadDocumentScript(libraryName) {
	Bluora.log('OLD FEATURE (loadDocumentScript) being used');
	Bluora.LoadDocument('script',Document);
}
function loadDocumentCss(Document) {
	Bluora.log('OLD FEATURE (loadDocumentCss) being used');
	Bluora.LoadDocument('css',Document);
}

function getFlashMovieObject(movieName)
{
	Bluora.log('OLD FEATURE (getFlashMovieObject) being used');
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}