
function new_win(event,aSrc){
	picLoad = aSrc;
	aPic = document.getElementById("picFoto");
	aPic = new Image();
	posX = event.clientX;
	posY = event.clientY;
	inter = setTimeout ("showPic()",100);
}

function showPic () {
	aDiv = document.getElementById("divFoto");
	aPic = document.getElementById("picFoto");
	aPic.src = picLoad;
	aPic.onload = function () {
		clearTimeout (inter);
		aDiv.style.top = posY + window.document.body.scrollTop - 200;
		nav = navigator.appName;
		if (nav != "Netscape") {
			var wd = document.body.clientWidth;
		} else {
			var wd = window.innerWidth;
		}
		if (posX > wd / 2) {
			aDiv.style.left = wd / 2 + 350 - aPic.width;
		} else {
			aDiv.style.left = posX - aPic.width / 3;
		}
	}
	inter = setTimeout ("showPic()",1000);
}

function hideImg () {
	document.getElementById("divFoto").style.left = -2000;
	document.getElementById("divFoto").style.top = -2000;
	clearTimeout (inter);
	count = 0;
}


// === Open Image ===
function openImage2(id,w,h){
	if(oi!=null && !oi.closed) oi.close();
	var oi=window.open('/image2.php?id='+id,'openImage','resizable=no,menubar=no,status=no,scrollbars=no,width='+w+',height='+h+',top=10,left=10');
	oi.focus();
return false;
}

// === Reg Form ===
function sendForm(){
	document.regForm.submit();
return false;
}

// === Add Basket ===
function addBasket(productId){
	location.href='/basket/add.php?id='+productId+'&count=1&url='+location.href;
return false;
}

// === Add Postpone ===
function addPostpone(productId){
	location.href='/basket/add2.php?id='+productId+'&count=1&url='+location.href;
return false;
}