function pop(sCase) {
//alert(sCase);
	switch(sCase) {
		case "deeplink":
			//launchPopUpWindow("registration_static.html", "registration", 450, 600, 1, 1);
			switch(pop.arguments[1]){
				case 'hunt':
					window.open('index.html?deeplink=hunt','Hunt');
				break;
			}
		break;
		case "privacy":
			launchPopUpWindow("privacypolicy.html", "privacy", 425, 645, 1, 1);
		break;
		case "poster":
			launchPopUpWindow("posterFrame.html", "poster", 770, 550, 1, 1);
		break;
		case "trailer":
			//launchPopUpWindow("privacypolicy.html", "trailer", 425, 645, 1, 1);
			window.open('http://movies.yahoo.com/feature/missionimpossible3.html','Trailer');
		break;
		case "agent":
			launchPopUpWindow("registration.html", "registration", 450, 600, 1, 1);
		break;
		case "hunt":
			window.open('http://hunt.missionimpossible.com','Hunt');
		break;
		case "forgetPassword":
			launchPopUpWindow("http://mailchute.paramountmovies.com/mi3_hunt/forgot.cgi", "forgot", 450, 425, 1, 1);
		break;
		case "register":
			//launchPopUpWindow("registration_static.html", "registration", 450, 600, 1, 1);
			launchPopUpWindow("registration.html", "registration", 500, 600, 1, 1);
		break;
		case "rules" :
			launchPopUpWindow("hunt_rules.html", "huntrules", 450, 600, 1, 1);
		break;
		case "staf":
			launchPopUpWindow("http://mailchute.paramountmovies.com/mi3_hunt/staf.cgi", "staf", 480, 500, 1, 1);
		break;
		case "notice":
			launchPopUpWindow("hunt_notice.html", "Hunt", 425, 425, 1, 1);
		break;
		
		case "superbowl":
			window.open('http://www.apple.com/trailers/paramount/missionimpossibleiii/','superbowl');
		break;
		case "terms":
			launchPopUpWindow("termsofuse.html", "terms", 425, 645, 1, 1);
		break;
		case "webmaster":
			launchPopUpWindow("http://webmaster.missionimpossible.com/register/", "webmaster", 550, 548, 1);
		break;
		case "internationReleaseDates":
			launchPopUpWindow("internationReleaseDates.html", "internationReleaseDates", 470, 630, 1);
		break;
		case "buddyIcons":
			launchPopUpWindow("buddyicons.html", "buddyicons", 384, 400);
		break;
		case "chat":
			launchPopUpWindow("chat.html", "chat", 550, 505);
		break;
		case "wallpaper":
			if (pop.arguments[2]==1280) {
				iHeightLocal = 1024;
			} else {
				iHeightLocal = pop.arguments[2]/4*3;
			}
			launchPopUpWindow('wallpaper.html?iNum='+pop.arguments[1]+'&iWidth='+pop.arguments[2]+'&iHeight='+iHeightLocal, 'wallpaper'+pop.arguments[2], pop.arguments[2], iHeightLocal+50);
			var myTrackPath = "/downloads/wallpapers/"+pop.arguments[1]+"/"+pop.arguments[2]+"x"+iHeightLocal;
			urchinTracker(myTrackPath);
		break;
		case "ipodvideo":
			var myDownloadPath = '';
			switch(pop.arguments[1]){
				case "teaser":
					myDownloadPath = 'http://movies.apple.com/movies/paramount/mission_impossible_3/mission_impossible_3-tlr1_p320.m4v.zip';
					urchinTracker("/video/download/ipod/teaser");
				break;
				case "tvspot1":
					myDownloadPath = 'http://movies.apple.com/movies/paramount/mission_impossible_3/mission_impossible_3-sb_p320.m4v.zip';
					urchinTracker("/video/download/ipod/tvspot1");
				break;
				case "tvspot2":
					myDownloadPath = 'http://www.missionimpossible.com/streaming_video/mi3_tvspot_ipod.zip';
					urchinTracker("/video/download/ipod/tvspot2");
				break;
				case "tvspot3":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_tv_spot_3_ipod.zip';
					urchinTracker("/video/download/ipod/tvspot3");
				break;
				case "tvspot4":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_tv_spot_4_ipod.zip';
					urchinTracker("/video/download/ipod/tvspot4");
				break;
				case "bts1":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_featurette_1_ipod.zip';
					urchinTracker("/video/download/ipod/bts1");
				break;
				case "bts2":
					myDownloadPath = 'http://missionimpossible.com/public/video_files/hoffman_featurette_ipod.zip';
					urchinTracker("/video/download/ipod/bts2");
				break;
				case "bts3":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_stunt_featurette_ipod.zip';
					urchinTracker("/video/download/ipod/bts3");
				break;
				case "bts4":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_featurette_4_ipod.zip';
					urchinTracker("/video/download/ipod/bts4");
				break;
				case "bts5":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_featurette_5_ipod.zip';
					urchinTracker("/video/download/ipod/bts5");
				break;
				case "japan":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/japan_trailer_ipod.zip';
					urchinTracker("/video/download/ipod/japan");
				break;
				case "theatrical":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_theatrical_trailer_ipod.zip';
					urchinTracker("/video/download/ipod/theatrical");
				break;
			}
			if(myDownloadPath != ''){
				launchPopUpWindow('download.html?theFile='+myDownloadPath+'&theFormat=IPod', 'download', 550, 250);
			}
		break;
		case "pspvideo":
			var myDownloadPath = '';
			switch(pop.arguments[1]){
				case "teaser":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_teaser_trailer_psp.zip';
					urchinTracker("/video/download/psp/teaser");
				break;
				case "tvspot1":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_tvspot1_psp.zip';
					urchinTracker("/video/download/psp/tvspot1");
				break;
				case "tvspot2":
					myDownloadPath = 'http://www.missionimpossible.com/streaming_video/mi3_tvspot_psp.zip';
					urchinTracker("/video/download/psp/tvspot2");
				break;
				case "tvspot3":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_tv_spot_3_psp.zip';
					urchinTracker("/video/download/psp/tvspot3");
				break;
				case "tvspot4":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_tv_spot_4_psp.zip';
					urchinTracker("/video/download/psp/tvspot4");
				break;
				case "bts1":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_featurette1_psp.zip';
					urchinTracker("/video/download/psp/bts1");
				break;
				case "bts2":
					myDownloadPath = 'http://missionimpossible.com/public/video_files/hoffman_featurette_psp.zip';
					urchinTracker("/video/download/psp/bts2");
				break;
				case "bts3":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_stunt_featurette_psp.zip';
					urchinTracker("/video/download/psp/bts3");
				break;
				case "bts4":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_featurette_4_psp.zip';
					urchinTracker("/video/download/psp/bts4");
				break;
				case "bts5":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_featurette_5_psp.zip';
					urchinTracker("/video/download/psp/bts5");
				break;
				case "japan":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/japan_trailer_psp.zip';
					urchinTracker("/video/download/psp/japan");
				break;
				case "theatrical":
					myDownloadPath = 'http://www.missionimpossible.com/public/video_files/mi3_theatrical_trailer_psp.zip';
					urchinTracker("/video/download/psp/theatrical");
				break;
			}
			if(myDownloadPath != ''){
				launchPopUpWindow('download.html?theFile='+myDownloadPath+'&theFormat=PSP', 'download', 550, 250);
			}
		break;
		case "filmRatings":
			window.open('http://www.filmratings.com','FilmRatings');
		break;
		case "parentalGuide":
			window.open('http://www.parentalguide.org','ParentalGuide');
		break;
		case "mpaa":
			window.open('http://www.mpaa.org','MPAA');
		break;
		case "privacyPolicy":
			launchPopUpWindow("privacypolicy.html", "privacy", 425, 645, 1, 1);
		break;
		case "termsOfUse":
			launchPopUpWindow("termsofuse.html", "terms", 425, 645, 1, 1);
		break;
		case "dvdPurchase":
			switch(pop.arguments[1]){
				case "box":
					window.open('http://www.amazon.com/gp/product/B000EQ5TSS/ref=pd_bbs_null_1/002-2519074-7064862?v=glance&n=130','MissionImpossible');
				break;
				case "mi1":
					window.open('http://www.amazon.com/gp/product/B000EGDB10/ref=imdbpov_dvd_0/002-2519074-7064862?%5Fencoding=UTF8&v=glance&n=130','MissionImpossible');
				break;
				case "mi2":
					//window.open('http://www.amazon.com/gp/product/B00003CXDG/ref=pd_bxgy_img_b/002-2519074-7064862?%5Fencoding=UTF8&v=glance&n=130','MissionImpossible');
					window.open('http://www.amazon.com/exec/obidos/tg/detail/-/B000EQ5TSI/','MissionImpossible');
				break;
			}
		break;
	}
}

//function urchinTracker(){
//}


function handleDownload(filePath) {
	launchPopUpWindow('download.html?theFile='+filePath, 'download', 770, 335);
}