var remote = null;

/*

	Show a new window

	n: window name

	u: url

	w: width

	h: height

*/
function ShowWindow(n,u,w,h)
{
	args="width="+w+",height="+h+",titlebar=no,menubar=no,toolbar=no,directories=no,resizable=yes,scrollbars=yes,status=0";
	remote=window.open(u,n,args);
	if (remote != null)
	{
	    if (remote.opener == null)
	    		remote.opener =self;
		window.name='MyWindow';
		remote.location.href=u;
	}
	remote.focus();
}
/*
	open url
*/
function open_url(aurl,m,w,h)
{
	var currTime= new Date();
	var newurl=aurl;
	/* Open in the same window */

	if (m==0)
	{
		// window.open(newurl,"_self");
		self.location.href = newurl;
	}

	else
	{
		/* Open in the a new window */

		ShowWindow('windowname1',newurl,w,h);	
	}

}

