// JavaScript Document


var myWin = '';

// sizes of various windows

function openGraphicWindow(htmlFile,w,h) {

	features = 'status=no,scrollbars=no,toolbar=no,location=no,menu=no,resizable=no,width='+w+',height='+h+',left=100,top=100';
	window.open(htmlFile,'virtual',features);
	
}


function openScaleWindow(is_quicktime, fileName, width_M, height_M) { //v2.0

	var qt = '';
	var wm = '';	
	var qt_margin = 20;
	var flash_margin = 30;
	
	// quicktime	

	if (is_quicktime == true)

		{		
		width_MM = width_M + qt_margin;		
		height_MM = height_M + qt_margin;	

		options = "width=" +width_MM+ ", height=" +height_MM+ ",toolbar=0, scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,left=100,top=100";
	
		myWin = window.open('','', options);
		myWin.document.write('<HTML><HEAD><TITLE>VB MEDIA</title>');	
		myWin.document.write('<link href="../styles.css" rel="stylesheet" type="text/css">');	
		myWin.document.write('</head>');	
		myWin.document.write('<BODY body bgcolor="#000000">');	

		myWin.document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+width_M+'" height="'+height_M+'" codebase="http://www.apple.com/qtactivex/qtplugin.cab">');

		myWin.document.write('<param name="AUTOPLAY" value="true">');
		myWin.document.write('<param name="target" value="myself">');
		myWin.document.write('<param name="src" value="' + fileName + '">');
		myWin.document.write('<embed width="'+width_M+'" height="'+height_M+'" controller="false" loop="false" src="'+fileName+'" hspace="0" vspace="0" target="myself"></embed></object>');
		}
	
	else if (is_quicktime == false)

		{				
		width_MM = width_M + flash_margin;	
		height_MM = height_M + flash_margin;	

		options = "width=" +width_MM+ ", height=" +height_MM+ ",toolbar=0, scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,left=100,top=100";
		
		myWin = window.open('','', options);
		myWin.document.write('<HTML><HEAD><TITLE>VB MEDIA</title>');	
		myWin.document.write('<link href="../styles.css" rel="stylesheet" type="text/css">');	
		myWin.document.write('</head>');	
		myWin.document.write('<BODY body bgcolor="#000000">');	
	
		myWin.document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+width_M+'" height="'+height_M+'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="FLVPlayer">');
		
		myWin.document.write('<param name="movie" value="FLVPlayer_Progressive.swf">');
		myWin.document.write('<param name="salign" value="lt">');
		myWin.document.write('<param name="quality" value="high">');
		myWin.document.write('<param name="scale" value="noscale">');
		myWin.document.write('<param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Halo_Skin_2&streamName=' + fileName + '&autoPlay=true&autoRewind=false">');
		myWin.document.write('<embed src="FLVPlayer_Progressive.swf" width="'+width_M+'" height="'+height_M+'" quality="high" salign="lt" scale="noscale" flashvars="&MM_ComponentVersion=1&skinName=Halo_Skin_2&streamName='+fileName+'&autoPlay=true&autoRewind=false"></embed></object>');
		myWin.document.write('<embed name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed></object>');


	}

	
	
	// flash media

	else

		{
			myWin.document.write(' <EMBED SRC="'+ fileName +'" WIDTH="340" HEIGHT="270" AUTOSTART="1" SHOWCONTROLS="0" CONTROLLER="false"></EMBED>');
		}

	myWin.document.write('</BODY></html>');

	myWin.document.close();	

	// windows media


}

function openBrWindow(is_quicktime, fileName) { //v2.0

 	var qt = '';

	var wm = '';	

	//myWin = window.open('','','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=262,height=215,left=100,top=100');

	myWin = window.open('','','width=260,height=230,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,left=100,top=100');

	myWin.document.write('<html><head><title>virtual beauty media</title></head>');

	myWin.document.write('<link href="../styles.css" rel="stylesheet" type="text/css">');	

	// quicktime	

	if (is_quicktime == true)

		{		
	
		myWin.document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="245" height="195" codebase="http://www.apple.com/qtactivex/qtplugin.cab">');

		myWin.document.write('<param name="AUTOPLAY" value="true">');

		myWin.document.write('<param name="CONTROLLER" value="false">');

		myWin.document.write('<param name="target" value="myself">');

		myWin.document.write('<param name="src" value="' + fileName + '">');

		myWin.document.write('<embed width="245" height="195"  controller="false" loop="false" src="'+fileName+'" border="0" target="myself"></embed></object>');
			myWin.document.write('<BODY body bgcolor="#000000">');	
	

		}

	// windows media

	else

		{
			myWin.document.write(' <EMBED SRC="'+ fileName +'" WIDTH="240" HEIGHT="200" AUTOSTART="1" SHOWCONTROLS="0" CONTROLLER="false"></EMBED>');
	
		}

	myWin.document.write('</BODY></html>');

	myWin.document.close();	

}
