var newwindow;

function close() {
 if (newwindow) {
  newwindow.close();
 }
}

function tour(url, title) {

 newwindow=window.open(url,'videoTour','height=348,width=344,left=200,top=200,resizable=yes,scrollbars=no,toolbar=no,status=no');
 if (window.focus) {
   newwindow.focus();
 }

 newwindow.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
 newwindow.document.writeln('<html xmlns="http://www.w3.org/1999/xhtml">');
 newwindow.document.writeln('<head>');
 newwindow.document.writeln('<link rel="stylesheet" href="/custom/styles/smc.css"/>');
 newwindow.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>');
 newwindow.document.writeln('<title>' + title + '</title>');
 newwindow.document.writeln('</head>');
 newwindow.document.writeln('<body bgcolor="#000000">');
 newwindow.document.writeln('<div id="videoTourPopUp" align="center">');
 newwindow.document.writeln('<object width="320" height="304" id="MediaPlayer1" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject">');
 newwindow.document.writeln('  <param name="URL" value="' + url + '"/>');
 newwindow.document.writeln('  <embed width="320" height="304" type="application/x-mplayer2" name="MediaPlayer" src="' + url + '" showcontrols="1"></embed>');
 newwindow.document.writeln('</object>');
 newwindow.document.writeln('<div align="right"><a href="javascript:close()">Close Window</a></div>');
 newwindow.document.writeln('</div>');
 newwindow.document.writeln('</body>');
 newwindow.document.writeln('</html>');
 newwindow.document.close();
}

function openNewWindow(sURL, width, height, name) { 
 var sFeatures = "top=5,left=5,height=" + height + ",width=" + width + ",status=no,scrollbars=yes,resizable=1,menubar=no,location=no";
 var win = window.open(sURL,name,sFeatures);
 win.focus();	
}