function showhide(id) {
  if (document.getElementById(id)) {
    if (document.getElementById(id).style.display=='block') {	
      document.getElementById(id).style.display='none';
    } else {
      document.getElementById(id).style.display='block';
    }
  }	
  return false;
};

function hide(id) {
  if (document.getElementById(id)) {
      document.getElementById(id).style.display='none';
  }	
  return false;
};

function show(id) {
  if (document.getElementById(id)) {
      document.getElementById(id).style.display='block';
  }	
  return false;
};

function set(id,value) {
  if (document.getElementById(id)) {
   document.getElementById(id).innerHTML=value;
  }
  return false;
}

function get(id) {
  if (document.getElementById(id))
   return document.getElementById(id).value;
  else return '';
}

function checkLength(id,len,mess) {
  if (get(id).length<len) {
  alert(mess); return false;
  } else return true;
}


function redirectURLFromList(cbList,title,lng) {
  if (cbList) {
    var urlparams='/'+lng+'/'+cbList.value+'/';
    var myTitle=title+' '+document.getElementById('opt_'+cbList.value).innerHTML;
	myTitle=encodeURIComponent(myTitle.replace(/ /g, '_'));	
    window.location.href='/index.cfm'+urlparams+myTitle;
  }	
  return false;
}

function urlformsg (contact, host, txt ) {
    var mytxt = "<a href=mailto:"+contact+"@"+host+">";
	if (txt && txt!='') mytxt = mytxt +txt+"</a>";
	else mytxt = mytxt +contact+"@"+host+"</a>";
    document.write (mytxt);
}	