function account_type_chbox_click (id) {
  var chbox_element = document.getElementById(id);

  if (id == "accounttype1") {
    var business_needs_div = document.getElementById("business_resource_account_fields");
  
    if (chbox_element.checked) {
      business_needs_div.style.display = "block";
    }
    else {
      business_needs_div.style.display = "none";
    }
  }
  else if (id == "accounttype2") {
    var business_resource_div = document.getElementById("business_needs_account_fields");
  
    if (chbox_element.checked) {
      business_resource_div.style.display = "block";
    }
    else {
      business_resource_div.style.display = "none";
    }
  }
}

function account_type_chbox_click_alt (id) {
  var chbox_element = document.getElementById(id);

  if (id == "accounttype1") {
    var business_needs_divt = document.getElementById("business_resource_account_fields_alt");
  
    if (chbox_element.checked) {
      business_needs_divt.style.display = "block";
    }
    else {
      business_needs_divt.style.display = "none";
    }
  }
  else if (id == "accounttype2") {
    var business_resource_divt = document.getElementById("business_needs_account_fields_alt");
  
    if (chbox_element.checked) {
      business_resource_divt.style.display = "block";
    }
    else {
      business_resource_divt.style.display = "none";
    }
  }
}

function featured_listing_chbox_click (id) {
  var chbox_element = document.getElementById(id);

  if (id == "featured") {
    var featured_div = document.getElementById("feature_listing_fields");
    var normal_div = document.getElementById("normal_listing_fields");
  
    if (chbox_element.checked) {
      featured_div.style.display = "block";
      normal_div.style.display = "none";
    }
    else {
      featured_div.style.display = "none";
      normal_div.style.display = "block";	  
    }
  }

}

function enable_contact_info_fields() {
  info_sectiont = document.getElementById("info_section");
  fields_sectiont = document.getElementById("fields_section");
  
  info_sectiont.style.display = "none";
  fields_sectiont.style.display = "block";
}

function enable_br_premier_fields() {
  br_premier_linkt = document.getElementById("br_premier_link");
  br_premier_fieldst = document.getElementById("br_premier_fields");
  
  br_premier_linkt.style.display = "none";
  br_premier_fieldst.style.display = "block";
}

function enable_bn_premier_fields() {
  bn_premier_linkt = document.getElementById("bn_premier_link");
  bn_premier_fieldst = document.getElementById("bn_premier_fields");
  
  bn_premier_linkt.style.display = "none";
  bn_premier_fieldst.style.display = "block";
}

// Collapsible content
function swap(divNum,expanding)
{
    if (expanding)
    {
	  c_property = document.getElementById("c" + divNum);
	  e_property = document.getElementById("e" + divNum);
	  
	  c_property.style.display = "none";
	  e_property.style.display = "inline";
    }
    else
    {
	  c_property = document.getElementById("c" + divNum);
	  e_property = document.getElementById("e" + divNum);
	  
	  c_property.style.display = "inline";
	  e_property.style.display = "none";
    }
}

function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}