var lastPopUpWindow = null;

function pop(sCase) {
	switch(sCase) {
		case "register":
			launchPopUpWindow("http://72.51.44.62/focusfeatures/focus_registration/index.phtml","focusReg",410,427);
			break;
		case "video":
			// myClip 				- the "code" for the clip
			// mySize 	(large|small)	- the chosen clip size
			// myFormat	(wmv|mov)	- the chosen format
			// myWidth				- the pixel width of the video file
			// myHeight				- the pixel height of the video file
			var objWinWidth = 0;
			var objWinHeight = 0;
			var myClip = pop.arguments[1];
			var myFormat = pop.arguments[2];
			var mySize = pop.arguments[3];
			var myWidth;
			var myHeight;
			switch(myClip) {
				case "trailer":
					if( mySize == 'large' )
					{
						myWidth = 480;
						myHeight = 260;
					}
					else
					{
						myWidth = 320;
						myHeight = 172;
					}
					break;
				case "seating":
					if( mySize == 'large' )
					{
						myWidth = 480;
						myHeight = 202;
					}
					else
					{
						myWidth = 320;
						myHeight = 134;
					}
					break;
				case "epk1":
				case "epk2":
				case "epk3":
				case "epk4":
				case "epk5":
				case "epk6":
				case "epk7":
					if( mySize == 'large' )
					{
						myWidth = 480;
						myHeight = 202;
					}
					else
					{
						myWidth = 320;
						myHeight = 136;
					}
					break;
				case "minotseat":
				case "cunninghamseat":
					if( mySize == 'large' )
					{
						myWidth = 480;
						myHeight = 360;
					}
					else
					{
						myWidth = 320;
						myHeight = 240;
					}
					break;
			}
			switch(myFormat) {
				case "mov" : {
					objWinWidth = myWidth;
					objWinHeight = (myHeight + 16);
				}
					break;
				case "wmv" :{
					if (navigator.appVersion.indexOf('Mac') != -1) {
						window.location.href = "http://www.focusfeatures.com/clips/evening/"+myClip+"-"+myWidth+"x"+myHeight+"."+myFormat;
						return false;
					} else {
						objWinWidth = myWidth;
						objWinHeight = (myHeight + 64);
					}
				}
				break;
			}
			launchPopUpWindow("http://www.focusfeatures.com/viewer.php?f=evening&c="+myClip+"&ext="+myFormat+"&w="+myWidth+"&h="+myHeight, myClip, objWinWidth, objWinHeight);
			break;
	}
}
