// JavaScript Document
function openVideo (vType, vName, vWidth, vHeight) {
	// Window Size
	var mWidth = parseInt(vWidth + 155);
	var mHeight = parseInt(vHeight + 200);
	// Video Hight Buffer (Allows Room for controller)
	var vBuffer = (vType == "QT" ? 16 : 47);
	// open Window
	videoWin = window.open("", "videoWin", "resizable=yes, width=" + mWidth + ", height=" + mHeight);
	// Content

	videoWinHTML = "<?xml version='1.0' encoding='iso-8859-1'?>";
	videoWinHTML += "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>";
	videoWinHTML += "<html xmlns='http://www.w3.org/1999/xhtml'>";
	videoWinHTML += "	<head>";
	videoWinHTML += "		<title>CurOzone Video</title>";
	videoWinHTML += "		<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />";
	videoWinHTML += "	</head>";
	videoWinHTML += "	<body background='images/body_bg.gif' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>";
	videoWinHTML += "		<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
	videoWinHTML += "			<tr>";
	videoWinHTML += "				<td align='left' valign='top'>";
	videoWinHTML += "					<table width='100%' border='0' cellpadding='0' cellspacing='0' background='video/images/TopMiddle.gif'>		";
	videoWinHTML += "						<tr>";
	videoWinHTML += "							<td width='351' height='80'><img src='video/images/TopLeft.gif' width='351' height='80' /></td>";
	videoWinHTML += "							<td><img src='video/images/blank.gif' width='100%' height='80' /></td>";
	videoWinHTML += "							<td width='23' height='80' align='right' valign='top'><img src='video/images/TopRight.gif' width='23' height='80' /></td>";
	videoWinHTML += "						</tr>";
	videoWinHTML += "					</table>";
	videoWinHTML += "				</td>";
	videoWinHTML += "				<td width='16' height='80' align='right' valign='top'><img src='video/images/blank.gif' width='16' height='20' /></td>";
	videoWinHTML += "			</tr>";
	videoWinHTML += "		</table>";
	videoWinHTML += "		<table width='100%' height='31' border='0' cellpadding='0' cellspacing='0'>";
	videoWinHTML += "			<tr>";
	videoWinHTML += "				<td width='809' align='left' valign='top'>";
	videoWinHTML += "					<table width='100%' height='31' border='0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>";
	videoWinHTML += "						<tr>";
	videoWinHTML += "							<td width='35' height='31' align='left' valign='top'><img src='video/images/MiddleLeft.gif' width='35' height='31' /></td>";
	videoWinHTML += "							<td width='100%' height='31' align='left' valign='top'><img src='video/images/blank.gif' width='100%' height='31' /></td>";
	videoWinHTML += "							<td width='11' height='31' align='right' valign='top'><img src='video/images/MiddleRight.gif' width='11' height='31' /></td>";
	videoWinHTML += "						</tr>";
	videoWinHTML += "					</table>";
	videoWinHTML += "				</td>";
	videoWinHTML += "				<td width='16' height='31' align='right' valign='top'><img src='video/images/blank.gif' width='16' height='31' /></td>";
	videoWinHTML += "			</tr>";
	videoWinHTML += "		</table>";
	videoWinHTML += "		<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
	videoWinHTML += "			<tr>";
	videoWinHTML += "				<td align='left' valign='top'>";
	videoWinHTML += "					<table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>";
	videoWinHTML += "						<tr>";
	videoWinHTML += "							<td width='35' height='100%' align='left' valign='top'><img src='video/images/MiddleLeft.gif' width='35' height='100%' /></td>";
	videoWinHTML += "							<td width='100%' height='100%' align='center' valign='middle'>";
	if (vType == "QT") {
		videoWinHTML += "								<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width='" + vWidth + "' height='" + parseInt(vHeight + vBuffer) + "' codebase='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'>";
		videoWinHTML += "									<param name='controller' value='TRUE' />";
		videoWinHTML += "									<param name='type' value='video/quicktime' />";
		videoWinHTML += "									<param name='autoplay' value='true' />";
		videoWinHTML += "									<param name='target' value='myself' />";
		videoWinHTML += "									<param name='src' value='" + vName + "' />";
		videoWinHTML += "									<param name='pluginspage' value='http://www.apple.com/quicktime/download/indext.html' />";
		videoWinHTML += "									<embed src='" + vName + "' width='" + vWidth + "' height='" + parseInt(vHeight + vBuffer) + "' controller='TRUE' target='myself' type='video/quicktime' bgcolor='#000000' border='5' pluginspage='http://www.apple.com/quicktime/download/indext.html' autoplay='true'></embed>";
		videoWinHTML += "								</object>";
	} else {
		//videoTypeObject += "Windows Media Should Go Here";
		videoWinHTML += "								<object id='MediaPlayer1' width='" + vWidth + "' height='" + parseInt(vHeight + vBuffer) + "' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>";
		videoWinHTML += "									<param name='FileName' value='" + vName + "'>";
		videoWinHTML += "									<param name='animationatStart' value='false'>";
		videoWinHTML += "									<param name='transparentatStart' value='false'>";
		videoWinHTML += "									<param name='autoStart' value='true'>";
		videoWinHTML += "									<param name='showControls' value='true'>";
		videoWinHTML += "									<embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='" + vName + "' name='MediaPlayer1' width='" + vWidth + "' height='" + parseInt(vHeight + vBuffer) + "' AutoStart=true></embed>";
		videoWinHTML += "								</object>";
	}
	videoWinHTML += "							</td>";
	videoWinHTML += "							<td width='11' height='100%' align='right' valign='top'><img src='video/images/MiddleRight.gif' width='11' height='100%' /></td>";
	videoWinHTML += "						</tr>";
	videoWinHTML += "					</table>";
	videoWinHTML += "				</td>";
	videoWinHTML += "				<td width='16' height='80' align='right' valign='top'><img src='video/images/blank.gif' width='16' height='100%' /></td>";
	videoWinHTML += "			</tr>";
	videoWinHTML += "		</table>";
	videoWinHTML += "		<table width='100%' height='41' border='0' cellpadding='0' cellspacing='0'>";
	videoWinHTML += "			<tr>";
	videoWinHTML += "				<td width='100%' height='41' align='left' valign='top'>";
	videoWinHTML += "					<table width='100%' border='0' cellpadding='0' cellspacing='0' background='video/images/BottomMiddle.gif'>";
	videoWinHTML += "						<tr>";
	videoWinHTML += "							<td width='351' height='41' align='left' valign='top'><img src='video/images/BottomLeft.gif' width='351' height='41' /></td>";
	videoWinHTML += "							<td width='100%' height='41' align='left' valign='top'><img src='video/images/blank.gif' width='100%' height='41' /></td>";
	videoWinHTML += "							<td width='23' height='41' align='right' valign='top'><img src='video/images/BottomRight.gif' width='23' height='41' /></td>";
	videoWinHTML += "						</tr>";
	videoWinHTML += "					</table>";
	videoWinHTML += "				</td>";
	videoWinHTML += "				<td width='16' height='80' align='right' valign='top'><img src='video/images/blank.gif' width='16' height='41' /></td>";
	videoWinHTML += "			</tr>";
	videoWinHTML += "		</table>";
	videoWinHTML += "	</body>";
	videoWinHTML += "</html>";
	// Set Content in Window
	videoWin.document.write(videoWinHTML);
}