/*dnl javascript support routines*/

  function setMainHeight(divID) 
  {
	var x,y;
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}
	y -= 160;   <!-- Documented in dnlstyle.css, .menu_position -->
	x -= 10;	<!-- Reduce width to give room for scroll bar -->
	var myReference = document.getElementById(divID);
	
	if( myReference.style ) { myReference = myReference.style; }
	
	if( myReference.resizeTo ) {
  		myReference.resizeTo( x, y );
	}
	var noPx = document.childNodes ? 'px' : 0;
	myReference.width = x + noPx;
	myReference.pixelWidth = x;
	myReference.height = y + noPx;
	myReference.pixelHeight = y;
  }


function init(divID)
{
/*	setMainHeight(divID); Seems to conflict with DHTML menu program & bookmarks; call from within div. */
	window.onresize = function()
        {
          setMainHeight(divID);
        }; 
}

function printMain() 
	{
	var a = window.open('','','scrollbars=yes,width=300,height=300');
	var browser=navigator.appName;
	
	a.document.open("text/html");
	a.document.write('<html><head><link rel="stylesheet" href="dnlstyle.css" /> \
		<style type="text/css">#frame{background-image:none;background-color:#FFFFFF;}</style></head> \
		<body style="padding-left:20px;background-image:none;background-color:#FFFFFF;">');
	a.document.write('DNL Catering - www.dnl-catering.com - 408-945-7930');
	a.document.write(document.getElementById('divBoard').innerHTML);
	a.document.write('</body></html>');
/*	The next line causes bug in FireFox where a page with a buried link may have only that link printed. */
	if (browser != "Netscape") a.document.close();
	a.print();
	a.window.close();
	}

/*
function printMainTest()
{
	var html = '<html><head><link rel="stylesheet" href="dnlstyle.css" /> \
		<style type="text/css">#frame{background-image:none;background-color:#FFFFFF;}</style></head> \
		<body style="padding-left:20px;background-image:none;background-color:#FFFFFF;">';

	var printReadyElem = document.getElementById("divBoard");

	html += printReadyElem.innerHTML;

	html += '</body></html>';

	var printWin = window.open('','','scrollbars=yes,width=300,height=300');
	printWin.document.open();
	printWin.document.write(html);
	printWin.print();
	printWin.window.close();
}
*/

function LaunchVideo(vidUrl, vidWidth, vidHeight) 
	{
	vidHeight = vidHeight+16;
	winHeight = vidHeight+15;
	winWidth = vidWidth+15;
	
	var a = window.open('','','scrollbars=no,width='+winWidth+',height='+winHeight);
	var browser=navigator.appName;
	
	a.document.open("text/html");
	a.document.write('<html><head> \
		<script src="scripts/AC_QuickTime.js" type="text/javascript"> </script> \
		<title>JavaScript Movie Monitor</title> \
	</head>  \
	<body style="background-image:none;background-color:#000000;"> \
	<script language="javascript" type="text/javascript"> \
	/* This line calls Apple Quicktime to actually play the video */ \
	QT_WriteOBJECT("resources/DNL_Intro2009.mp4", "320", "256" , ""); \
	</script> \
	</body></html>');
	
	/*
	a.document.write('<body style="background-image:none;background-color:#ffffff;">'); 

	a.document.write('This is test text.');

/* This line calls Apple Quicktime to actually play the video 
	a.document.write('<script language="javascript" type="text/javascript"> \
    	QT_WriteOBJECT("'+vidUrl+'", "'+vidWidth+'", "'+vidHeight+'" , ""); </script>');
	
	a.document.write('</body></html>');*/
}
