// TITULO
var message="::: vibeAGITO.net :::"  
var message=message+"          " 
i="0"			      
var temptitle=""                
var speed="140"               

function titler(){
if (!document.all&&!document.getElementById)
return
document.title=temptitle+message.charAt(i)  
temptitle=temptitle+message.charAt(i)       
i++					    
if(i==message.length)			    
{
i="0"					    
temptitle=""				    
}
setTimeout("titler()",speed) 		   
}

window.onload=titler


// STATUSBAR

var hellotext="[ ::: vibeAGITO.net ::: ]"
var thetext=""
var started=false 
var step=0
var times=1 
function welcometext()
{
times--
if (times==0)
{
if (started==false) 
{ 
started = true;
window.status = hellotext; 
setTimeout("anim()",1);
}
thetext = hellotext;
}
}
function showstatustext(txt) 
{
thetext = txt;
setTimeout("welcometext()",4000) 
times++ 
}
function anim() 
{
step++
if (step==5) {step=1}
if (step==1) {window.status=''+thetext+''}
setTimeout("anim()",50); 
} 
welcometext(); 

	// POPUP RADIO
		function radio() { window.open('/radio/radio.php','vibeRADIO','toolbar=no,location=no,statusbar=no,menubar=no,scrollbars=no,resizable=no,width=361,height=365');}

	// POPUP ALBUM
function album(p) { window.open('/fotos/popup.php?'+p,'vibeFOTOS','toolbar=no,location=no,statusbar=no,menubar=no,scrollbars=no,resizable=no,width=690,height=465');} 

	// POPUP EVENTOS
function evento(p) { window.open('/agenda/popup.php?id='+p,'vibeAGENDA','toolbar=no,location=no,statusbar=no,menubar=no,scrollbars=yes,resizable=no,width=550,height=650');} 

	// POPUP WALLS
function wall(p,x) { window.open('/wallpapers/popup.php?'+p,'vibePAPERS',x);} 

	// POPUP DICAS
		function dicas(theURL,winName,features) { //v2.0
  window.open('/adm/dicas.html','DICAS','toolbar=no,location=no,statusbar=no,menubar=no,scrollbars=no,resizable=no,width=455,height=365');
}

	// FAVORITOS
function favoritos(){
    var url = "http://www.vibeagito.net";
    var title = "o.O[ vibeAGITO.net ]O.o";
    if (window.sidebar) window.sidebar.addPanel(title, url,"");
    else if(window.opera && window.print){
        var mbm = document.createElement('a');
        mbm.setAttribute('rel','sidebar');
        mbm.setAttribute('href',url);
        mbm.setAttribute('title',title);
        mbm.click();
    }
    else if(document.all){window.external.AddFavorite(url, title);}
}

	// IMG RANDOM
	function imgRandom() {
		img = new Array(4)
		img[0] = "/img/topo/topo1.gif";
		img[1] = "/img/topo/topo2.gif";
		img[2] = "/img/topo/topo3.gif";
		img[3] = "/img/topo/topo4.gif";
		index = Math.round(Math.random()*3);
		return img[index];
	}
	
	function slideit(){
		var slidespeed=5000
		var ie55=window.createPopup
		var pixeldelay=(ie55)? document.images.slide.filters[0].duration*1000 : 0
	
		if (!document.images) return
		if (ie55) document.images.slide.filters[0].apply()
		document.images.slide.src=imgRandom() //imageholder[whichimage].src
		if (ie55) document.images.slide.filters[0].play()
		setTimeout("slideit()",slidespeed+pixeldelay)
	}
	
	
	
	// OUTROS SCRIPTS
	
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('Preencha todos os campos requeridos corretamente!\n');
  document.MM_returnValue = (errors == '');
}

function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL) { //v5.0
  var newURL='', userAgent=navigator.userAgent, version=0;
  if (userAgent.indexOf('Netscape') != -1) {
  	version = parseFloat(userAgent.substring(userAgent.indexOf('Netscape')+9,userAgent.length));
    if (version >= NSvers) {if (NSpass>0) newURL=(NSpass==1)?URL:altURL;}
    else {if (NSnoPass>0) newURL=(NSnoPass==1)?URL:altURL;}
  } else if (userAgent.indexOf('MSIE') != -1) {
  	version = parseFloat(userAgent.substring(userAgent.indexOf('MSIE')+4,userAgent.length));
    if (version >= IEvers)
     {if (IEpass>0) newURL=(IEpass==1)?URL:altURL;}
    else {if (IEnoPass>0) newURL=(IEnoPass==1)?URL:altURL;}
  } else if (OBpass>0) newURL=(OBpass==1)?URL:altURL;
  if (newURL) { window.location=unescape(newURL); document.MM_returnValue=false; }
}
<!--
function vaifilho(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->

<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
function pagina(p) { window.location= ""+p; }


<!--
function texto(acao) {
    // pegando o texto selecionado
    var selecionado = window.document.selection.createRange().text;
    var original = window.document.form.content.value;

	// verifica se tem algo selecionado
    if(selecionado.length==0) {
        if(acao=='http') {
            var url = prompt("Digite a pagina de destino", "");
            var texto = prompt("Digite um texto", "Clique aqui");
            var texto2 = "[url="+url+"]"+texto+"[/url]";
        }
        if(acao!='http') {
            var texto = prompt("Digite um texto", "");
            var texto2 = "["+acao+"]"+texto+"[/"+acao+"]";
        }

        window.document.form.content.value=original+texto2;
        window.document.form.content.focus();
    }
    else {
        //novo texto
        var formatado = "";
        var texto = "";
        var textoI = "";
        var textoF = "";

        if(acao=='http') {
            var url = prompt("Digite a pagina de destino", "");
            textoI = "[url="+url+"]";
            textoF = "[/url]";
        }
        if(acao!='http') {
            textoI = "["+acao+"]";
            textoF = "[/"+acao+"]";
        }
        texto = textoI+selecionado+textoF;
        formatado = (original.replace(selecionado, texto));
        window.document.form.content.value = formatado;
    }
}
-->