// Pop up a new window.
function popup(filename, width, height, scrollbars, resize) {
 var etcParams = ",directories=0,location=0,menubar=0,resizable="+(resize ? "1" : "0")+",status=0,toolbar=0,scrollbars=" + (scrollbars ? "1" : "0");
 var popup = window.open(filename, "_blank", "width=" + width + ",height=" + height + etcParams);
 popup.focus();
}
function getIcons()
{
	popup("downloadables/buddyicons_inst.html", 360,520, 0, 0);
}
function getScreensaver(os)
{
	var h;
	switch(os)
	{
		case "win":h=360;
				break;
		case "os9":h=420;
				break;
		case "osx":h=405;
				break;
		default:h=405;
		
	}
	popup("downloadables/screensaver_inst_"+os+".html", 364,h, 0, 0);
}
function openWindow2(url,winName,w,h,resizedata) {
	leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	topPosition = (screen.height) ? (screen.height-h)/2 : 0;
	
	var windowprops = 'width=' + w + ',height=' + h + ',top='+ topPosition +',left='+ leftPosition+',resizable=' + resizedata +',toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no';
	var popup = window.open(url,winName,windowprops);
	popup.focus();
}

function popup2(filename, width, height, scrollbars) {
 var etcParams = ",directories=0,location=0,menubar=0,resizable=1,status=0,toolbar=0,scrollbars=" + (scrollbars ? "1" : "0");
 var popup = window.open(filename, "_blank", "width=" + width + ",height=" + height + etcParams);
 popup.focus();
}
/*
quicktime LARGE = qt_3000k.html
popup should be - 700x500

quicktime MEDIUM = qt_1500k.html
popup should be - 540x450

quicktime SMALL = qt_300k.html
popup should be - 540x370

windows media LARGE = wm_300k.html
popup should be - 540x410

windows media MEDIUM = wm_100k.html
popup should be - 540x370

windows media SMALL = wm_56k.html
popup should be - 540x370

real SMALL = r_56k.html
popup should be - 540x330

real MEDIUM = r_100k.html
popup should be - 540x330

real LARGE = r_300k.html
popup should be - 540x350*/

function launch_clip(sz,ft,id)
{
	var h_size;
	var w_size;

	switch(sz)
	{
		//alert(sz +"  &=  "+ft+"   &=  "+id);
		case "300":
			h_size=465;
			w_size=540;
			 break;
		case "1500":
			h_size=510;
			w_size=540;
			break;
		case "56":
			h_size=460;
			w_size=530;
			 break;
		
		default:
			h_size=400;
			w_size=400;
			break;
	}

 	openWindow2("clips_popup/"+ft+"_"+id+"_"+sz+"k.html","preview",w_size,h_size,1);
}
function getPreview(f,sz) 
{
	switch(f)
	{
		case "win":
			 launchWM(sz);
			 break;
		case "qt":
			 launchQT(sz);
			break;
		case "rl":
			 launchRL(sz);
			break;
		default:
			 launchQT(sz);
			break;
		
	}
}
function launchQT(sz)
{
	switch(sz)
	{
		case "sm":
			 openWindow2("video/qt_300k.html","preview",540,450);
			 break;
		case "med":
			 openWindow2("video/qt_1500k.html","preview",540,450);
			break;
		case "lg":
			 openWindow2("video/qt_3000k.html","preview",700,500);
			break;
		default:
			 openWindow2("video/qt_300k.html","preview",540,450);
			break;
		
		
		
	}
}
function launchWM(sz)
{
	switch(sz)
	{
		case "sm":
			 openWindow2("video/wm_56k.html","preview",540,410);
			 break;
		case "med":
			 openWindow2("video/wm_100k.html","preview",540,410);
			break;
		case "lg":
			 openWindow2("video/wm_300k.html","preview",540,410);
			break;
		default:
			 openWindow2("video/wm_100k.html","preview",540,410);
			break;
		
		
	}
}
function launchRL(sz)
{
	switch(sz)
	{
		case "sm":
			 openWindow2("video/r_56k.html","preview",540,350);
			 break;
		case "med":
			 openWindow2("video/r_100k.html","preview",540,350);
			break;
		case "lg":
			 openWindow2("video/r_300k.html","preview",540,350);
			break;
		default:
			 openWindow2("video/r_100k.html","preview",540,350);
			break;
		
	}
}
   
function openAmazon(url){
win =window.open('http://touchstone.movies.go.com/global/disclaimer/index.html?newURL=www.amazon.com/exec/obidos/ASIN/B000244GSQ/hollywoodreco-20/104-6951708-1498365', 'disclaimer','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=370,height=210');
}


