function makeBold(obj, section)
{
	var e=document.getElementsByName(section);
	for(var i=0;i<e.length;i++){
		e[i].style.fontWeight = 'normal';
	}
	obj.style.fontWeight = 'bold';
}

function hideFeature() {
	var div = document.getElementById('feature');
	div.style.display = 'none';
}

function PopupPic(sPicURL) { 
	window.open("popup.html?"+sPicURL, "", "resizable=1,HEIGHT=400,WIDTH=400");
}

function submitSearch() {
	var keywords = document.getElementById('search').value.toUpperCase();
	if (keywords) {
		if (keywords != "SEARCH...") {
		var string = "show_line_search.php?keywords=" + keywords
		loadNewFragment(string, 'div4');
		}
	}
	return false
}

function submitNewsletter() {
	var email = document.getElementById('newsletter').value.toLowerCase();
	var name = document.getElementById('mailing_list_name').value
	if (checkMail(email)) {
		if (email) {
			if (email != "EMAIL...") {
			var string = "newsletter_form.php?email=" + email + "&name=" + name
			loadNewFragment(string, 'div6');
			}
		}
	}
	return false
}

function checkMail(email)
{
	var x = document.getElementById('newsletter').value.toLowerCase();
	var name = document.getElementById('mailing_list_name').value
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(x)) {
		return true
	} else {
		alert('Invalid email address');
		return false
	}
}

function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
	thisfield.value = "";
	thisfield.style.color = "#666666";
	}
}

function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
	thisfield.value = defaulttext;
	thisfield.style.color = "white";	
	}
}

