function helpPop(id)
{
	var popurl="/help.jsp?id=" + id 
	winpops=window.open(popurl,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=500");
}

var clicked = false;

function postPage(qs){		
	if (clicked != true){
		document.ItemForm.action = qs;
		clicked = true;		
		document.ItemForm.submit();				
	}
}

function processSubmit(form){	
	document["subImg"].src = "i/processing.gif"; ;
	document.getElementById("subHref").href = "#submit";	
   	form.submit();
}

function setSelectedItem(svalue){		
	document.ItemForm.o.options[svalue].selected = true;	
}

function changePicture(picture){
	document.changer.src="../"+ picture + "";
	document.getElementById('changer1').href = "../" + picture + "";
}

function calcPrice(){
	var selectedItem = document.ItemForm.PriceBox.selectedIndex;
	var qty = document.ItemForm.PriceBox.options[selectedItem].text;
	var unitPrice = document.ItemForm.PriceBox.options[selectedItem].value;	
	var totalPrice = qty * unitPrice;
	totalPrice = totalPrice.toFixed(2);
	document.ItemForm.itemPrice.value = totalPrice;
	document.ItemForm.itemQty.value = qty;

}

function formatCurrency(price){
	var fPrice = 0.00;	
	fPrice = price.toFixed(2);
	document.write(fPrice);
}

function reSort(qs,obj){	
	var sortId;	
	sortId = obj.value;			
	qs = qs + sortId
	document.ItemForm.action = qs;		
	document.ItemForm.submit();				
	
}

function refresh(page){
	window.location = page;		
}

function protectmail(name,address,style,subject) {
	document.write('<a class="' + style + '" href=mailto:' + name + '@' + address + '?subject=' + subject + '>' + name + '@' + address + '</a>');
}

function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)// ie
window.external.AddFavorite(url, title);
}
