//Crow's Nest JavaScript¸W ver 1.5

	bFlg=0;
	function bg()
	{
		if(bFlg)
			document.bgColor="#114488";
		else
			document.bgColor="#000000";

		bFlg = !bFlg;
	}

	//Set window position in loaded.
	function Load()
	{
		var x = screen.availWidth;
		var y = screen.availHeight;

		window.resizeTo(x, y);
		window.moveTo(0,0);
	}

	//Open new window without menubar and toolbar.
	function OpenWin(url)
	{
		arg="toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=no, resizable=yes,width=";

		var x = screen.availWidth;
		var y = screen.availHeight;
		var sx = x - 40;
		var sy = y - 40;

		arg = arg + sx + ",height=" + sy;
		wnd = "wnd"+i;
		i++;

		win = window.open(url,wnd,arg);
		win.moveTo((x-sx)/2, 5);
	}

	function OpenWin2(url)
	{
		arg="toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=yes, resizable=yes,width=";

		var x = screen.availWidth;
		var y = screen.availHeight;
		var sx = x - 40;
		var sy = y - 40;

		arg = arg + sx + ",height=" + sy;
		wnd = "wnd"+i;
		i++;

		win = window.open(url,wnd,arg);
		win.moveTo((x-sx)/2, 5);
	}

	var i=0;

	//Open mini window
	function OpenMini(url,mode)
	{
		arg="toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=no, resizable=yes,width=400; height=300";

		wndmini = "min"+i;
		i++;
		
		if(mode)
			winmini1 = window.open(url,wndmini,arg);
		else
			winmini2 = window.open(url,wndmini,arg);
	}

	//Title animation
	var check=0;
	var tmsg="";
	function title(msg)
	{
		if(!check)
		{
			tmsg+=msg;
			check=1;
		}
		
		tmsg = tmsg.substring(1, tmsg.length)+tmsg.substring(0,1);
		document.title=tmsg;
	}

	//Wave tiltle picture
	function Wave()
	{
		setInterval('TITLE.filters["Wave"].phase += 8;', 200);
	}

	//Shake the window.
	var mv = 10
	var count = 0;
	var ax = new Array(-mv,0,mv,0,mv,0,-mv,0);
	var ay = new Array(0,-mv,0,mv,0,mv,0,-mv);

	function Shake()
	{
		window.moveBy(ax[count % 6], ay[count % 6]);
		count++;

		if(count<8)
			setTimeout("Shake();", 1);
	}

	//Close window.
	function Close()
	{
		window.close();
	}

	sn = new Array(20);
	x = new Array(20);
	y = new Array(20);
	vx = new Array(20);
	vy = new Array(20);

	xp = yp = 0;

	function Imove()
	{
		w = screen.availWidth-100;
		h = screen.availHeight-250;

		for(i=0; i<20; i++)
		{
			if(x[i] >= w || x[i] <= 0)
				vx[i] = -vx[i];

			if(y[i] >= h || y[i] <= 0)
				vy[i] = -vy[i];

			x[i] += vx[i];
			y[i] += vy[i];

			sn[i].left=x[i];
			sn[i].top =y[i];
		}
	}

	angle=0;
	d = 10;
	x0=y0=0;
	sign2=1;
	function Imove2()
	{
		for(i=0; i<20; i++)
		{
			angle+=1;
			if(angle>=360)
				angle=0;
			ax = Math.floor(Math.cos(angle)*d);
			ay = Math.floor(Math.sin(angle)*d);
			sn[i].left=x0+ax;
			sn[i].top =y0+ay;
		}
	}

	function MouseMove()
	{
		d+=sign2;
		if(d>500 || d<0)
			sign2=-sign2;
		x0 = event.x;
		y0 = event.y;
	}

	function InitImove()
	{
		for(i=0; i<20; i++)
		{
			xx = Math.floor(Math.random()*(screen.availWidth-300));
			yy = Math.floor(Math.random()*(screen.availHeight-300));
			x[i] = xx;
			y[i] = yy;
			vx[i] = Math.floor(Math.random()*20);
			vy[i] = Math.floor(Math.random()*20);
			if(vx[i] == 0)
				vx[i] = 1;
			if(vy[i] == 0)
				vy[i] = 1;
			str = '<div id="snow'+i+'" style="position:absolute; top:'+yy+'; left:'+xx+'; width:15; height:15;"><img src="snow.gif" width="10" height="10"></div>';
			document.write(str);
		}

		sn[0]=document.all.snow0.style;
		sn[1]=document.all.snow1.style;
		sn[2]=document.all.snow2.style;
		sn[3]=document.all.snow3.style;
		sn[4]=document.all.snow4.style;
		sn[5]=document.all.snow5.style;
		sn[6]=document.all.snow6.style;
		sn[7]=document.all.snow7.style;
		sn[8]=document.all.snow8.style;
		sn[9]=document.all.snow9.style;
		sn[10]=document.all.snow10.style;
		sn[11]=document.all.snow11.style;
		sn[12]=document.all.snow12.style;
		sn[13]=document.all.snow13.style;
		sn[14]=document.all.snow14.style;
		sn[15]=document.all.snow15.style;
		sn[16]=document.all.snow16.style;
		sn[17]=document.all.snow17.style;
		sn[18]=document.all.snow18.style;
		sn[19]=document.all.snow19.style;
	}

