
/* === headv3_10_misc.js === */

/**
 * set value of both fields to "", but only once (at first click)
 */
function clear_input_field_once(id1, id2)
{
  if (!$(id1).initialized)
  {
    $(id1).value = '';
    $(id2).value = '';
    $(id1).initialized = true;
  }
}

/**
 * set value of this fields to "", but only once (at first click)
 */
function clear_input_field_this(tag)
{
  if (!tag.initialized)
  {
    tag.value = '';
    tag.initialized = true;
  }
}

/**
 * called onclick by an <a>-tag
 */
function log_click(ele, urlo_id, obje_id)
{
  if (!obje_id)
  {
    obje_id=current_object_id;
  }
  //new Request({method: 'get', url: config_urlbase + encodeURIComponent(ele.href.replace(/\//g, String.fromCharCode(0x2044)).replace(/_/g, '__')) + '/external/none/cns-cut_urls-i-mode'}).send();
  //new Request({method: 'get', url: config_urlbase + 'external/none/cns-i-mode?url=' + encodeURIComponent(ele.href) + '&uid=' + urlo_id + '&oid=' + obje_id}).send();
  
  $.ajax({
    url: config_urlbase + 'external/none/cns-i-mode?url=' + encodeURIComponent(ele.href) + '&uid=' + urlo_id + '&oid=' + obje_id
  });
  
  return false;
}

/*
function scroll_to_a_name_standard(myName)
{
	mya = $$("a[name="+ myName +"]");
	if (mya.length > 0)
	{
		position = mya[0].getPosition().y - 110;
		window.scrollTo(0, position);
	}
}
*/

/*
function switch_multiple_authors_to(active,cssclass)
{
	$$("." + cssclass).each(function(ele){
		ele.setStyle("display", "none");
	});
	$(active).setStyle("display", "block");
}
*/


