



// 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;

}

function openSlideShow(world, slideShow, x, y) {
	popSlideShow = null;
	var defaultX = 434;
	var defaultY = 545;
	
	slideShow = slideShow + "&world="+world;
	
	if(typeof(x) != "undefined") {
		var width  = x;
	} else {
		var width  = defaultX;
	}
	
	if(typeof(y) != "undefined") {
		var height = y;
	} else {
		var height = defaultY;
	}

	var screenWidth		=	(screen.width - width) / 2;
	var screenHeight	=	(screen.height - height) / 2;

	if(typeof(caption) != "undefined") {	url += "&caption="+escape(caption); }
	
	popSlideShow = window.open(slideShow,"popExpand","width="+width+",height="+height+",left="+screenWidth+",top="+screenHeight+",toolbar=no,resizable=no,scrollbars=no,location=no,directories=no,menubar=no");
	
}


var picView;
function openPicView(imgNum)
{
	widthToUse			=	476;
	heighToUse			=	469;
	mainUrl				= "/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				= "/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
}

var picViewcomiccon;
function openPicViewcomiccon2003(imgNum)
{

	var screenWidth		=	(screen.width - 465) / 2;
	var screenHeight	=	(screen.height - 415) / 2;
	mainUrl				= "/community/news/2003/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
}

var picViewgencon;
function openPicViewgencon(imgNum)
{

	var screenWidth		=	(screen.width - 320) / 2;
	var screenHeight	=	(screen.height - 451) / 2;
	mainUrl				= "/community/news/2002/08/gencon/pictureviewer.html?imgNum=" + imgNum;


	picViewgencon = window.open(mainUrl,"gencon_viewer","width=320,height=447,toolbar=no,resizable=no,scrollbars=no,status=no,location=no,directories=no,menubar=no,top="+screenHeight+",left="+screenWidth+"");

	picViewgencon.focus
}

var picViewwondercon03;
function openPicViewwondercon03(imgNum)
{

	var screenWidth		=	(screen.width - 400) / 2;
	var screenHeight	=	(screen.height - 520) / 2;
	mainUrl				= "/community/news/2003/04/wondercon03/pictureviewer.html?imgNum=" + imgNum;


	picViewwondercon03 = window.open(mainUrl,"wondercon03_viewer","width=400,height=520,toolbar=no,resizable=no,scrollbars=no,status=no,location=no,directories=no,menubar=no,top="+screenHeight+",left="+screenWidth+"");

	picViewwondercon03.focus
}

var picViewswweekends;
function openPicViewswweekends(imgNum)
{

	var screenWidth		=	(screen.width - 500) / 2;
	var screenHeight	=	(screen.height - 525) / 2;
	mainUrl				= "/community/news/2003/05/swweekends/pictureviewer.html?imgNum=" + imgNum;


	picViewswweekends = window.open(mainUrl,"swweekends_viewer","width=500,height=525,toolbar=no,resizable=no,scrollbars=no,status=no,location=no,directories=no,menubar=no,top="+screenHeight+",left="+screenWidth+"");

	picViewswweekends.focus
}


var picViewaosw1;
function openPicViewaosw1(imgNum)
{

	var screenWidth		=	(screen.width - 561) / 2;
	var screenHeight	=	(screen.height - 412) / 2;
	mainUrl				= "/community/news/2004/01/aosw1/pictureviewer.html?imgNum=" + imgNum;


	picViewaosw1 = window.open(mainUrl,"aosw1_viewer","width=561,height=412,toolbar=no,resizable=no,scrollbars=no,status=no,location=no,directories=no,menubar=no,top="+screenHeight+",left="+screenWidth+"");

	picViewaosw1.focus
}
