function do_nothing()
{
}

function change(id)
{
  zeit = document.getElementById(id).value;
  document.getElementById("innerframe").src="changeredezeit.php?id=" + id + "&zeit=" + zeit;
  return;
}

function change2(id)
{
  zeit = document.getElementById(id).value;
  
  var idneu = id.substring(5); 
  document.getElementById("innerframe").src="changediskussionszeit.php?id=" + idneu + "&zeit=" + zeit;
  return;
}

function chnage_select_by_name (id,formname,selectname)
{
	docselect = eval("document."+formname+"."+selectname);
	
	document.getElementById("innerframe").src="changezusagestatus.php?id=" + id + "&value=" + docselect.value;
	return;
}

function change_symposium(symposiumid, feld, feldid)
{
	feldinhalt = document.getElementById(feldid).value;

	document.getElementById("innerframe").src="changesymposium.php?id=" + symposiumid + "&feld=" + feld  + "&inhalt=" + feldinhalt;
	return;
}

function change_symposium_postform (symposiumid, feld, feldid)
{
	var inputFormInhalt = document.createElement("INPUT");
	inputFormInhalt.type = "hidden";
	inputFormInhalt.value = document.getElementById(feldid).value;
	inputFormInhalt.name = "inhalt";
	inputFormInhalt.id = feldid;

	var inputFormFeld = document.createElement("INPUT");
	inputFormFeld.type = "hidden";
	inputFormFeld.value = feld;
	inputFormFeld.name = "feld";
	inputFormFeld.id = feldid;	
	
	// hiddenPostForm
	document.getElementById("hiddenPostForm").appendChild(inputFormInhalt);	
	document.getElementById("hiddenPostForm").appendChild(inputFormFeld);
	document.getElementById("hiddenPostForm").submit();
}

function load_tooltip(where, what, what2, ziel)
{
	var text = document.getElementById(where).value;
	document.getElementById(ziel).value = 0;
	if (document.getElementById(what + '_button')) document.getElementById(what + '_button').disabled = true;
	
	if (text.length > 0)
	{
		document.getElementById(what).style.visibility='visible';
		if (what2!='') document.getElementById(what2).style.visibility='visible';
		document.getElementById(what).innerHTML = "<img src='images/wait.gif' alt='Please wait'>";
		document.getElementById("innerframe").src="load_speaker.php?suche=" + text + "&what=" + what + "&what2=" + what2 + "&ziel=" + ziel;
	}
	else
	{
		document.getElementById(what).style.visibility='hidden';
		if (what2!='') document.getElementById(what2).style.visibility='hidden';
	}
}

function show_tooltip(innhtml, what)
{
	document.getElementById(what).innerHTML = innhtml;
}

function set_speaker(id, what, what2, name, ziel)
{
	document.getElementById(ziel).value=id;
	document.getElementById(ziel+"_select").value=name;
	document.getElementById(what).style.visibility='hidden';
	if (what2!='') document.getElementById(what2).style.visibility='hidden';
	if (document.getElementById(what + '_button')) document.getElementById(what + '_button').disabled = false;
}

function firstclick(what, check)
{
  if (document.getElementById(what).value==check)
  {
    document.getElementById(what).value = '';
    document.getElementById(what).style.backgroundColor = '#ffffff';
    document.getElementById(what).style.fontStyle = 'normal';
  }
}

function checkfeeld(what, check)
{ 
  if (document.getElementById(what).value.length==0)
  {
    document.getElementById(what).value = check;
    document.getElementById(what).style.backgroundColor = '#dddddd';
    document.getElementById(what).style.fontStyle = 'italic';
  }
}

function firstclick1(what, check)
{
  if (document.getElementById(what).selectedIndex>0)
  {
    document.getElementById(what).style.backgroundColor = '#ffffff';
    document.getElementById(what).style.fontStyle = 'normal';
  }
  else
  {
    document.getElementById(what).style.backgroundColor = '#dddddd';
    document.getElementById(what).style.fontStyle = 'italic';
  }
}

function checksafespeaker(what)
{
  if ((document.getElementById('land' + what).selectedIndex>0) && (document.getElementById('nachname' + what).value != 'Surname') && (document.getElementById('nachname' + what).value != '') && (document.getElementById('stadt' + what).value != '') && (document.getElementById('stadt' + what).value != 'City'))
  {
    document.getElementById('button' + what).disabled = false;
  }
  else
  {
    document.getElementById('button' + what).disabled = true;
  }
}

function safespeaker(what2, what, ziel)
{
  nachname = document.getElementById('nachname' + what2).value;
  vorname = document.getElementById('vorname' + what2).value;
  email = document.getElementById('email' + what2).value;
  stadt = document.getElementById('stadt' + what2).value;
  land = document.getElementById('land' + what2).options[document.getElementById('land' + what2).selectedIndex].value;
  
  if (email == "Email") email="";
  if (vorname == "First name") vorname="";

  document.getElementById("innerframe").src="safenew_speaker.php?name=" + nachname + "&vorname=" + vorname + "&email=" + email + "&stadt=" + stadt + "&land=" + land + "&what=" + what + "&what2=" + what2 + "&ziel=" + ziel;
}


function safespeaker_done(what, what2, text, ziel)
{
  document.getElementById(what).innerHTML = "<img src='images/wait.gif' alt='Please wait'>";
  document.getElementById("innerframe").src="load_speaker.php?suche=" + text + "&what=" + what + "&what2=" + what2 + "&ziel=" + ziel;

  document.getElementById('nachname' + what2).value = '';
  document.getElementById('vorname' + what2).value = '';
  document.getElementById('email' + what2).value = '';
  document.getElementById('stadt' + what2).value = '';
  document.getElementById('land' + what2).selectedIndex = 0;

  checkfeeld('nachname' + what2, 'Surname'); 
  checkfeeld('vorname' + what2, 'First name'); 
  checkfeeld('email' + what2, 'Email'); 
  checkfeeld('stadt' + what2, 'City'); 
  firstclick1('land' + what2, 'Land not selected'); 
  
  checksafespeaker(what2);
}

