function validateKnowledge()
{
var isItGood = true;
	
if ((document.knowledgelink.link.value == "www.someknowledgelink.com") ||
    (document.knowledgelink.link.value == ""))

{
	alert("Please remember to submit a valid link!!");
	document.knowledgelink.link.select();
	isItGood = false;
}
if ((document.knowledgelink.categoryinfo.value == "Select the category above") ||
    (document.knowledgelink.categoryinfo.value == ""))

{
	alert("Please remember to select a category for the link!!");
	document.knowledgelink.categoryinfo.select();
	isItGood = false;
}
if ((document.knowledgelink.linkdesc.value == "Please provide a BRIEF description of the knowledge link") ||
    (document.knowledgelink.linkdesc.value == ""))

{
	alert("Please remember to provide a description for the knowledge link!");
	document.knowledgelink.linkdesc.select();
	isItGood = false;
}
//alert('The value of the form validation is ' + isItGood );
return isItGood;
}


function setCategoryOption()
{

var selectedCategory = document.knowledgelink.category.options[document.knowledgelink.category.selectedIndex].value;

if(selectedCategory == 'Other')
{
		alert("Plese remember to explain what category so we can determine if we need to add a category!! ");
		document.knowledgelink.categoryinfo.value = "Plese explain what 'OTHER' category. ";
		document.knowledgelink.categoryinfo.select();
		document.knowledgelink.categoryinfo.focus();

}
else
{
	document.knowledgelink.categoryinfo.value = selectedCategory;
	document.knowledgelink.linkdesc.select();
	document.knowledgelink.linkdesc.focus();
}
} // end of setCategoryOption function

function validateContactForm(theForm){
var emailString =  new String();
var emailFilter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
var validEMail = false;

if (theForm.name.value == "")
{
	alert("You must enter or supply a Name");
	theForm.name.focus();
	theForm.name.select();
	return false;
}

if (theForm.email.value == "")
{
	alert("You must enter or supply an Email");
	theForm.email.focus();
	theForm.email.select();
	return false;
}
else
{
	emailString = theForm.email.value;
	if (emailFilter.test(emailString))
	{
		validEMail = true;
	}
	else
	{
		alert("You must enter or supply a valid Email");
		theForm.email.focus();
		theForm.email.select();
		return false;
	}
}
if (theForm.inquiry.value == "")
{
	alert("You must enter your inquiry or comment");
	theForm.inquiry.focus();
	theForm.inquiry.select();
	return false;
}

} // end of function validateContactForm


function setContactStart(){
document.contact.name.focus();

} // end of function setContactStart



function popEmUp( imagename , message ){
var winDims = '';
var newWin;
var imageURL = 'one_year_ann_images/'; 
var base_location = 'images/'; 
var newWinStatus = '';
var loadStatusCntr = 0;
var promo = 'DAMA COC';
//css varz
var css1 = '<span class=\"pageheader\">';
var csses = '</span>';

imageURL += imagename;

//alert('Horizontal Popup - lookng for ' + imageURL);
winDims = 'width=630,height=370,directories = no,location = no,menubar = no,resizable = yes,scrollbars = no,status = yes,toolbar = no, top=100,left=100';
newWin =  window.open("hpopup.html", 'PopUp', winDims);
newWin.document.write('<html><head>\n<title>DAMA COC - One Year Anniversary Picture</title>\n');
newWin.document.write('<LINK href="css/damacoc.css" rel=\"StyleSheet\" type=\"text/css\">\n</head>');
newWin.document.write('<body background="images/bck2.jpg" onLoad="if (window.focus) window.focus()">\n<center>');
newWin.document.write('<img src="' + imageURL + '">\n');
newWin.document.write('<br><br>' + css1 + message + csses + '\n');
newWin.document.write('</center></body>');
newWin.status = promo;

} //end popEmUp