
function changeSecImg() {
  img = (document.images && document.images.secimg) ? document.images.secimg :
        (document.getElementById && document.getElementById('secimg')) ? document.getElementById(secimg) :
        (document.getElementsByName && document.getElementsByName('secimg').length > 0) ? document.getElementsByName('secimg')[0] :
        (document.all && document.all['secimg']) ? document.all['secimg'] : '';
  if(img) {
    id = randomvalue(0,0xFFFFFF);
    img.src = 'secimg.php?id=' + id;
    form.secid.value = id;
    form.sectxt.value = "";
  }
}
function randomvalue(low, high) { return Math.floor(Math.random() * (1 + high - low) + low); }
