function popup_show(d,a)
{

i=1;
	
	while (document.getElementById("popup"+i))
	 {
	 document.getElementById("popup"+i).style.display='none';
	 document.getElementById(a).style.zIndex='1';
	 i++;
	 }
	document.getElementById(d).style.display='block';
	 document.getElementById(a).style.zIndex='2';
}
function popup_hide(d,a)
{
	 document.getElementById(d).style.display='none';
	 document.getElementById(a).style.zIndex='1';
}

function clearText(thefield) {
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
} 
function replaceText(thefield) {
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}


