// JavaScript Document
function toggleMenu(objID) {
if (!document.getElementById) return;
	var ob = document.getElementById(objID).style;
	ob.display = (ob.display == 'block')?'none': 'block';
}
function MM_openBrWindow() { //v2.0
	rs=window.open('receipt_print.pl?customer_no=$customerID&order_no=$OrderID','repairRequest','scrollbars=yes,location=0,width=640,height=700,menubar=no');
	rs.focus();
}
function MM_openConformationWindow() { //v2.0
	rs=window.open('receipt_print.pl?customer_no=$customerID&order_no=$OrderID','repairRequest','scrollbars=yes,location=0,width=640,height=700,menubar=no');
	rs.focus();
}
function MM_openFaxWindow(){ //v2.0
	rs=window.open('receipt_print.pl?customer_no=$customerID&order_no=$OrderID&fax=yes','repairRequest','scrollbars=yes,location=0,width=640,height=700,menubar=no');
	rs.focus();
}
//function QuoteSystem() { //v2.0
//	rs=window.open('http://bga-rework.us/test/dashboard.pl','QuoteSytem','scrollbars=yes,location=0,width=1150,height=800,menubar=no');
//	rs.focus();
//}

function jovyStore() { //v2.0
	//rs=window.open('https://bga-rework.us/store/product_list.pl?viewBy=All','QuoteSytem','scrollbars=yes,location=0,width=1150,height=800,menubar=no');
//	rs.focus();
	 window.location.replace('http://bga-rework.us/store/product_list.pl?viewBy=All');
}
function billCountry() {
		document.form2.countryChange.value = yes;
		document.form2.submit();
		
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function toggleLease(objID2) {
if (!document.getElementById) return;
var ob2 = document.getElementById(objID2).style;
ob2.display = 'block';
var bo = document.getElementById("CreditCard").style;
bo.display = 'none';
var bo2 = document.getElementById("FAXpayment").style;
bo2.display = 'none';
}
function toggleCCard(objID2) {
if (!document.getElementById) return;
var ob2 = document.getElementById(objID2).style;
ob2.display = 'block';
var bo = document.getElementById("LeaseInfo").style;
bo.display = 'none';
var bo2 = document.getElementById("FAXpayment").style;
bo2.display = 'none';
}
function toggleFAX(objID2) {
if (!document.getElementById) return;
var ob2 = document.getElementById(objID2).style;
ob2.display = 'block';
var bo = document.getElementById("LeaseInfo").style;
bo.display = 'none';
var bo2 = document.getElementById("CreditCard").style;
bo2.display = 'none';
}
function toggleWestUnion(objID2) {
if (!document.getElementById) return;
var ob2 = document.getElementById(objID2).style;
ob2.display = 'block';
var bo = document.getElementById("bankTransfer").style;
bo.display = 'none';
}

function toggleBankTrans(objID2) {
if (!document.getElementById) return;
var ob2 = document.getElementById(objID2).style;
ob2.display = 'block';
var bo = document.getElementById("westernUnion").style;
bo.display = 'none';
}
function toggleProcess(objID2) {
if (!document.getElementById) return;
var ob2 = document.getElementById(objID2).style;
ob2.display = 'block';
var bo = document.getElementById("process_normal").style;
bo.display = 'none';
}

function togglePayment(objID2) {
		if (!document.getElementById) return;
		if (objID2 == 'CCPay'){
			var ob2 = document.getElementById(objID2).style;
			ob2.display = 'block';
		} else {
			var ob2 = document.getElementById('CCPay').style;
			ob2.display = 'none';
			
		};
		if (objID2 == 'FaxPay') {
			var ob3 = document.getElementById(objID2).style;
			ob3.display = 'block';
		} else {
			var ob3 = document.getElementById('FaxPay').style;
			ob3.display = 'none';	
		};
		
		if (objID2 == 'LeasePay') {
			var ob3 = document.getElementById(objID2).style;
			ob3.display = 'block';
		} else {
			var ob3 = document.getElementById('LeasePay').style;
			ob3.display = 'none';	
		};
		if (objID2 == 'WUPay') {
			var ob3 = document.getElementById(objID2).style;
			ob3.display = 'block';
		} else {
			var ob3 = document.getElementById('WUPay').style;
			ob3.display = 'none';	
		};
		if (objID2 == 'BTPay') {
			var ob3 = document.getElementById(objID2).style;
			ob3.display = 'block';
		} else {
			var ob3 = document.getElementById('BTPay').style;
			ob3.display = 'none';	
		};
}

function toggleShow(objID) {
if (!document.getElementById) return;
var ob = document.getElementById(objID).style;
ob.display = 'block';
}

function order(ItemNo) { //v2.0

	 window.location.replace('http://bga-rework.us/store/product_info.pl?item_no='+ItemNo);
}
function order_general(Place) { //v2.0
//	rs=window.open('https://bga-rework.us/store/product_list.pl?cart_no=MycaPy&customer_no=&zip_code=&search='+Place+'&viewBy=1','QuoteSytem','scrollbars=yes,location=0,width=1150,height=800,menubar=no');
//	rs.focus();
	//window.location.replace('https://bga-rework.us/admin/product_list.pl?cart_no='+Cart+'&customer_no=&zip_code=&search='+Place+'&viewBy=1')
	window.location.replace('http://bga-rework.us/store/product_list.pl?search='+Place+'&viewBy=1');
}
function checkZip() {
	var zip = document.getElementById('ship_zip_code').value;
	
	var STzip = (zip.substring(0,2));
	var TaxChange = confirm("your total is" + STzip);
	if (TaxChange==true) {
		//'Taxes' = STzip;
	} else {
		
	}
}

function SMTA()
{
	rs=window.open('http://www.smta.org/files/SMTAI_Free_Exhibits_Pass_2010.pdf','smta_Page','scrollbars=yes,location=0,width=900,height=700,menubar=no');
	rs.focus();
	
}
