var lastPopUpWindow = null;

function pop(sCase) { 
// close the last pop-up.
	/*
	try {
		lastPopUpWindow.close();
	}catch(e){
	}
	*/

	switch(sCase) {
		case "videoOptions":
			lastPopUpWindow = launchPopUpWindow('cmp/trailer.html?id=trailer&settings=true','trailer',550,500);
			break;
		case "gallery":
			lastPopUpWindow = launchPopUpWindow('gallery.html?photo='+pop.arguments[1],'gallery',748,595);
			break;
		case "wallpaper":
			lastPopUpWindow = launchPopUpWindow('wallpaper.html?id='+pop.arguments[1]+'&width='+pop.arguments[2], 'wallpaper_poster', 850, 550, 1, 1);
			break;
		case "buddyIcons":
			lastPopUpWindow = launchPopUpWindow('buddyIcons.html','buddy_icons',356,520);
			break;
		case "poster":
			lastPopUpWindow = launchPopUpWindow('poster.html','poster',850,950, 1, 1);
			break;
		case "screensaver":
			lastPopUpWindow = launchPopUpWindow('download.html?theFile=' + pop.arguments[1] + pop.arguments[2] + '.zip', 'download', 770, 335);
			break;
		default:
			break;
	}
}

