// Documento JavaScript ::::: RLAGAGGIO :::::
// Designer e Webmaster: Rafael Lagaggio
// Scripts encontrados nos sites: www.wmonline.com.br e www.imasters.com.br

//Default browsercheck, added to all scripts!
function checkBrowser(){ 
  this.ver=navigator.appVersion 
  this.dom=document.getElementById?1:0 
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0; 
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
  this.ie4=(document.all && !this.dom)?1:0; 
  this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
  this.ns4=(document.layers && !this.dom)?1:0; 
  this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns5) 
  return this 
} 
bw=new checkBrowser() 

// Desabilita click botão direito
if (window.Event) document.captureEvents(Event.MOUSEUP);
 
function nocontextmenu() { 
event.cancelBubble = true;
event.returnValue = false; return false;
} 

function norightclick(e) { 
if (window.Event) { 
if (e.which == 2 || e.which == 3) return false; 
} else 
if (event.button == 2 || event.button == 3) { 
event.cancelBubble = true;
event.returnValue = false; return false; } } 
if (document.layers) { 
document.captureEvents(Event.MOUSEDOWN); } 
document.oncontextmenu = nocontextmenu; 
document.onmousedown = norightclick; 
document.onmouseup = norightclick;

//bloqueia colagem
if (document.all)
document.
onselectstart=
function(){ return false; };

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

//script abre fotos
function gotonewpage(what) {
  value = what.options[what.selectedIndex].value;
  if (value == "") return;
  window.location.href = value;
}

var winhandle = null;

function popUp(URL) {
  if ((winhandle != null) && (! winhandle.closed)){
    winhandle.location.replace(URL);
  }
  else
  {
    winhandle=window.open(URL, 'imagewin', 'width=585,height=478,top=0,left=92,directories=no,location=no,menubar=no,scroll=no,status=no,titlebar=no,toolbar=no,resizable=no');
  }

  winhandle.focus();
}

//abre fotos 2
function popUp2(URL) {
  if ((winhandle != null) && (! winhandle.closed)){
    winhandle.location.replace(URL);
  }
  else
  {
    winhandle=window.open(URL, 'imagewin', 'width=696,height=426,top=110,left=96,directories=no,location=no,menubar=no,scroll=no,status=no,titlebar=no,toolbar=no,resizable=no');
  }

  winhandle.focus();
}


// Adicionar aos favoritos
var URLSite = window.location.href;
var TituloSite = document.title;
function addfav(){
if (document.all) window.external.AddFavorite(URLSite,TituloSite);
}

// Barra de status
// This script was found at the JavaScript Place. http://www.javaplace.co.uk
var text  = ""
var speed = 200

var x = 0

function bb() {

var a = text.substring(0,x)
var b = text.substring(x,x+1).toUpperCase()
var c = text.substring(x+1,text.length)

window.status = a + b + c

if (x == text.length) {
x = 0
}

else {
x++
}

setTimeout("bb()",speed)
}

bb();

