<!-- 
/*
function open_page(page_name) {
  if  (page_name == "home") { tmp = "home.php"; window.open (tmp, "main_m", ""); }
  else  { tmp = page_name + ".html"; window.open (tmp, "main_m", ""); }
}
*/

function open_page(page_name) {
	tmp			= page_name + ".php";
	option	= "toolbar=0,status=0,location=0,directories=0,menubar=0,scrollbars=yes,resizable=yes,width=750,height=700,left=50,top=5";
	window.open (tmp, "_blank", option);
}

function open_news(id) {
  tmp = "news.php?id=" + id;
  window.open (tmp, "main_m", ""); 
}

function open_print(id) {
  tmp = id+"_print.php";
  window.open (tmp, "_blank", "toolbar=0,location=0,width=750,menubar=0,scrollbars=1"); 
}

/*
function open_home() { 
 tmp = "home.php"; 
 window.open (tmp, "main_m", ""); 
} 
*/
 
function MM_findObj(n, d) { //v4.0 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 
  if(!x && document.getElementById) x=document.getElementById(n); return x; 
} 
 
function MM_swapImage() { //v3.0 
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) 
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} 
} 
 
function MM_swapImgRestore() { //v3.0 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; 
} 
 
function MM_preloadImages() { //v3.0 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); 
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) 
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} 
} 


	/*************************************
	Trim left side of the string
	*************************************/
	function ltrim(originalString)
	{
		var pos = 0;
		while (originalString.substring(pos, pos+1) == " ")
		{
			pos++;
		}
		originalString = originalString.substring(pos, originalString.length);
		return originalString;
	}

	/*****************************************
		Trim right side of the string
	******************************************/
	function rtrim(originalString)
	{
		var pos = originalString.length;
		while (originalString.substring(pos-1, pos) == " ")
		{
			pos--;
		}
		originalString = originalString.substring(0, pos);
		return originalString;
	}

/*******************************************
	Trim left and right side of the string
	Call ltrim and rtrim to perfrom the trim
********************************************/
function trimSpaces(textObj)
{
	originalString = textObj.value;
	originalString = ltrim(originalString);
	originalString = rtrim(originalString);
	return originalString;
}


//Define function
function validateFields(oFormObject) {

	var flag = true
	missinginfo = "";

	//Validate subject field
	oFormObject.subject.value = trimSpaces(oFormObject.subject)
	if (oFormObject.subject.value == null || oFormObject.subject.value == "") {
		missinginfo += "\n     -  Subject";
	}

	//Validate name field
	oFormObject.name.value = trimSpaces(oFormObject.name)
	if (oFormObject.name.value == null || oFormObject.name.value == "") {
		missinginfo += "\n     -  Name";
	} 

	//Validate last name field
	/*
	oFormObject.last_name.value = trimSpaces(oFormObject.last_name)
	if (oFormObject.last_name.value == null || oFormObject.last_name.value == "") {
		missinginfo += "\n     -  Last Name";
	}
	*/

	//Validate Company field
	oFormObject.company.value = trimSpaces(oFormObject.company)
	if (oFormObject.company.value == null || oFormObject.company.value == "") {
		missinginfo += "\n     -  Company";
	}

	//Validate email 
	oFormObject.email.value = trimSpaces(oFormObject.email)
	if ((oFormObject.email.value == null) || (oFormObject.email.value == "") ||
		(oFormObject.email.value.indexOf('@') == -1) || 
		(oFormObject.email.value.indexOf('.') == -1)) {
		missinginfo += "\n     -  Valid email address";
	}

	//Validate phone field
	oFormObject.phone.value = trimSpaces(oFormObject.phone)
	if (oFormObject.phone.value == null || oFormObject.phone.value == "") {
		missinginfo += "\n     -  Phone Number";
	}

	//Validate Street field
	/*
	oFormObject.street.value = trimSpaces(oFormObject.street)
	if (oFormObject.street.value == null || oFormObject.street.value == "") {
		missinginfo += "\n     -  Street Address";
	}
	*/

	//Validate City field
	/*
	oFormObject.city.value = trimSpaces(oFormObject.city)
	if (oFormObject.city.value == null || oFormObject.city.value == "") {
		missinginfo += "\n     -  City";
	}
	*/

	//Validate State field
	/*
	oFormObject.state.value = trimSpaces(oFormObject.state)
	if (oFormObject.state.value == null || oFormObject.state.value == "") {
		missinginfo += "\n     -  State";
	}
	*/

	//Validate Zip code field
	/*
	oFormObject.zip.value = trimSpaces(oFormObject.zip)
	if (oFormObject.zip.value == null || oFormObject.zip.value == "") {
		missinginfo += "\n     -  Zip code";
	}
	*/

	//Validate Content/Request field
	oFormObject.content.value = trimSpaces(oFormObject.content)
	if (oFormObject.content.value == null || oFormObject.content.value == "") {
		missinginfo += "\n     -  Content/Request";
	}


	//Prompt with errors
	if (missinginfo != "") {
		missinginfo ="" +
		"The following fields are required:\n" +
		missinginfo +
		"\n\nPlease re-enter and submit again!";
		alert(missinginfo);
		flag = false;
	}
	/*
	else {
		if (flag == true)
		{
			//document.contact.submit();
		}
	}
	*/
	return flag;
}
-->
