/******************************************************************************
* popwin.js                                                                   *
*                                                                             *
* open a new windows                                                          *
******************************************************************************/

var Reservation
function popwin(theURL, width, height) {

	if(Reservation == null || Reservation.closed) {
		Reservation = window.open(theURL, "popup", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + ",top=0,left=290");
	} else {
		Reservation.close()
		Reservation = window.open(theURL, "popup", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + ",top=0,left=290");
	}
}

var the_window
function url_menu(theURL, width, height) {
	if (theURL=='')
	  {}
	else
	{
		if(the_window == null || the_window.closed)  {
			the_window = window.open(theURL, "popup", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + ",top=100,left=100");
		} else {
			the_window.close()
			the_window = window.open(theURL, "popup", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + ",top=100,left=100");
		}
	}
}

function webcam(url,name)
{	remote = window.open(url,name,"left=50,top=50,width=700,height=600,toolbar=yes,location=no,directories=no,status=no,scrollbars=no,resizable=no,menubar=no");
	remote.location.href = url;
	if (remote.opener == null)
		remote.opener = window; 
}

function makeRemoteMap(url,name)
{	remote2 = window.open(url,name,"left=130,top=120,width=600,height=480,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,menubar=no");
	remote2.location.href = url;
	if (remote2.opener == null)
		remote2.opener = window;
}
