/* This currently not used
function load_done(id) {
// I hide pre-load text and show post-load text
	var pre_load=document.all? document.all.pre_load : document.getElementById? document.getElementById("pre_load") : document.pre_load
	var post_load=document.all? document.all.post_load : document.getElementById? document.getElementById("post_load") : document.post_load
//if the user is using IE 4+
	if (document.all){
		pre_load.style.visibility = 'hidden';
		post_load.style.visibility = 'visible';
	}
//else if the user is using NS 4
	else if (document.layers){
		pre_load.visibility = 'hide';
		post_load.visibility = 'show';
	}
}
*/

function openWindow(f,id) {
	url = 'popup.cfm?f=' + f + '&id=' + id
	Popup = open(url,'name','width=400,height=400,scrollbars,resizable,dependent')
	Popup.focus()
}

function add_to_cart(rec_id,size) {
	if (confirm('Add this item to your shopping cart? Click OK to confirm.')) {
		with (document.form1) {
			id.value = rec_id
			op1.value = size
			this_page.value=document.URL
			submit()
		}
	}
}
function calculate(f,pid) {
	with (f) {
		stmt = 'Qty_Price' + pid + '.value=Price' + pid + '.value*Qty' + pid + '.value';
		eval(stmt);
		subtotal = 0;
		idList = ids.value;
		idArray = idList.split(',');
		for (i=0; i<idArray.length; i++) {
			Ext_var = 'Qty_Price_' + idArray[i] + '.value';
			subtotal += parseInt(eval(Ext_var));
		}
		symph_subtotal.value = subtotal;
		symph_subtotal_disp.value = symph_subtotal.value + '.00';
	}
}

function items_ordered(f) {
	//this stores a list of item ids (for items ordered) in the order_ids hidden field.
	with (f) {
		idList = ids.value;
		idArray = idList.split(',');
		for (i=0; i<idArray.length; i++) {
			Qty_var = 'Qty_' + idArray[i] + '.value';
			if (parseInt(eval(Qty_var)) != 0) {
				if (order_ids.value != '') order_ids.value += ',';
				order_ids.value += idArray[i];
			}
		}
	}
}