



// Swap document.img1.src with img2

function swapImg(img1, img2)
{
	document[img1].src = img2;
}


// Preload img with name imgName

function preloadImg(imgName, img)
{

	var imgName	= new Image();
	imgName.src	= img;

}


var picView;
function openPicView(imgNum)
{
	widthToUse			=	476;
	heighToUse			=	469;
	mainUrl				= "http://www.starwars.com/community/feature/20020503/pictureviewer/pictureviewer.html?imgNum=" + imgNum;

	var screenWidth		=	(screen.width - widthToUse) / 2;
	var screenHeight	=	(screen.height - heighToUse) / 2;

	picView= window.open(mainUrl,"picView","width=476,height=469,toolbar=no,resizable=no,scrollbars=no,status=no,location=no,directories=no,menubar=no,top="+screenHeight+",left="+screenWidth+"");
	
	picView.focus
}


var picViewcomiccon;
function openPicViewcomiccon(imgNum)
{

	var screenWidth		=	(screen.width - 465) / 2;
	var screenHeight	=	(screen.height - 415) / 2;
	mainUrl				= "http://www.starwars.com/community/news/2002/07/comiccon/pictureviewer.html?imgNum=" + imgNum;


	picViewcomiccon = window.open(mainUrl,"comiccon_viewer","width=465,height=415,toolbar=no,resizable=no,scrollbars=no,status=no,location=no,directories=no,menubar=no,top="+screenHeight+",left="+screenWidth+"");

	picViewcomiccon.focus
}