
function help() {

	var _u = "help";
	var _d = "joepixel";
	var _s = ".com";
	var _l = _u + "@" + _d + _s;
	document.write("<a href='mailto:"+_l+"' class='link'>"+_l+"</a>");

}

function send() {

	var _u = "scott";
	var _d = "joepixel";
	var _s = ".com";
	var _l = _u + "@" + _d + _s;
	document.write("<a href='mailto:"+_l+"' class='link'>"+_l+"</a>");

}

function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
	  if(window.screen)if(isCenter)if(isCenter=="true"){
		var myLeft = (screen.width-myWidth)/2;
		var myTop = (screen.height-myHeight)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
	  }
	window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth +',height='+myHeight);
}

function confirmSubmit() {
    
	var agree=confirm("Are you sure you want to delete items?");
	
	if (agree)
		return true ;
	else
		return false ;
}

//collapseing layers
function toggle(target) {

	obj=document.getElementById(target);
	obj.style.display=( (obj.style.display=='none') ? '' : 'none');
}

//hide layers
function hide(target) {

	obj=document.getElementById(target);
	obj.style.display = 'none';
}

//show layers
function show(target) {

	obj=document.getElementById(target);
	obj.style.display = 'block';
}

function validateForm(contact){
	valid = true;
	err = '';
	if (contact.name.value == ''){
		contact.name.style.borderColor = '#ff0000';
		valid = false;
		err = 'The Name Field Is Required!<br />';
	}
	if (contact.email.value == ''){
		contact.email.style.borderColor = '#ff0000';
		valid = false;
		err += 'The Email Field Is Required!<br />';
	}
	
	var str = contact.email.value;
	var filter=/^.+@.+\..{2,3}$/
	
	if (filter.test(str) == false) {
		contact.email.style.borderColor = '#ff0000';
		err += 'The Email Address You entered Is Not Valid.<br />';
		valid = false;
	}
	
	if (contact.find.value == '' && contact.comment.value == ''){
		contact.find.style.borderColor = '#ff0000';
		contact.comment.style.borderColor = '#ff0000';
		valid = false;
		err += 'You forgot to leave a message! Please leave a message in at least one of the text boxes below.';
	}
		
	if(valid == false) {
		show('doall');
		document.getElementById('doall').innerHTML = err;
	}
	
	return valid;
}