// -----------------------------------------------------------------------------------
// CheckAll()
// -----------------------------------------------------------------------------------
function CheckAll( myForm)
  {
	if( myForm)
		var c = myForm.ALL.checked;

	for ( var i = 0; i < myForm.elements.length; i++)
    {
		var e = myForm.elements[ i];
    if(( e.checked != c) && ( e.type == "checkbox"))
      e.checked = c;
	  }
  }

// -----------------------------------------------------------------------------------
// getXMLObject
// -----------------------------------------------------------------------------------
function getXMLObject()
  {
  var xmlHttp = null;
  // Mozilla, Opera, Safari sowie Internet Explorer 7
  if( typeof XMLHttpRequest != 'undefined' )
    xmlHttp = new XMLHttpRequest();
  if( ! xmlHttp )
    {
    // Internet Explorer 6 und älter
    try
      {
      xmlHttp = new ActiveXObject( "Msxml2.XMLHTTP" );
      }
    catch(e)
      {
      try
        {
        xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch(e)
        {
        xmlHttp  = null;
        }
      }
    }
  return xmlHttp;
  }

// -----------------------------------------------------------------------------------
// mailAddress
// -----------------------------------------------------------------------------------
function mailAddress( pt1, pt2, pt3 )
  {
  document.write( '<a href="mailto:'+pt1+'@'+pt2+'.'+pt3+'" onfocus="blur();">' + pt1 + '@' + pt2 + '.' + pt3 + '</a>' );
  }

// -----------------------------------------------------------------------------------
// mailAddress
// -----------------------------------------------------------------------------------
function telNr( pt1, pt2, pt3 )
  {
  document.write( pt1 + pt2 + pt3 );
  }

// -----------------------------------------------------------------------------------
// rejectContact
// -----------------------------------------------------------------------------------
function rejectContact( lng, username, con_id )
  {
  if( ! lng )
    lng = 'de';

  var msg = 'Möchtest du die Kontaktanfrage von ' + username + ' wirklich ablehnen?';
  if( lng == 'en' )
    msg = 'Do you really want to reject ' + username + '´s contact request?';

  if( confirm( msg ) )
    self.location.href='/user/?cmd=show_welcome&subcmd=reject_contact&con_id=' + con_id;
  }