function showSections(section){
	//alert('section= ' + section);
	animatedcollapse.toggle(section);
	
	if(section == 'dewils'){
		animatedcollapse.hide('yorktowne');
		animatedcollapse.hide('samples-dtls');
	}else if(section == 'yorktowne'){
		animatedcollapse.hide('dewils');
		animatedcollapse.hide('dewils-designer');
		animatedcollapse.hide('dewils-expressions');
		animatedcollapse.hide('dewils-horizons');
		animatedcollapse.hide('samples-dtls');
	}else if(section == 'samples-dtls'){
		animatedcollapse.hide('dewils');
		animatedcollapse.hide('dewils-expressions');
		animatedcollapse.hide('dewils-horizons');
		animatedcollapse.hide('yorktowne');
	}
	
}

function showSectionDetail(section){
	//alert('section= ' + section);
	animatedcollapse.toggle(section);
	
	if(section == 'dewils-designer'){
		animatedcollapse.hide('dewils-expressions');
		animatedcollapse.hide('dewils-horizons');
		animatedcollapse.hide('yorktowne');
		animatedcollapse.hide('samples-dtls');
		//animatedcollapse.hide('yorktowne');
		//animatedcollapse.hide('yorktowne');
		//animatedcollapse.hide('yorktowne');
	}else if(section == 'dewils-expressions'){
		animatedcollapse.hide('dewils-designer');
		animatedcollapse.hide('dewils-horizons');
		animatedcollapse.hide('yorktowne');
		animatedcollapse.hide('samples-dtls');
	}else if(section == 'dewils-horizons'){
		animatedcollapse.hide('dewils-designer');
		animatedcollapse.hide('dewils-expressions');
		animatedcollapse.hide('yorktowne');
		animatedcollapse.hide('samples-dtls');
	}else if(section == 'yorktowne'){
		animatedcollapse.hide('dewils-designer');
		animatedcollapse.hide('dewils-expressions');
		animatedcollapse.hide('dewils-horizons');
		animatedcollapse.hide('samples-dtls');
	}else if(section == 'samples-dtls'){
		alert('here');
		animatedcollapse.hide('dewils-designer');
		animatedcollapse.hide('dewils-expressions');
		animatedcollapse.hide('dewils-horizons');
		animatedcollapse.hide('yorktowne');
	}
	
}

function formCheck(){
	with (document.frm_contact) {
		var alertMsg = "The following REQUIRED fields\nhave been left empty:\n";
		if (fname.value == "") alertMsg += "Please enter your first name:\n";
		if (lname.value == "") alertMsg += "Please enter your last name:\n";
		if (phone.value == "") alertMsg += "Please enter contact phone number:\n";
		//if (email.value == "") alertMsg += "Please enter an email address:\n";
		if (comment.value == "") alertMsg += "Please enter a question or comment:\n";
		if (alertMsg != "The following REQUIRED fields\nhave been left empty:\n") {
			alert(alertMsg);
			return false;
		} else {
			return true;
		}
	
	}
	
}

function showViewer(s){
	
	var viewer = document.getElementById(s);
	
	if(viewer.style.display == "block"){
		viewer.style.display = "none";
	}
	else{
		viewer.style.display = "block";
	}
	
	
}


function isEmail (s)
{   if (isEmpty(s)) 
       if (isEmail.arguments.length == 1) return defaultEmptyOK;
       else return (isEmail.arguments[1] == true);
   
    // is s whitespace?
    if (isWhitespace(s)) return false;
    
    // there must be >= 1 character before @, so we
    // start looking at character position 1 
    // (i.e. second character)
    var i = 1;
    var sLength = s.length;

    // look for @
    while ((i < sLength) && (s.charAt(i) != "@"))
    { i++
    }

    if ((i >= sLength) || (s.charAt(i) != "@")) return false;
    else i += 2;

    // look for .
    while ((i < sLength) && (s.charAt(i) != "."))
    { i++
    }

    // there must be at least one character after the .
    if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false;
    else return true;
}
function getThisYear(){
	now = new Date;
	theYear=now.getYear();
	if (theYear < 1900)
	theYear=theYear+1900
	document.write(theYear);	
	
}
