

	function changebg(field,reg,gold)
	{
		if(document.getElementById(field).src.indexOf(reg) != -1)
		{
			document.getElementById(field).src = gold;
		}
		else
		{
			document.getElementById(field).src = reg;
		}
	}


	function init()
	{
		topheight = document.getElementById('topboxcontent').offsetHeight;
		bottomheight = document.getElementById('bottomboxcontent').offsetHeight;
		document.getElementById('topboxcontent').style.height = '0px';
		document.getElementById('bottomboxcontent').style.height = '0px';
	}

	function expand(div)
	{
		if(div == 'bottomboxcontent')
		{
			var boxvar = bottomheight;
		}
		else
		{
			var boxvar = topheight;
		}		

		if(document.getElementById(div).offsetHeight < boxvar)
		{
			var newheight = document.getElementById(div).offsetHeight+3;
	 		document.getElementById(div).style.height = newheight+'px';
			setTimeout("expand('"+div+"')",20);
		}
		else
		{
			document.getElementById(div).style.height = boxvar+'px';

		}
	}

	function findPos(div) 
	{
		var obj = document.getElementById(div);
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			do {
				curleft += obj.offsetLeft;
				curtop += obj.offsetTop;
			} while (obj = obj.offsetParent);
		}
		return [curleft,curtop];
	}

	function setscrollposition(div)
	{
		//hscroll = (document.all ? document.scrollLeft : window.pageXOffset);
		//vscroll = (document.all ? document.scrollTop : window.pageYOffset);
		
		newscroll = 200;
		if(document.getElementById(div).offsetHeight == 0)
		{
			scrollto(div);
		}
	}

	function scrollto()
	{

		if(newscroll > 0)
		{
			window.scrollBy(0,2);
			newscroll = newscroll -2;
			window.setTimeout("scrollto();",10);
		}

	}




	//Preload

	pic1 = new Image(100,100);
	pic1.src="images/greenbgbubblesmall.gif"; 
	pic2 = new Image(100,100);
	pic2.src="images/tanbgbubblesmall.gif"; 
	pic3 = new Image(100,100);
	pic3.src="images/goldbgbubblesmall.gif"; 
	pic4 = new Image(125,125);
	pic4.src="images/greenbgbubblesmall.gif"; 
	pic5 = new Image(125,125);
	pic5.src="images/tanbgbubblesmall.gif"; 
	pic6 = new Image(125,125);
	pic6.src="images/goldbgbubblesmall.gif"; 

	//Setup an initialization
	window.onload = init;



