<!--

function LoadImages () {

		b_about0 = new Image();

		b_about0.src = "http://tatamiroom.com/image/about_off.gif";

		b_about1 = new Image();

		b_about1.src = "http://tatamiroom.com/image/about_on.gif";



		b_contact0 = new Image();

		b_contact0.src = "http://tatamiroom.com/image/contact_off.gif";

		b_contact1 = new Image();

		b_contact1.src = "http://tatamiroom.com/image/contact_on.gif";



		loaded=1;

}

function adWindow(a)
{
	var url = "http://tatamiroom.com/ads.html";
	window.open(url, a, "menubar=no, resizable=no, scrollbars=yes, status=no, height=510, width=600, toolbar=no");
}

function checkRF1(a)
{
	var myf = a.form;
	if(myf.Date.value == "Month")
	{
		alert("Please select a Month");
		myf.Date.focus();
		return false;
	}
}

function checkRF2(a)
{
	var myf = a.form;
	if(myf.FName.value == 0)
	{
		alert("Please enter First Name");
		myf.FName.focus();
		return false;
	}
	if(myf.LName.value == 0)
	{
		alert("Please enter First Name");
		myf.LName.focus();
		return false;
	}
	if(myf.Event.value == "Wedding")
	{
		if(myf.BFName.value == 0)
		{
			alert("Please enter Groom/Bride First Name");
			myf.BFName.focus();
			return false;
		}
		if(myf.BLName.value == 0)
		{
			alert("Please enter Groom/Bride Last Name");
			myf.BLName.focus();
			return false;
		}
	}
	if(myf.Phone.value == 0)
	{
		alert("Please enter your Phone Number");
		myf.Phone.focus();
		return false;
	}
	if (myf.Email.value.length >0) 
	{
		i=myf.Email.value.indexOf("@")
		j=myf.Email.value.indexOf(".",i)
		k=myf.Email.value.indexOf(",")
		kk=myf.Email.value.indexOf(" ")
		jj=myf.Email.value.lastIndexOf(".")+1
		len=myf.Email.value.length

		if ((i>0) && (j>(1+1)) && (k==-1) && (kk==-1) && (len-jj >=2) && (len-jj<=3)) 
		{
	
		} 
		else
		{
			alert("Please enter a valid email address. " + myf.Email.value + " is not a valid Email Address.")
			myf.Email.select();
			return false;
		}
	}
	else
	{
		alert("Please enter your email address.")
		myf.Email.focus();
		return false;
	}
	if(myf.State.value == "State")
	{
		alert("Please select a State");
		myf.State.focus();
		return false;
	}
	if(myf.UserID.value == 0)
	{
		alert("Please enter your User ID");
		myf.UserID.focus();
		return false;
	}
	if(myf.Password.value == 0)
	{
		alert("Please enter your Password");
		myf.Password.focus();
		return false;
	}
	if(myf.RePassword.value == 0)
	{
		alert("Please enter your Re-Entry Password");
		myf.RePassword.focus();
		return false;
	}
	if(myf.RePassword.value != myf.Password.value )
	{
		alert("Your Password does not match with Re-Entry Password");
		myf.RePassword.select();
		return false;
	}
	if(myf.sAddress.value == 0 )
	{
		alert("Please enter your Shipping Addres");
		myf.sAddress.focus();
		return false;
	}
	if(myf.sCity.value == 0)
	{
		alert("Please enter your City");
		myf.sCity.focus();
		return false;
	}
	if(myf.sState.value == "State" )
	{
		alert("Please select a State");
		myf.sState.focus();
		return false;
	}
	if(myf.sZip.value == 0 )
	{
		alert("Please enter your Zip Code");
		myf.sZip.focus();
		return false;
	}
}
	
function checkForm(a)
{
		if (document.e_mail.mail_from.value.length >0) 
		{
			i=document.e_mail.mail_from.value.indexOf("@")
			j=document.e_mail.mail_from.value.indexOf(".",i)
			k=document.e_mail.mail_from.value.indexOf(",")
			kk=document.e_mail.mail_from.value.indexOf(" ")
			jj=document.e_mail.mail_from.value.lastIndexOf(".")+1
			len=document.e_mail.mail_from.value.length

			if ((i>0) && (j>(1+1)) && (k==-1) && (kk==-1) && (len-jj >=2) && (len-jj<=3)) 
			{
		
			} 
			else
			 {
				alert("Please enter a valid email address. " + document.e_mail.mail_from.value + " is not a valid Email Address.")
				document.e_mail.mail_from.select();
				return false;
			}
		}
		else
		{
			alert("Please enter your email address.")
			document.e_mail.mail_from.focus();
			return false;
		}
		if( document.e_mail.subject.value == 0)
		{
			alert("Please enter Subject");
			document.e_mail.subject.focus();
			return false;
		}
		if( document.e_mail.mail_body.value == 0)
		{
			alert("Please enter Comments");
			document.e_mail.mail_body.focus();
			return false;
		}
}

var gt = unescape('%3e')
var new_win = null
browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))
function openNew_win(url, winname)
 {
if (browser)
 {
new_win = window.open(url,"winname","width=600, height=375, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes")
new_win.location.href = url
}
}

function change(Name,No)

{
	if (document.images && (document[Name]))

		{document[Name].src = eval("b_" + Name + No + ".src");}

}

LoadImages();

function confs(a, b)
{
if(a == "yes")
{
	var url = "http://tatamiroom.com/cgi-local/catalog.pl?category=SPECIAL_ORDER&id=" + b;
	window.location = url;
	return false;
}
else
{
	//var url = "http://cart.bamart.com/addtocart.mart?m=4301322135820922&upc=" + myf.stocknum.value + "%2D" + myf.color.options[myf.color.selectedIndex].value + "&qty=1&" + link;
	//var url = "http://tatamiroom.com/upgrade.html";
	//window.location = url;
	//var myWindo = window.open(url,"myWin","width=630,height=400,personalbar=0,scrollbars=1,locationbar=1,menubar=0,status=1,statusbar=1,toolbar=1,resizable=1,location=1");
	return true;
}
}

// -->