function copyForm(frm) {
  opener.document[frm].b.value = document[frm].b.value;
  opener.document[frm].submit();
  window.close();
  return false;
}

function setLnkDefault(){
  if(document.getElementById('aLnk1') != null){
    document.getElementById('aLnk1').style.color = "#F60159";
    document.getElementById('aLnk1').childNodes[2].style.color = "#000";
    return true;
  }else{
    return false;
  }
}

function setLnkStyle(excep){
  var i=1;
  do {
    document.getElementById(('aLnk'+i)).style.color = "#DBC9A2";
    document.getElementById(('aLnk'+i)).childNodes[2].style.color = "#DBC9A2";
    i++;
  }
  while (document.getElementById(('aLnk'+i)) != null);
  // Set on state
  document.getElementById(excep).style.color = "#F60159";
  document.getElementById(excep).childNodes[2].style.color = "#000";
}

function togglePasswordDiv(b){
  d = document.getElementById('password_edit');
  h = document.getElementById('update_password');
  if(b){
    if(d.style.display = "none"){
      d.style.display = "block";
      h.value = 'true';
    }
  }else{
    if(d.style.display = "block"){
      d.style.display = "none";
      h.value = 'false';
    }
  }
}

function openBrWindow(url,winName,features) {
  window.open(url,winName,features);
}

