function changeImage(img_name, img_src)
{
	document[img_name].src = img_src;
}

function checkPasswordForm(objForm)
{
	if(objForm.EmailAddress.value == "")
	{
		alert("Enter your email address.");
		objForm.EmailAddress.focus();
		return false;
	}
	
	return true;
}

function showTech(intNumber)
{
	var windowWidth = 350;
	var windowHeight = 250;
	var positionX = (screen.width-windowWidth)/2 - 100;
	var positionY = (screen.height-windowHeight)/2 - 100; 
 
	window.open("/show_tech.asp?" + intNumber + ".jpg", "a", "left="+positionX+",top="+positionY+",width="+windowWidth+",height="+windowHeight+",toolbars=no,scrollbars=no,resizable=no");
 
}

function rememberLogin()
{
	if(document.login.SaveCookie.checked == false)
	{
		document.login.SaveCookie.checked = true;
	}
	else
	{
		document.login.SaveCookie.checked = false;
	}
}

function showError(strMenu, strBox, intLAdjust, intTAdjust)
{
	document.getElementById(strMenu).style.top =  getTop(document.getElementById(strBox)) + intTAdjust;
	document.getElementById(strMenu).style.left = getLeft(document.getElementById(strBox)) + intLAdjust;
	document.getElementById(strMenu).style.display = "block";
}

function getLeft(imgElem)
{
	xPos = eval(imgElem).offsetLeft;
	tempEl = eval(imgElem).offsetParent;
	while (tempEl != null)
	{
		xPos += tempEl.offsetLeft;
		tempEl = tempEl.offsetParent;
	}
	return xPos;
}

function getTop(imgElem)
{
	yPos = eval(imgElem).offsetTop;
	tempEl = eval(imgElem).offsetParent;
	while (tempEl != null)
	{
		yPos += tempEl.offsetTop;
		tempEl = tempEl.offsetParent;
	}
	return yPos;
}

function errorresize() {
	if (document.getElementById('Error').style.display == 'block') {
		showError('Error', 'mainimage', 250, 200);
	}
}