//alert('shop script loaded');
function shop_cartgo(artnum){
	document.location.href = shopurl + 'show/' + artnum;
}
function shop_go(url){
	document.location.href = shopurl + groupurl + '/show/' + url;
}
function shop_group(url){
	document.location.href = shopurl + '/' + url;
}
function shop_brand(brandurl){
	document.location.href = shopurl + 'brand/' + brandurl;
}
function shop_gourl(url){
	document.location.href = url;	
}
function productmenunode(hid,level){
	holderid = 'product_menu_holder_' + hid;
	nodeid = 'product_menu_node_' + hid;
	node = document.getElementById(nodeid);
	if(document.getElementById(holderid).style.display == 'none'){
		document.getElementById(holderid).style.display = 'block';
	} else {
		document.getElementById(holderid).style.display = 'none';
	}
	productmenu_cssjs('swap',node,'productmenu_node_lev_' + level + '_open','productmenu_node_lev_' + level + '_closed');
}
function productmenu_cssjs(a,o,c1,c2){
	switch (a){
		case 'swap':
			o.className=!productmenu_cssjs('check',o,c1)?o.className.replace(c2,c1):o.className.replace(c1,c2);
		break;
		case 'add':
			if(!cssjs('check',o,c1)){o.className+=o.className?' '+c1:c1;}
		break;
		case 'remove':
			var rep=o.className.match(' '+c1)?' '+c1:c1;
			o.className=o.className.replace(rep,'');
		break;
		case 'check':
			return new RegExp('\\b'+c1+'\\b').test(o.className)
		break;
	}
}
