/* Addition to original video.js file */
var newWindow = null;

function closeWin(){
if (newWindow != null){
if(!newWindow.closed)
newWindow.close();
}
}

function popUpWin(url, type, strWidth, strHeight){

closeWin();

if (type == "fullScreen"){
strWidth = screen.availWidth - 10;
strHeight = screen.availHeight - 160;
}

var tools="";
if (type == "standard" || type == "fullScreen") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0";
if (type == "console") tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=100,top=100";
if (type == "consolewithscrollbar") tools = "resizable,toolbar=no,location=no,scrollbars=yes,width="+strWidth+",height="+strHeight+",left=100,top=100";
newWindow = window.open(url, 'newWin', tools);
newWindow.focus();
}

/* End of addition to original video.js file */


function openWin(url, win_width, win_height) {
		
	win_left = (screen.width - win_width) / 2;
	win_top = (screen.height - win_height) / 2;
	
	window.open(url , '', 'width='+win_width+', height='+win_height+', left='+win_left+', top='+win_top+', resizable=0, scrollbars=0');
}

function  Start(page) { 
  OpenWin=this.open(page,"CtrlWindow","toolbar=no,menubar=no,location=no,scrollbars=no,resize=yes");
}

function  pop(page) {  OpenWin=this.open(page,"CtrlWindow","toolbar=no,menubar=no,location=no,scrollbars=yes,resize=yes,width=620,height=500");
}

// Week In Pictures
function  popWIP(page) {   OpenWin=this.open(page,"CtrlWindow","toolbar=no,menubar=no,location=no,scrollbars=no,resize=yes,width=400,height=325");
}
