function collection_change_img(img,psid) {
	var photo_large = document.getElementById("photo_large_td");
	if (document.getElementById("photo_small_1")) {document.getElementById("photo_small_1").className = "photo";}
	if (document.getElementById("photo_small_2")) {document.getElementById("photo_small_2").className = "photo";}
	if (document.getElementById("photo_small_3")) {document.getElementById("photo_small_3").className = "photo";}
	if (document.getElementById("photo_small_4")) {document.getElementById("photo_small_4").className = "photo";}
	document.getElementById("photo_small_"+psid).className = "photo_active";
	photo_large.removeChild(photo_large.firstChild);
	photo_large.innerHTML = '<img src="'+img+'" alt="" />';
}


function smallbasket_close() {
	if (document.getElementById("smallbasketblock")) {
		document.getElementById("smallbasketblock").style.display = "none";
	}
}

function smallbasketposition() {
	if (document.getElementById("smallbasketblock")) {
		document.getElementById("smallbasketblock").style.top = parseInt(document.documentElement.clientHeight) + parseInt(document.documentElement.scrollTop) - parseInt(document.getElementById('smallbasketblock').offsetHeight) - 20 + "px";
	}
}

function smallaction_close() {
	if (document.getElementById("smallactionblock")) {
		document.getElementById("smallactionblock").style.display = "none";
	}
}

function smallactionposition() {
	if (document.getElementById("smallactionblock")) {
		document.getElementById("smallactionblock").style.top = parseInt(document.documentElement.clientHeight) + parseInt(document.documentElement.scrollTop) - parseInt(document.getElementById('smallactionblock').offsetHeight) - 20 + "px";
	}
}

/*

function preloadImages()
{
	var imgs = new Array("/i/menu_item1_active.png","/i/menu_item2_active.png","/i/menu_item3_active.png","/i/menu_item4_active.png","/i/menu_item5_active.png");
	var img = new Array();
	for (var i=0; i<imgs.length; i++) {
		img[img.length] = new Image();
		img[img.length - 1].src = urls[i];
	}
}


if (window.addEventListener) {
	window.addEventListener("load", preloadImages), false);
} else if (window.attachEvent) {
	window.attachEvent("onload", preloadImages);
}

*/

if (window.addEventListener) {
	window.addEventListener("load", smallbasketposition, false);
} else if (window.attachEvent) {
	window.attachEvent("onload", smallbasketposition);
}

if (window.addEventListener) {
	window.addEventListener("scroll", smallbasketposition, false);
} else if (window.attachEvent) {
	window.attachEvent("onscroll", smallbasketposition);
}

if (window.addEventListener) {
	window.addEventListener("load", smallactionposition, false);
} else if (window.attachEvent) {
	window.attachEvent("onload", smallactionposition);
}

if (window.addEventListener) {
	window.addEventListener("scroll", smallactionposition, false);
} else if (window.attachEvent) {
	window.attachEvent("onscroll", smallactionposition);
}