#!/bin/sh

pid=`cat $HOME/.mosaicpid`
echo $*

if   [ $* = "sipb" ]; then  
	url=http://www.mit.edu:8001/
elif [ $* = "mit" ]; then
	url=http://web.mit.edu/
elif [ $* = "lsc" ]; then
	url=http://www.mit.edu:8001/activities/lsc/lsc.html
fi

echo "newwin
$url" > /tmp/Mosaic.$pid

if kill -USR1 $pid >/dev/null ; then
	echo Please wait one moment...
else
	echo Starting a new Mosaic...
	attach -q -n -h -a -r sipb
	PATH=$PATH:/mit/sipb/${machtype}bin/
	Mosaic $url &
	echo Please wait one moment...
fi
