function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changePicture(index) {
	if (document.images && (preloadFlag == true)) {
		window.document.main_picture.src = pictures[index].src;
		pictures['0'] = index;
	}
}

function StringsMatch(string1, string2)
{
var x = 0;
var strings_match = true;

if(string1.length != string2.length)
	{
	return false;
	}
	
for(x = 0; x < string1.length; x++)
	{
	if (string1.charAt(x) != string2.charAt(x))
		{
		strings_match = false;
		}
	}
return strings_match;
}

function callPrintDialog()
{
	var BrowserName = navigator.appName;
	if(navigator.userAgent.indexOf('Mac') != -1&&BrowserName != "Netscape")
	{
		alert("Please use the 'Print' option of your Browser to print this page");
	}
	else
	{
		window.print();
	}
}

function browseOnClick(direction) {
	document.members.action.value = 'find';
	document.members.browseto.value = direction;
	document.members.last_name.value = "";
	document.members.first_name.value = "";
	document.members.email.value = "";
}

function deleteOnClick() {
	if (confirm('Are you sure you want to delete this record?')) {
		document.members.action.value = 'delete';
		return true;
	}
	return false;
}

function MemberCar() {
	var window_width = 600;
	var window_height = 650;
	if (window_height > window.screen.availHeight)
	{
		window_height = window.screen.availHeight;
	}
	var height = window.screen.availHeight;
	var width = window.screen.availWidth;
	var left_point = parseInt(width / 2) - parseInt(window_width / 2);
	var top_point = parseInt(height / 2) - parseInt(window_height / 2);
	var properties = "height=" + window_height + ",width=" + window_width + ",left=" + left_point + ",top=" + top_point + ",status,resizeable,scrollbars";
	window.open("http://www.panhardusa.org/mcm/mcm.phtml", 'MemberCar', properties);
	return false;
}
