function Link(site) {
window.location = site;
}

function divLinkMV(dname, cname) {
document.getElementById(dname).className = cname;
}



// Start drop down

function dropdown(abc, def)
{
if (abc == 'expand') {
document.getElementById(def).className = 'sub';
}

if (abc == 'collapse') {
document.getElementById(def).className = 'invis';
}
}

// End drop down



// Start clear search box

function inputBox(status, field, defaultText) {
var myInput = document.getElementById(field);

if (status == 'clear') {
	if (myInput.value == defaultText) {
	myInput.value = '';
	}
}
else{
	if (myInput.value == '') {
	myInput.value = defaultText;
	}
}
}

// End clear search box



// Start page select drop down box

function pageSelect() {
var countryVal = document.getElementById("page_select");

if (countryVal.value != "select") {
window.location = countryVal.value;
}
}

function bgChange(classval) {
var countryVal = document.getElementById("page_select");

countryVal.className = classval;
}

function pageSelect2(ps2var) {
var countryVal = document.getElementById(ps2var);

if (countryVal.value != "select") {
window.location = countryVal.value;
}
}

function bgChange2(classval2, bgcvar) {
var countryVal = document.getElementById(bgcvar);

countryVal.className = classval2;
}

// End page select drop down box



// Start confirm policy checkbox

function policy(submitid) {
var checkbox = document.getElementById("policy_confirm");
var input = document.getElementById(submitid);

if (checkbox.checked == true) {
input.className = "";
}
else {
input.className = "invis";
}
}

// End confirm policy checkbox



// Start email update checkbox

function emailupdate(submitid) {
var monthly = document.getElementById("monthly");
var biannual = document.getElementById("biannual");
var street = document.getElementById("street_tr");
var city = document.getElementById("city_tr");
var state = document.getElementById("state_tr");
var zip = document.getElementById("zip_tr");
var input = document.getElementById(submitid);

if (monthly.checked == true) {
input.className = "";
}

if (biannual.checked == true) {
input.className = "";
street.className = "";
city.className = "";
state.className = "";
zip.className = "";
}
else {
street.className = "invis";
city.className = "invis";
state.className = "invis";
zip.className = "invis";
}

if (monthly.checked == false && biannual.checked == false) {
input.className = "invis";
}
}

// End email update checkbox




// Start other donation amount

function donationAmt() {
var radio = document.getElementById("amount_option");
var radio_input = document.getElementById("radio_input");

if (radio.checked == true) {
radio_input.className = "";
}
else {
radio_input.className = "invis";
}
}

// End other donation amount



// Start recurring donation check

function donationRcr() {
var type = document.getElementById("recurring");
var type_span = document.getElementById("recurring_donation");

if (type.checked == true) {
type_span.className = "";
}
else {
type_span.className = "invis";
}
}

// End recurring donation check



// Start featured product collapse/expand

function featuredProd(status) {
var wrapper = document.getElementById("feat_prod_wrapper");
var max = document.getElementById("featured_product_closed");
var min = document.getElementById("featured_product_opened");

if (status == 'close') {
min.className = 'invis';
max.className = '';
wrapper.className = 'invis';
}
else {
max.className = 'invis';
min.className = '';
wrapper.className = '';
}
}

// End featured product collapse/expand



function ShowMe(item) {
var div_wrap = document.getElementById(item);

div_wrap.className = "";
}
function HideMe(item) {
var div_wrap = document.getElementById(item);

div_wrap.className = "invis";
}
