
window.addEvent('domready', function() {

	/*
	$$('div.mainLinks a').addEvent('click', function(e){
		e.stop();
		myHorizontalSlide.hide();
		$('topImg').style.backgroundPosition = (!myHorizontalSlide.open) ? '293px 0' : '0 0';
		elem.innerHTML=$$('div.topImgVendors')[this.getProperty('cats')].innerHTML;
		//this.style.backgroundColor='black';
		myHorizontalSlide.toggle();
	});
	*/

});
	function showVendors(e){
		var elem = $('topImgVendorsShow')
		var myHorizontalSlide = new Fx.Slide(elem, {mode: 'horizontal'});
		elem.setStyle('display','block');
		myHorizontalSlide.hide();
		//e.stop();
		myHorizontalSlide.hide();
		$('topImg').style.backgroundPosition = (!myHorizontalSlide.open) ? '150px 0' : '0 0';
		elem.innerHTML=$$('div.topImgVendors')[e].innerHTML;
		//this.style.backgroundColor='black';
		myHorizontalSlide.toggle();

	}
function openIt(view,view_w) {
	var tmp_width=450
	var tmp_height=450
	var winLeft = (screen.width / 2) - tmp_width/2
	var winTop = (screen.height / 2) - tmp_height/2
	var windowFeatures = "width="+tmp_width+",height="+tmp_height+","
	var windowFeatures=windowFeatures + "left=" + winLeft + ","
	var windowFeatures=windowFeatures + "top=" + winTop + ","
	var t=window.open(view,view_w,"status=yes,scrollbars=yes,resizable=yes,"+windowFeatures)
	return t;
}

function closeMe() {
	document.getElementById('bg_basket').style.display='none'
	document.getElementById('bg_basketText').style.display='none'
	document.getElementById('bg_basketText2').style.display='none'
}

function goBasket(id) {
	GetBg('GET','/bg_basket.php','model='+id+'&wTop='+window.getScrollTop()+'&wWidth='+window.getWidth()+'&wHeight='+window.getHeight()+'&sWidth='+window.getScrollWidth()+'&sHeight='+window.getScrollHeight())
	$('bg_basket').setStyle('opacity','0.3');
	$('bg_basketText').setStyle('opacity','1');
}
function goRzhevka() {
	//GetBg('GET','/bg_basket.php','model='+id+'&wTop='+window.getScrollTop()+'&wWidth='+window.getWidth()+'&wHeight='+window.getHeight()+'&sWidth='+window.getScrollWidth()+'&sHeight='+window.getScrollHeight())
	//alert(1);
	//echo "document.getElementById('bg_basketText').style.display='block';";

	$('bg_basket').setStyle('top','0');
	$('bg_basket').setStyle('left','0');
	$('bg_basket').setStyle('width',window.getScrollWidth());
	$('bg_basket').setStyle('height',window.getScrollHeight());
	$('bg_basket').setStyle('display','block');
	$('bg_basket').setStyle('opacity','0.3');

	$('bg_basketText2').setStyle('display','block');
	$('bg_basketText2').setStyle('opacity','1');
	$('bg_basketText2').setStyle('top',window.getHeight()/2+window.getScrollTop()-200);
	$('bg_basketText2').setStyle('left',window.getWidth()/2-150);
}


function goCompare(compare,id) {
	GetBg('GET','/bg_compare.php','compareId='+compare+'&modelId='+id+'&wTop='+window.getScrollTop()+'&wWidth='+window.getWidth()+'&wHeight='+window.getHeight()+'&sWidth='+window.getScrollWidth()+'&sHeight='+window.getScrollHeight())
	//GetBg('GET','/bg_basket.php','model='+id+'&wTop='+window.getScrollTop()+'&wWidth='+window.getWidth()+'&wHeight='+window.getHeight()+'&sWidth='+window.getScrollWidth()+'&sHeight='+window.getScrollHeight())
	$('bg_basket').setStyle('opacity','0.3');
	$('bg_basketText').setStyle('opacity','1');
}

function openImg(id) {
	//alert('')
	var img=new Image();
	img.src = '/pic/preview/'+id+'_1.jpg';
	$('idImg').src = img.src
	$$('div.itemImgs').setStyle('border','1px solid #ffffff')
	$('itemImgs'+id).setStyle('border','1px solid #0070c7')
}