var prescription = 0;

function PreLoader() {
mmu0off = new Image;
mmu0off.src = "img/nv/mmu.0.0.gif";
mmu0on = new Image;
mmu0on.src = "img/nv/mmu.0.1.gif";
mmu1off = new Image;
mmu1off.src = "img/nv/mmu.1.0.gif";
mmu1on = new Image;
mmu1on.src = "img/nv/mmu.1.1.gif";
mmu2off = new Image;
mmu2off.src = "img/nv/mmu.2.0.gif";
mmu2on = new Image;
mmu2on.src = "img/nv/mmu.2.1.gif";
mmu3off = new Image;
mmu3off.src = "img/nv/mmu.3.0.gif";
mmu3on = new Image;
mmu3on.src = "img/nv/mmu.3.1.gif";
mmu4off = new Image;
mmu4off.src = "img/nv/mmu.4.0.gif";
mmu4on = new Image;
mmu4on.src = "img/nv/mmu.4.1.gif";
mmu5off = new Image;
mmu5off.src = "img/nv/mmu.5.0.gif";
mmu5on = new Image;
mmu5on.src = "img/nv/mmu.5.1.gif";
}

function mmuact(imgName) {
	imgOn="img/bt."+imgName+".on.gif";
	document [imgName].src=imgOn;
}
function mmuinact(imgName) {
	imgOff="img/bt."+imgName+".off.gif";
	document [imgName].src=imgOff;
}

function showpic(image) {
	var tmp="ms.showpic.php?image="+image;
	msgWindow=window.open(tmp,"ShowPic","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=50,height=50");
	//msgWindow.moveTo(30,30);
	setTimeout("msgWindow.focus()",100);
	//setTimeout("msgWindow.document.title='Image Viewer Test'",1000);
}

function CartBigPre() {
	if(document.addtocart.prescription.value == 1) {
		document.cartbigpre.src="img/cart.big.pre.off.gif";
		document.addtocart.prescription.value = 0;
	}
	else {
		document.cartbigpre.src="img/cart.big.pre.on.gif";
		document.addtocart.prescription.value = 1;
	}
}

function CartGoggleBigPre() {
	if(document.addtocart.prescription.value == 1) {
		document.cartbigpre.src="img/cart.goggle.big.pre.off.gif";
		document.addtocart.prescription.value = 0;
	}
	else {
		document.cartbigpre.src="img/cart.goggle.big.pre.on.gif";
		document.addtocart.prescription.value = 1;
	}
}

function CartBigSmall(cnt) {
	if(document.addtocartsmall.prescription.value == 1) {
		document.addtocartsmall.prescription.value = 0;
		document.addtocart.prescription.value = 0;
		document.cartbigpre.src="img/cart.big.pre.off.gif";
		for(i=1;i<=cnt;i++) {
			img="smallcart"+i;
			document [img].src="img/cart.small.pre.off.gif";
		}
	}
	else {
		document.addtocartsmall.prescription.value = 1;
		document.addtocart.prescription.value = 1;
		document.cartbigpre.src="img/cart.big.pre.on.gif";
		for(i=1;i<=cnt;i++) {
			img="smallcart"+i;
			document [img].src="img/cart.small.pre.on.gif";
		}
	}
}

function CartGoggleBigSmall(cnt) {
	if(document.addtocartsmall.prescription.value == 1) {
		document.addtocartsmall.prescription.value = 0;
		document.addtocart.prescription.value = 0;
		document.cartbigpre.src="img/cart.goggle.big.pre.off.gif";
		for(i=1;i<=cnt;i++) {
			img="smallcart"+i;
			document [img].src="img/cart.goggle.small.pre.off.gif";
		}
	}
	else {
		document.addtocartsmall.prescription.value = 1;
		document.addtocart.prescription.value = 1;
		document.cartbigpre.src="img/cart.goggle.big.pre.on.gif";
		for(i=1;i<=cnt;i++) {
			img="smallcart"+i;
			document [img].src="img/cart.goggle.small.pre.on.gif";
		}
	}
}

function imgact(imgName,fileName) {
	document [imgName].src=fileName;
}

function kadabra(zap)
{
	if(document.getElementById) {
		var abra = document.getElementById(zap).style;
		if (abra.display == "block")
			abra.display = "none";
		else
			abra.display = "block"
		return false
	}
	else
		return true
}

function kadabraCC(zap)
{
	//alert(zap);

	if (document.getElementById)
	{
		var abra = document.getElementById(zap).style;
		var babra = document.proceed.cctype.options[document.proceed.cctype.selectedIndex].value;
		
		if(babra == "Switch" || babra == "Solo")
			abra.display = "block"
		else
			abra.display = "none"
		
		return false
	}
	else
		return true
}
