var miniBasketShop = '/usedInShop/1';
//
//~~~ Reload shop basket
//
function reloadBasket()
{
	widgetBasket = new WidgetBasket(null, null, null);
	widgetBasket.reloadShopBasket(AjaxUrl);
}

//
//~~~ Reset shop basket (see inquiry)
//
function resetBasket(price)
{
	$('shopBasketCount').innerHTML = 0;
	$('shopBasketPrice').innerHTML = price;
}

//
//~~~ Jump Menu
//
function jumpMenu(target, obj, restore)
{
  eval(target+".location='"+obj.options[obj.selectedIndex].value+"'");
  if (restore) obj.selectedIndex = 0;
}

//
//~~~ Open Pop Up
//
function popUp(url, target, parameters)
{
	window.open(url, target, parameters + ", resizable=yes, scrolling=auto");
}

//
//~~~ Captcha
//

function captcha(parent, session) {
	$(parent).innerHTML = '';
	new Ajax.Updater(parent, AjaxUrl + 'Captcha/index/?PHPSESSID=' + session, {evalScripts:true, asynchronous:true});
	return false;
}


//
//~~~ Replace Input Buttons
//
submitToLinkShop = function ()
{
	$$('form input[type="submit"]', 'form input[type="button"]').each(function(b) {
		var a = document.createElement("a");
		a.innerHTML = b.readAttribute('value');
		a.href = '';
		a.className = b.readAttribute('class') || 'none';
		a.setAttribute('title',(b.readAttribute('title') || b.readAttribute('tip') || ""));
 		b.parentNode.insertBefore(a, null);
		b.hide();

		Event.observe(a, 'click', function(e) {
			b.click();
			Event.stop(e);
		});
	});
}


function articleImageMouseover(id, hide) {
    if($('compositionImage'+id) && $('compositionImage'+id).src != '') {
        if(hide) {
            if($('compositionImage'+id).visible()) {
                $('compositionImage'+id).hide();
                $('articleImage'+id).show();
            }
        } else {
            if($('articleImage'+id) && $('articleImage'+id).visible()) {
                $('compositionImage'+id).show();
                $('articleImage'+id).hide();
            }
        }
    }
}

//Event.observe(window,'load', submitToLinkShop);