var URLstr;
var popUpWin=0;
var newWindow=0;

function videoPop2(URLstr, vidWidth, vidHeight, videoFile){
if(vidHeight>screen.height-50){
	vidHeight=(screen.height-50);
	bars="yes";
	}
	else{
	bars="no";
	}
  if(popUpWin){
    if(!popUpWin.closed){
	 popUpWin.close();
	 videoPop2(URLstr, vidWidth, vidHeight, videoFile);
	 popUpWin.focus();
	 }
  }
  popUpWin = open(URLstr,'Video','toolbar=no,location=no,directories=no,status=default,menubar=no,scrollbars='+bars+',resizable=no,width='+vidWidth+',height='+vidHeight+'');
   popUpWin.focus();
	}

<!--
// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 3.0.2  

function videoPop(videoFile, vidWidth, vidHeight, alt,bgcolor,hugger,hugMargin) {
	
	if (bgcolor=="") {
		bgcolor="#FFFFFF";
	}
	
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;

	if(w<740){
	  var lift=0.90;
	}
	if(w>=740 & w<835){
	  var lift=0.91;
	}
	if(w>=835){
	  var lift=0.93;
	}
	if (vidWidth>w){	
	  byFactor = w / vidWidth;			
	  vidWidth = w;
	  vidHeight = vidHeight * byFactor;
	}
	if (vidHeight>h-adj){
	  byFactor = h / vidHeight;
	  vidWidth = (vidWidth * byFactor);
	  vidHeight = h; 
	}
	   
	var scrWidth = w-adj;
	var scrHeight = (h*lift)-adj;

	if (vidHeight>scrHeight){
  	  vidHeight=vidHeight*lift;
	  vidWidth=vidWidth*lift;
	}

	var posLeft=0;
	var posTop=0;

	if (hugger == "hug image"){
	  if (hugMargin == ""){
	    hugMargin = 0;
	  }
	  var scrHeightTemp = vidHeight - 0 + 2*hugMargin;
	  if (scrHeightTemp < scrHeight) {
		scrHeight = scrHeightTemp;
	  } 
	  var scrWidthTemp = vidWidth - 0 + 2*hugMargin;
	  if (scrWidthTemp < scrWidth) {
		scrWidth = scrWidthTemp;
	  }
	  
	  if (scrHeight<100){scrHeight=100;}
	  if (scrWidth<100){scrWidth=100;}

	  posTop =  ((h-(scrHeight/lift)-adj)/2);
	  posLeft = ((w-(scrWidth)-adj)/2);
 	}

	if (vidHeight > (h*lift)-adj || vidWidth > w-adj){
		vidHeight=vidHeight-adj;
		vidWidth=vidWidth-adj;
	}
	posTop = parseInt(posTop);
	posLeft = parseInt(posLeft);		
	scrWidth = parseInt(scrWidth); 
	scrHeight = parseInt(scrHeight);
	
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1 || agt.indexOf("safari") !=-1){
	 
	 	 videoPop2(videoFile, vidWidth, vidHeight, videoFile);
	  
		} 
	else {
		if(newWindow){
			if(!newWindow.closed){
				newWindow.close();
				videoPop(videoFile, vidWidth, vidHeight, alt,bgcolor,hugger,hugMargin);
			}
		}
		newWindow = open("videoWindow.htm","Video","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
		newWindow.document.open();
		newWindow.document.write('<html>\n<title>'+alt+'</title>\n<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+'>\n');  
		newWindow.document.write('<table width='+vidWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' >\n<tr>\n<td align="center" valign="middle">\n');
		newWindow.document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width='+vidWidth+' height='+vidHeight+'>\n');
		newWindow.document.write('\t<param name="src" value="'+videoFile+'">\n\t<param name="autoStart" value="true">\n\t<param name="cache" value="false">\n\t<param name="codebase" value="www.apple.com/qtactivex/qtplugin.cab">\n\t<param name="controller" value="true">\n\t<param name="kioskmode" value="true">\n\t<param name="target" value="quicktimeplayer">\n');
		newWindow.document.write('<embed src="'+videoFile+'" \n\twidth="'+vidWidth+'" height="'+vidHeight+'" \n\tpluginspage="www.apple.com/quicktime/download"\n\tautostart="true" \n\tkioskmode="true" \n\tcontroller="true" \n\tcache="false"\n\tscale="tofit"\n>\n</embed>\n</object>\n'); 
		newWindow.document.write('</td>\n</tr>\n</table>\n</body>\n</html>');
		newWindow.document.close();
		newWindow.focus();
		windowCnt=1;
		
	}
}
//-->