function popUp(URL,NAME)	{
	amznwin=window.open(URL,NAME,'location=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes,width=380,height=450,screenX=10,screenY=10,top=10,left=10');
	amznwin.focus();
}
function rollMe(imgName){
	var imgPath = document.all('img' + imgName).src;
	if(imgPath.indexOf('_off.gif')!= -1) {
		document.all("img" + imgName).src = "/images/oss/nav/" + imgName + "_on.gif";
	}
	else {
		document.all("img" + imgName).src = "/images/oss/nav/" + imgName + "_off.gif";
	}			
}
function sendMail(varEmail)	{
	if(IsEmail(varEmail))	{
		emlWin=window.open("/oss/sendmail.asp","sendMail",'location=no,scrollbars=yes,status=no,toolbar=no,resizable=no,width=380,height=450,screenX=10,screenY=10,top=10,left=10');
		document.frmEmail.target="sendMail";
		frmEmail.submit();
		document.all("txtEmail").value="";
		emlWin.focus();
	}
	else	{
		alert("The email address you entered was invalid");
		document.all("txtEmail").select();
	}
}
function showBig(path,width,height){
	var picture = window.open("/oss/showBig.asp?img=" + path, "Picture", "width=" + width + ", height=" + height + "resizable=no")
}
function window.onload()	{
	document.all("txtEmail").value="friend's email here";
	document.all("txtEmail").select();
}
function IsEmail(strEmail)
{
	strEmail = rtrim(ltrim(strEmail));

	//Does the text string follow the standard email address rules?  (Doesn't actually verify email@domain.com exists)
	if (strEmail == "") return false

	invalidChars = " /:,;'<>"
	for (i=0; i<invalidChars.length; i++) 
	{
		badChar = invalidChars.charAt(i)
		if (strEmail.indexOf(badChar,0) != -1) return false
	}
	atPos = strEmail.indexOf("@",1)

	if (atPos == -1) return false

	// should not be more than one @ symbol
	if (strEmail.indexOf("@",atPos+1) != -1) return false

	// at least one . after the @
	dotPos = strEmail.indexOf(".",atPos)
	if (dotPos == -1) return false

	// 2 or more chars after .  (.COM, .CA, etc.)
	if (dotPos+3 > strEmail.length) return false

	return true
}
function ltrim (s)
{
	var i = s.length;
	var pos;

	if (s.length == 0 ) return s;

	for (j=0; j<=i-1; j++)
	{
		if (s.charAt(j) == ' ')
			pos=j;
		else
			break;
	}
	s = s.slice(j);
	return s;
}
function rtrim (s)
{
	var i = s.length;
	var pos;

	if (s.length == 0 ) return s;

	for (j=i-1; j>=0; j--)
	{
		if (s.charAt(j) == ' ')  
			pos=j;
		else
			break;
	}
	s = s.slice(0,j+1);
	return s;
}