// STATUS
window.defaultStatus="Nuno Peralta"

// FLASH
function FlashLogo(){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="833" height="353" id="cab" align="middle">\n');
document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
document.write('<param name="movie" value="http://nunoperalta.no.sapo.pt/blog/cab.swf" />\n');
document.write('<param name="quality" value="high" />\n');
document.write('<param name="wmode" value="transparent" />\n');
document.write('<embed src="http://nunoperalta.no.sapo.pt/blog/cab.swf" quality="high" wmode="transparent" width="833" height="353" name="cab" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('</object>\n');
}

// TREMER JANELA
function shake(n) {
if (self.moveBy) {
 for (i = 15; i > 0; i--) {
 for (j = n; j > 0; j--) {
 self.moveBy(0,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0);
         }      }   }}

// TREMER IMAGEM
function detenerError(){
return true
}
window.onerror=detenerError

var rector=3
var stopit=0 
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}

function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector
}
else{
shake.style.left=parseInt(shake.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}

function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}

// IMAGEM TRANSPARENTE
function makevisible(cur,which){
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=75
}

// ATALHOS
function atalho() {
     //F2
	if (event.keyCode==113) {
        shake(2)
        event.keyCode=0
        return false
     }
     //F6
	if (event.keyCode==117) {
        location='http://depositonuno.no.sapo.pt/blog/diadamorte.html'
        event.keyCode=0
        return false
     }
}
document.onkeydown=atalho