var lastPopUpWindow = null;

function pop(sCase) {
	switch(sCase) {
		// HOME section
		case "textonly_orderNow":
		case "orderNow":
		case "orderDVD":
			window.open('http://transfer.go.com/cgi/transfer.dll?name=23303&SOURCE=23303&srvc=store&goto=http://disneyshopping.go.com/webapp/wcs/stores/servlet/DSIProductDisplay?catalogId=10002&storeId=10051&productId=1229134&langId=-1&categoryId=13678&CMP=OTL-TWDC_BVHE&att=BVHE', 'ecom');
			doTracking("buynow_dvd");
		break;
		case "orderBluray":
			window.open('http://transfer.go.com/cgi/transfer.dll?name=23303&SOURCE=23303&srvc=store&goto=http://disneyshopping.go.com/webapp/wcs/stores/servlet/DSIProductDisplay?catalogId=10002&storeId=10051&productId=1229136&langId=-1&categoryId=13678&CMP=OTL-TWDC_BVHE&att=BVHE', 'ecom');
			doTracking("buynow_bluray");
		break;
		case "textonly_trailer":
			var url="http://www.totaleclips.com/player/splash.aspx?clipid=e39509&custid=3&playerid=2";
			lastPopUpWindow = launchPopUpWindow(url,"trailer",340,480);
			doTracking("trailer");
		break;
		
		// You Might Also Like...
			case "DMR":
				//location.replace('http://disney.go.com/disneymovierewards/','YMAL');
				location.href="http://disney.go.com/disneymovierewards/";
				doTracking("disney_movie_rewards")
				break;
			case "enchanted":
				//location.replace('http://disney.go.com/disneyvideos/liveaction/enchanted/','YMAL');
				location.href="http://disney.go.com/disneyvideos/liveaction/enchanted/";
				doTracking("synergy_enchanted");
			break;
			case "gamePlan":
				//location.replace('http://disney.go.com/disneyvideos/liveaction/thegameplan/','YMAL');
				location.href="http://disney.go.com/disneyvideos/liveaction/thegameplan/";
				doTracking("synergy_gameplan");
			break;
			case "hannah":
				//location.replace('http://disney.go.com/disneyvideos/liveaction/hannahmontana/','YMAL');
				location.href="http://disney.go.com/disneyvideos/liveaction/hannahmontana/";
				doTracking("synergy_hannah");
			break;
		
		//[About] THE FILM section

		//GALLERY section

		//VIDEO section

		//DOWNLOADS section
		case "wallpaper":
			var width = Number(pop.arguments[2]);
			if(!isNaN(width) && (width!=800) && (width!=1024) && (width!=1280) && (width!=1680) && (width!=1920)) {
	width = 800;
			}
			var height = width/4*3;
			switch(width) {
				case 1280:
					height = 1024;
				break;
				case 1680:
					height = 1050;
				break;
				case 1920:
					height = 1200;
				break;
			}
			lastPopUpWindow = launchPopUpWindow('wallpaper.html?id='+pop.arguments[1]+'&width='+width, 'wallpaper_'+width, width+20, height, 1, true);
		break;
		case "buddyicons":
			lastPopUpWindow = launchPopUpWindow('buddyicons.html', 'buddyicons', 380, 475);
		break;
		case"emailSignature":
			lastPopUpWindow=launchPopUpWindow("download.html?theFile=assets/downloads/CRT_EmailSignature.zip","poster",550,335);
			doTracking("Email_Signature");
		break;

		//GAMES section
		case "pigOut":
			lastPopUpWindow = launchPopUpWindow('feed_pig.html', 'pigOut', 700, 550);
			doTracking("Pig_Out");
		break;
		case "superSneak":
			lastPopUpWindow = launchPopUpWindow('sneak.html', 'pigOut', 700, 550);
			doTracking("Super_Sneak");
		break;

		
	}
}