var printClicked = false;

function printpage(mode)
{
	if (typeof(printwindow)=='object')
	{
		if (printwindow.closed)
		{
			printClicked = false;
		}
		else
		{
			printwindow.focus();
			return;
		}
	}

	if (printClicked == false)
	{
		var w = 568, h = 400;
		var ww = 480, wh = 340, leftPos = null, topPos = null; 
		IE=(document.all)?true:false; 
		var wh = (IE)?document.body.clientHeight : window.innerHeight; 
		var ww = (IE)?document.body.clientWidth : window.innerWidth; 
		if (top.screen)
		{ 
			if (screen.width)
			{ 
	    		leftPos = Math.round((ww-w-10)/2); 
	    		topPos = Math.round((wh-h-29)/2); 
	  		}
	  		else
	  		{ 
	    		leftPos = 50 
	    		topPos = 50 
	  		}
		}
		printwindow = window.open('', 'printwindow', 'scrollbars,height=' + h + ',width=' + w + ',top=' + topPos + ',left=' + leftPos + '') 
		printwindow.focus();
		
		if (mode == "print")
			document.printform.action = "/print.asp";
		else
			document.printform.action = "/printbasket_choose.asp";
			
		document.printform.content.value = document.all.printcontent.innerHTML;
		document.printform.submit();

		printClicked = true;

		return;
	}

}


function PopWin(url,w,h)
{
	var ww = 480, wh = 340, leftPos = null, topPos = null; 
	IE=(document.all)?true:false; 
	var wh = (IE)?document.body.clientHeight : window.innerHeight; 
	var ww = (IE)?document.body.clientWidth : window.innerWidth; 
	if (top.screen)
	{ 
		if (screen.width)
		{ 
    		leftPos = Math.round((ww-w-10)/2); 
    		topPos = Math.round((wh-h-29)/2); 
  		}
  		else
  		{ 
    		leftPos = 50 
    		topPos = 50 
  		}
	}
	popupWin = window.open(url, 'popup', 'scrollbars,height=' + h + ',width=' + w + ',top=' + topPos + ',left=' + leftPos + '') 
}

function swapOver(idE,i)
{
	if (document.all) {
		eval('document.all[\''+ idE +'\']').src = arrImageOver[i];
	}
	else
	{
		document.getElementById(idE).src = arrImageOver[i];
	}
}

function swapOut(idE,imgUrl)
{
	if (document.all) {
		eval('document.all[\''+ idE +'\']').src = imgUrl;
	}
	else
	{
		document.getElementById(idE).src = imgUrl;
	}
}
