window.onload = function() {
  setTimeout(function(){window.scrollTo(0, 1);}, 100);
}
addEventListener("load", function()
{
    setTimeout(updateLayout, 0);
}, false);
 
var currentWidth = 0;
 
function updateLayout()
{
    if (window.innerWidth != currentWidth)
    {
        currentWidth = window.innerWidth;
 
        var orient = currentWidth == 320 ? "profile" : "landscape";
        document.body.setAttribute("orient", orient);
        setTimeout(function()
        {
            window.scrollTo(0, 1);
        }, 100);           
    }
}
 
setInterval(updateLayout, 400);

// JavaScript Document
// Author: Bruno Augusto <bruno.augusto@bhtec.com.br>

onload = function(){
	var Cor = new Array();
	Cor[0]= 'Blue'
	Cor[1]= 'Green'
	Cor[2]= 'Red'
	Cor[3]= 'Orange'
	Cor[4]= 'Purple'
	var Numero = Math.floor(Math.random()*5); 
	//alert(Cor[Numero]);
	document.getElementsByTagName('body')[0].className = Cor[Numero];
}