var clicked, oldclicked 

function img_on(imgname){
        if (!document.images[imgname].clicked) {                
		    document[imgname].src = eval(imgname + "_on.src");
		}
}

function img_off(imgname){ 
        if (!document.images[imgname].clicked) { 
                document.images[imgname].src = eval(imgname + "_off.src"); 
        } 
} 


function img_stayon(imgname) { 
        document.images[imgname].clicked = true ; 
        document.images[imgname].src = eval(imgname + "_on.src"); 
        if (oldclicked != null) { 
			if (oldclicked != imgname) {
                document.images[oldclicked].src = eval(oldclicked + "_off.src");        
                document.images[oldclicked].clicked = false ; 
                oldclicked = imgname ;
			}
        } 
        else  oldclicked = imgname ;
} 



function popWin(url, name, width, height) {
	window.open(url, name, "width=" + width + ",height=" + height + ",dependent=1,directories=0,location=0,menubar=0,resizable=1,scrollbars=yes,toolbar=0");
	
}

function popWinNoScroll(url, name, width, height) {
	window.open(url, name, "width=" + width + ",height=" + height + ",dependent=1,directories=0,location=0,menubar=0,resizable=0,scrollbars=0,toolbar=0");
	
}

function maillist() {
	//launch the mailing list window
	popWin("mailinglist.html","mailinglist",497,500);
}
function policies() {
	//launch the policies window
	popWin("policies.html","policies",497,500);
}
function buysomething(prodname, prodcode, price) {
	document.forms.addtocart.item_name.value = prodname;
	document.forms.addtocart.item_number.value = prodcode;
	document.forms.addtocart.amount.value = price;
	document.forms.addtocart.submit();
}
