	window.name = "main";
	
	function launch(newURL, newName, newFeatures, orgName) {
		var remote = open(newURL, newName, newFeatures);
		if (remote.opener == null)
		remote.opener = window;
		remote.opener.name = orgName;
		return remote;
	}
	
	function popup(newURL,newWidth,newHeight) {
		myRemote = launch(newURL, "myRemote", "height="+newHeight+",width="+newWidth+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0", "main");
		setTimeout( myRemote.focus(), 2000 );
	}
	
      
	function download(newURL) {
		
		
		var dimensions = "height=100,innerHeight=100,width=100,innerWidth=100,";
		
		if (window.screen) {
			
			var ah = screen.availHeight - 30;
			var aw = screen.availWidth - 10;
			
			var xc = (aw - 100) / 2;
			var yc = (ah - 100) / 2;
			
			dimensions += ",left=" + xc + ",screenX=" + xc;
			dimensions += ",top=" + yc + ",screenY=" + yc;
		}
		
		myRemote = launch(newURL, "Download", dimensions+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0", "main");
	}
	
	function show_vid( newURL ) {
		
		
		var dimensions = "height=510,innerHeight=600,width=650,innerWidth=600,";
		
		if (window.screen) {
			var ah = screen.availHeight - 30;
			var aw = screen.availWidth - 10;
			
			var xc = (aw - 100) / 2;
			var yc = (ah - 100) / 2;
			
			dimensions += ",left=" + xc + ",screenX=" + xc;
			dimensions += ",top=" + yc + ",screenY=" + yc;
		}
		
		myRemote = launch(newURL, "Video", dimensions+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0", "main");
		
		setTimeout( myRemote.focus(), 2000 );
	}
	
	function changeLink( newURL ){
		
		document.getElementById('moviebox').innerHTML="<embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' SRC='"+newURL+"' name='MediaPlayer1' width='200' height='150' autostart=1 ></embed>";
	}
