//Action Tag Stuff - Required
var TrackTag = "http://switch.atdmt.com/action/"
function GetActionTag(URL){ 
	if (GetActionTag) { 
        document.action_tag.src = TrackTag + URL;
	}
}

function pop(sCase) {
	//alert(sCase);
	switch(sCase) {
		

//main shell
		case "orderNow":
			window.open("http://go-disneyshopping.com/InvincibleWSDVD");
			GetActionTag("061212_Invincible_OrderNow");
			doTracking ("ORDR_NOW");
			break;
		case "nfl":
			popup('http://www.nfl.com', 770, 700, 'win', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes');
		break;
//footer
		case "mpaa":
			popup('http://www.mpaa.com', 770, 700, 'win', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes');
		break;
		case "parentalGuide":
			popup('http://www.parentalguide.org', 770, 700, 'win', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes');
		break;
		case "filmRatings":
			popup('http://www.filmratings.com', 770, 700, 'win', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes');
		break;
//trailer
		case "trailer":
			popup('trailer.html', 770, 700, 'win', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes');
		break;
		
		case "wallpaper":
		var iWidth=pop.arguments[2];
		var iNum = pop.arguments[1];
		if (iWidth == 1280){
			iHeight = 1024;
		} else {
			var iHeight = iWidth/4*3;
		}
		var myHeight = iHeight+175;
		var myWidth = iWidth+30;
//		popup("wallpapers.html?iNum=0"+iNum+"&width="+iWidth+"&height="+iHeight, myWidth, myHeight, 'wallpaper'+myWidth, 'yes', 'no', 'yes', 'no', 'no', 'no');
window.open("wallpapers.html?iNum=0"+iNum+"&width="+iWidth+"&height="+iHeight,'wallpaper','scrollbars=yes,width=994,height=720')
	break;
		case "buddyicons":
			popup('buddyicons.html', 344, 520, 'win', 'no', 'no', 'no', 'no', 'no', 'no');
		break;
		case "opentryouts":
			popup('tryouts.html', 688, 600, 'win', 'no', 'no', 'no', 'no', 'no', 'no');
		break;
		case "playbook":
			doTracking("playbook");
			popup('interactiveplaybook/index.html', 659, 600, 'win', 'no', 'no', 'no', 'no', 'no', 'no');
		break;
		case "playbookHome":
			doTracking("playbook+home");
			popup('interactiveplaybook/index.html', 659, 600, 'win', 'no', 'no', 'no', 'no', 'no', 'no');
		break;
// about
		case "prodnotesPdf":
			doTracking("prod+notes+pdf");
//			popup('download.html?theFile=assets/downloads/prodnotes/invincible_prodnotes.pdf', 770, 335, 'win', 'no', 'no', 'no', 'no', 'no', 'no');
			window.open('http://adisney.go.com/disneypictures/invincible/assets/downloads/prodnotes/invincible_prodnotes.pdf','pdf');
		break;

	
	}
}

function popup( url, w, h, windowName, r, st, s, l, m, t) {
	try {
		win.close();
	}catch(e){		
	}
	win = window.open(url, windowName, 'height=' +h+ ', width=' +w+ ', resizable=' +r+ ', status= ' +st+ ', scrollbars=' +s+ ', location=' +l+ ', menubar=' +m+  ', toolbar= ' +t+ ', left=5, top=5');
	win.focus();		
}