
// StartRemote: Open a new window enough for a 640x480 picture and load
// the specified URL into it.
var remoteWin = null;
function StartRemote(url) {
	remoteWin = window.open(url,"GAGMEREMOTE",'width=660,height=500,resizable=yes,scrollbars=no');
	remoteWin.focus();
}

// 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.
// 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) {

	// What browser are we running?
	var exploder = navigator.appName.indexOf("Microsoft") != -1;
	
	// 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 {
		// 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));

	// remoteWin = window.open("","BOXSTERREMOTE",'width=660,height=550,resizable=yes,scrollbars=no');
	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("<CENTER>" + text);
	remoteDoc.write("<IMG SRC=");
	remoteDoc.write(url);
	remoteDoc.write(">");
	remoteDoc.close();

	remoteWin.focus();
}


// Show a NEW! tag if this item is less than a month old
function NewItem(expires)
{
	exp = new Date(expires);
	cur = new Date();
	if (cur.getTime() < exp.getTime())
		document.write("<IMG SRC=\"/gif/new2.gif\" WIDTH=31 HEIGHT=12 BORDER=0 ALT=new>" );
}

// Update the status bar
function UpdateStatus(msg) {
	window.status = msg;
	return true;
}
