// --- checksearch will make sure "Practice Issues" is selected from the search menu

function checksearch(value,div_id_ifany) {
	if ( value == 'issues' ) {
		if ((document.layers) && (div_id_ifany != null)) {
			document.layers[div_id_ifany].document.aapmrsearch.include.options[6].selected = true;
		}
		else {
			document.aapmrsearch.include.options[6].selected = true;
		}
	}
}

// --- END checksearch

// --- checksearch will make sure "Practice Issues" is selected from the search menu

function checksearch2(value,div_id_ifany) {
	if ( value == 'issues' ) {
		if ((document.layers) && (div_id_ifany != null)) {
			document.layers[div_id_ifany].document.perlsearch.include.options[6].selected = true;
		}
		else {
			document.perlsearch.include.options[6].selected = true;
		}
	}
}

// --- END checksearch


// --- dosearch executes the search (needed for NN4)

function dosearch(div_id_ifany) {
	if ((document.layers) && (div_id_ifany != null)) {
		document.layers[div_id_ifany].document.aapmrsearch.submit();
	}
	else {
		document.aapmrsearch.submit();
	}
}

// --- END dosearch



// the variables below are for the breadcrumbs
// the 9 in the slice command will strip the first 9 chars from the title (the "AAPM&R - ")

    var theTitle = document.title
    var theUrl = document.URL
    var theName = theTitle.slice(9)

// --- END breadcrumb variables


// --- popThis is for new browser windows

function popThis(url,title,w,h) {
window.open(url,title, "toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizeable=yes,copyhistory=no,width="+w+",height="+h);
} 

// --- END popThis


//change url function for select box navigation
function ChangeURL(newurl) {
	location.href=newurl;
}

// --- END change url function 

//protect emails from email crawlers
function ProtectEmail(user,site) {
	document.write('<a href=\"mailto:' + user + '@' + site + '\">' + user + '@' + site + '</a>');
}

// --- END //protect emails 


