function random(x)
{
	var rand = Math.ceil((x * Math.random()));
	return (rand - 1);
}

function pad(num)
{
	if (num < 10) 
		return '00' + num;
	else if (num < 100) 
		return '0' + num;
	else
		return num;
}


function resize()
{
	var screen_height = window.screen.height;
	
	window.resizeTo(800, (screen_height-48));
}


function movement(e)
{
        if (document.layers){
        xCoord = e.x;
        yCoord = e.y;}

        else if (document.all){
        xCoord = event.clientX;
        yCoord = event.clientY;}
        
        else if (document.getElementById){
        xCoord = e.clientX;
        yCoord = e.clientY;}


	
	for (i = 1; i < 36; i++)
		{
		var id_name = 'img_' + pad(i);
		var element = document.getElementById(id_name);

		element.style.position = 'absolute';

		var yBounds = (random(30) * 10);
		var xBounds = (random(40) * 10);

		if (yCoord  > 240) {element.style.top = yBounds + 'px';}
		if (xCoord  > 220)  {element.style.left = xBounds + 'px';}
		}

}

      function change_comment(string)
      {
        var obj = document.getElementById('comment');
        var newText = string;

        oldNode = obj.firstChild;
        newNode = document.createTextNode(newText);
        
        obj.replaceChild(newNode, oldNode);

/* 		var element = document.getElementById('are_here'); */
/* 		if (string == '') */
/* 		{element.style.textDecoration = 'underline';} */
/* 		if (string != '') */
/* 		{element.style.textDecoration = 'none';} */
      }


function explorerException()
	{
	if (navigator.appName.indexOf('Microsoft') != -1)
		{document.styleSheets[0].disabled=true;}
	else
		{document.styleSheets[0].disabled=false;}
	}



// document.onmousemove = movement;
// if(document.captureEvents) {document.captureEvents(Event.mousemove);}

