
//
// Local overrides just for this section...
//

// This is kind of like the old version except you can put in
// more info.  This one will create a window then write HTML
// into it.
function StartRemoteFull(url,bgcolor,text,orientation) {

	var undefined;
	height = new Number;
	width = new Number;

	// What browser are we running?
	var exploder = navigator.appName.indexOf("Microsoft") != -1;

	// Allow the text field to be left blank, default to empty string.
	if (text == null || text == undefined)
		text = '';

	// Allow the bgcolor field to be left blank, default to white.
	if (bgcolor == null || bgcolor == undefined)
		bgcolor = 'white';

	// Determine chosen orientation, can be either landscape or portrait
	if (orientation == null || orientation == undefined)
		orientation = 'landscape';
	if (orientation == 'landscape') {
		height = 500;
		width = 660;
	} else if (orientation == 'portrait') {
		width = 520;
		height = 670;
	} else if (orientation.match('.*x.*')) {
		words = orientation.split('x');
		width= 20 + parseInt(words[0]);
		height= 40 + parseInt(words[1]);
		// alert ('Orientation: ' + orientation + ' : ' + width + 'x' + height);
	} else {
		// Display error and default to landscape
		alert ("Invalid orientation: " + orientation);
		height = 500;
		width = 660;
	}

	// We need to add to the height of the screen to compensate for
	// a really long description string.  We're allocating roughly
	// 90 characters per line, and about 20 extra pixels per extra
	// line of text.  There will always be an extra space just in
	// case someone uses a big ugly font.
	height = height + (22 * Math.ceil(text.length / 90));

	// Add 20 pixels for close window gif at bottom.
	height += 20;

	// Microsoft Exploder doesn't make the screen the size we ask
	// for so we have to fudge it ask for something bigger..
	if (exploder) {
		height += 20;
		width += 20;
	}

	remoteWin = window.open('','GAGMEREMOTE','width='+width+',height='+height+',resizable=yes,scrollbars=no');
	// If we're running JavaScriptVersion >= 1.2, then we need to do
	// and explicit resize.  This is due to a bug in IE 5.0
	// if (exploder) {
		remoteWin.resizeTo(width,height);
	// }

	remoteDoc = remoteWin.document;

	// remoteDoc = docuement.open("text/html");
	remoteDoc.write("<TITLE>" + url + "</TITLE>");
	remoteDoc.write("<BODY BGCOLOR=" + bgcolor + ">");
	remoteDoc.write("<BASE HREF=http://home.gagme.com/greg/vacation/2002/michigan/>");
	// remoteDoc.write("<CENTER>" + "AppName: " + navigator.appName + " Version: " + JavaScriptVersion + " : " + text);
	remoteDoc.write("<CENTER>" + text);
	remoteDoc.write("<IMG SRC=");
	remoteDoc.write(url);
	remoteDoc.write(">");
	remoteDoc.write("<BR><A HREF=\"javascript:window.close()\"><IMG SRC=\"/greg/gif/closewin.gif\" WIDTH=360 HEIGHT=20 ALIGN=LEFT BORDER=0></A>");
	remoteDoc.close();

	remoteWin.focus();

}


