function openCustomWindow(url, width, height, thename)	{
	var width=width;
	var height=height;
	var left=(screen.availWidth - width) / 2;
	var top=(screen.availHeight - height) / 2;
	window.open(url,thename, 'top=' + top + ', left=' + left + ', scrollbars=yes,resizable=yes,toolbar=no,location=no,width='+width+',height='+height+'');
}
function parseValue(input) {
	s = input.value;
	filteredValues = "!#%&()*+/:;<=>?[/]^_{|}~$";     // Characters stripped out
	var i;
	var returnString = "";
	for (i = 0; i < s.length; i++) {  // Search through string and append to unfiltered values to returnString.
		var c = s.charAt(i);
		if (filteredValues.indexOf(c) == -1) returnString += c;
	}
		input.value = returnString;
}
function parseValueDate(input) {
	s = input.value;
	filteredValues = "!#%&()*+:;<=>?[]^_{|}~$";     // Characters stripped out
	var i;
	var returnString = "";
	for (i = 0; i < s.length; i++) {  // Search through string and append to unfiltered values to returnString.
		var c = s.charAt(i);
		if (filteredValues.indexOf(c) == -1) returnString += c;
	}
		input.value = returnString;
}
function parseValueAMOUNTDONATION(input) {
	s = input.value;
	filteredValues = "!#%&()*+/:;<=>?[/]^_{|}~$";     // Characters stripped out
	var i;
	var returnString = "";
	for (i = 0; i < s.length; i++) {  // Search through string and append to unfiltered values to returnString.
		var c = s.charAt(i);
		if (filteredValues.indexOf(c) == -1) returnString += c;
	}
		input.value = returnString;
}	
function parseValuedescription(input) {
	s = input.value;
	filteredValues = "#";     // Characters stripped out
	var i;
	var returnString = "";
	for (i = 0; i < s.length; i++) {  // Search through string and append to unfiltered values to returnString.
		var c = s.charAt(i);
		if (filteredValues.indexOf(c) == -1) returnString += c;
	}
		input.value = returnString;
}
function OpenPoll()	{
	var width=320;
	var height=320;
	var left=(screen.availWidth - width) / 2;
	var top=(screen.availHeight - height) / 2;
	window.open('/survey/index.cfm','Survey', 'top=' + top + ', left=' + left + ', scrollbars=no,resizable=no,toolbar=no,location=no,width='+width+',height='+height+'');
}
function OpenPhotoTips()	{
	var width=420;
	var height=420;
	var left=(screen.availWidth - width) / 2;
	var top=(screen.availHeight - height) / 2;
	window.open('/phototips.html','PhotoTips', 'top=' + top + ', left=' + left + ', scrollbars=yes,resizable=yes,toolbar=no,location=no,width='+width+',height='+height+'');
}
function CheckDuesLevel()	{
	if (MemberRegistrationForm.DuesID.selectedIndex==0)	{
		alert('Please choose a Member Level!');
		return false;
	}
	else	{
		return true;
	}
}

function checkAdvSearchForm()	{
	if(AdvSearch.CompanyName.value==''&&AdvSearch.Keywords.value==''&&AdvSearch.MemberName.value=='')	{
		alert('Please enter criteria to search for!');
		return false;
	} else {
		return true;
	}
}
function openCalendar2(which)	{
	var width = 300;
	var height = 225;
	var left=(screen.availWidth - width) / 2;
	var top=(screen.availHeight - height) / 2;
	var field=which
	show_calendar(field,null,'','MM/DD/YYYY','','Title=Choose Date;AllowWeekends=Yes;PopupX=' + left + ';PopupY=' + top + ';Width=' + width +';Height=' + height + '')
}	
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + '' + num + '.' + cents);
}
function stoperror()	{
    return true
}
//window.onerror=stoperror
