/*loading*/


//Specify the text to display
var displayed="<nobr><span style=\"color:#00AEEF\"><b>[Sending foto...]</b></span></nobr>"

///////////////////////////Do not edit below this line////////////

var logolink='javascript:window.scrollTo(0,0)'
var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all


function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}



function regenerate(){
window.location.reload()
}

function regenerate2()
	{
		if (ns4)
		setTimeout("window.onresize=regenerate",400)
	}


if (ie4||ns6)
document.write('<span id="logo" style="position:absolute;top:-300px;z-index:100">'+displayed+'</span>')



function createtext(){ //function for NS4
	staticimage=new Layer(5)
	staticimage.left=-300
	staticimage.document.write(displayed)
	staticimage.document.close()
	staticimage.visibility="show"
	regenerate2()
	staticitns()
}


function staticit(){ //function for IE4/ NS6
	var w2=ns6? pageXOffset+w : ietruebody().scrollLeft+w
	var h2=ns6? pageYOffset+h : ietruebody().scrollTop+h
	crosslogo.style.left=w2+"px"
	crosslogo.style.top=h2+"px"
}

function staticit2(){ //function for NS4
	staticimage.left=pageXOffset+window.innerWidth-staticimage.document.width-28
	staticimage.top=pageYOffset+window.innerHeight-staticimage.document.height-10
}


function inserttext(texto){ //function for IE4/ NS6
	if (ie4)
		crosslogo=document.getElementById("logo")
	else if (ns6)
		crosslogo=document.getElementById("logo")
	crosslogo.innerHTML='<nobr><span style=\"color:#00AEEF\"><b>['+texto+']<blink>...</blink></b></span></nobr>'
	w=ns6 || window.opera? window.innerWidth-crosslogo.offsetWidth-20 : ietruebody().clientWidth-crosslogo.offsetWidth-10
	h=ns6 || window.opera? window.innerHeight-crosslogo.offsetHeight-15 : ietruebody().clientHeight-crosslogo.offsetHeight-10
	crosslogo.style.left=w+"px"
	crosslogo.style.top=h+"px"
	if (ie4)
		window.onscroll=staticit
	else if (ns6)
		startstatic=setInterval("staticit()",100)
}






function staticitns(){ //function for NS4
	startstatic=setInterval("staticit2()",90)
}



function removetext(){ 
	if (ie4)
		crosslogo=document.getElementById("logo")
	else if (ns6)
		crosslogo=document.getElementById("logo")
	crosslogo.innerHTML='<nobr><span style=\"color:#00AEEF\"></span></nobr>'
	w=ns6 || window.opera? window.innerWidth-crosslogo.offsetWidth-20 : ietruebody().clientWidth-crosslogo.offsetWidth-10
	h=ns6 || window.opera? window.innerHeight-crosslogo.offsetHeight-15 : ietruebody().clientHeight-crosslogo.offsetHeight-10
	crosslogo.style.left=w+"px"
	crosslogo.style.top=h+"px"
	if (ie4)
		window.onscroll=staticit
	else if (ns6)
		startstatic=setInterval("staticit()",100)
}
	
	
/*profile/new_profileListener*/

function createObject(objId) {
  if (document.getElementById) return document.getElementById(objId);
  else if (document.layers) return eval("document." + objId);
  else if (document.all) return eval("document.all." + objId);
  else return eval("document." + objId);
}
var bName = navigator.appName;

function countChars(taObj,Cnt) { 
  objCnt=createObject(Cnt);
  objVal=taObj.value;
  //if (objVal.length>maxL) objVal=objVal.substring(0,maxL);
  if (objCnt) {
    if(bName == "Netscape"){  
      objCnt.textContent=objVal.length;}
    else{objCnt.innerText=objVal.length;}
  }
  return true;
}


function updateState(taObj, Cnt){ 
  objCnt=createObject(Cnt);
  if(!taObj.checked)
  {
    objCnt.disabled = true;
  }
  else
  {
    objCnt.disabled = false;
  }
}

function activateProfileListenerFavorite()
{
  tab_comments=createObject('sc4');
  tab_comments.style.display = 'none';
  tab_favorite=createObject('sc5');
  tab_favorite.style.display = 'block';
  tab_friends=createObject('sc6');
  tab_friends.style.display = 'none';

  comments = document.getElementById('tab_com_on');
  if(comments)
  {
    comments.setAttribute('id','tab_com');
  }

  favorite = document.getElementById('tab_fan');
  if(favorite)
  {
    favorite.setAttribute('id','tab_fan_on');
  }

  friend = document.getElementById('tab_friend_on');
  if(friend)
  {
    friend.setAttribute('id','tab_friend');
  }
}

function activateProfileListenerFriends()
{
  tab_comments=createObject('sc4');
  tab_comments.style.display = 'none';
  tab_favorite=createObject('sc5');
  tab_favorite.style.display = 'none';
  tab_friends=createObject('sc6');
  tab_friends.style.display = 'block';

  comments = document.getElementById('tab_com_on');
  if(comments)
  {
    comments.setAttribute('id','tab_com');
  }

  favorite = document.getElementById('tab_fan_on');
  if(favorite)
  {
    favorite.setAttribute('id','tab_fan');
  }

  friend = document.getElementById('tab_friend');
  if(friend)
  {
    friend.setAttribute('id','tab_friend_on');
  }
}

function activateProfileListenerComments()
{
	tab_comments=createObject('sc4');
	tab_comments.style.display = 'block';
	tab_favorite=createObject('sc5');
	tab_favorite.style.display = 'none';
	tab_friends=createObject('sc6');
	tab_friends.style.display = 'none';

	  comments = document.getElementById('tab_com');
	  if(comments)
	  {
	    comments.setAttribute('id','tab_com_on');
	  }

	  favorite = document.getElementById('tab_fan_on');
	  if(favorite)
	  {
	    favorite.setAttribute('id','tab_fan');
	  }

	  friend = document.getElementById('tab_friend_on');
	  if(friend)
	  {
	    friend.setAttribute('id','tab_friend');
	  }
}

var tab_about;
var about;
var tab_fotos;
var fotos;
var tab_contact;
var contact;
var tab_videos;
var videos;

function activateProfileListenerAbout()
{
  tab_about=createObject('sc1');
  tab_about.style.display = 'block';
  
  about = document.getElementById('tab_apr');
  if(about)
  {
	  about.setAttribute('id','tab_apr_on');
  }
  
  tab_fotos=createObject('sc2');
  tab_fotos.style.display = 'none';
  
  fotos = document.getElementById('tab_fotos_on');
  if(fotos)
  {
	  fotos.setAttribute('id','tab_fotos');
  }
  
  tab_contact=createObject('sc3');
  tab_contact.style.display = 'none';
  
  contact = document.getElementById('tab_contact_on');
  if(contact)
  {
	  contact.setAttribute('id','tab_contact');
  }  
  tab_videos=createObject('sc7');
  tab_videos.style.display = 'none';
  
  videos = document.getElementById('tab_videos_on');
  if(videos)
  {
	 videos.setAttribute('id','tab_videos');
  }  
}
function activateProfileListenerPhotos()
{
  tab_about=createObject('sc1');
  tab_about.style.display = 'none';
  
  about = document.getElementById('tab_apr_on');
  if(about)
  {
    about.setAttribute('id','tab_apr');
  }
  
  tab_fotos=createObject('sc2');
  tab_fotos.style.display = 'block';
  
  fotos = document.getElementById('tab_fotos');
  if(fotos)
  {
    fotos.setAttribute('id','tab_fotos_on');
  }
  
  tab_contact=createObject('sc3');
  tab_contact.style.display = 'none';
  
  contact = document.getElementById('tab_contact_on');
  if(contact)
  {
    contact.setAttribute('id','tab_contact');
  }  
  tab_videos=createObject('sc7');
  tab_videos.style.display = 'none';
  
  videos = document.getElementById('tab_videos_on');
  if(videos)
  {
	 videos.setAttribute('id','tab_videos');
  }  
  
}
function activateProfileListenerContact()
{
  tab_about=createObject('sc1');
  tab_about.style.display = 'none';
  
  about = document.getElementById('tab_apr_on');
  if(about)
  {
    about.setAttribute('id','tab_apr');
  }
  
  tab_fotos=createObject('sc2');
  tab_fotos.style.display = 'none';
  
  fotos = document.getElementById('tab_fotos_on');
  if(fotos)
  {
    fotos.setAttribute('id','tab_fotos');
  }
  
  tab_contact=createObject('sc3');
  tab_contact.style.display = 'block';
  
  contact = document.getElementById('tab_contact');
  if(contact)
  {
    contact.setAttribute('id','tab_contact_on');
  }  
  
  
  tab_videos=createObject('sc7');
  tab_videos.style.display = 'none';
  
  videos = document.getElementById('tab_videos_on');
  if(videos)
  {
	 videos.setAttribute('id','tab_videos');
  }
  
}

function activateProfileListenerVideos()
{
  tab_about=createObject('sc1');
  tab_about.style.display = 'none';
  
  about = document.getElementById('tab_apr_on');
  if(about)
  {
    about.setAttribute('id','tab_apr');
  }
  
  tab_fotos=createObject('sc2');
  tab_fotos.style.display = 'none';
  
  fotos = document.getElementById('tab_fotos_on');
  if(fotos)
  {
    fotos.setAttribute('id','tab_fotos');
  }
  
  tab_contact=createObject('sc3');
  tab_contact.style.display = 'none';
  
  contact = document.getElementById('tab_contact_on');
  if(contact)
  {
    contact.setAttribute('id','tab_contact');
  }  
  
  tab_videos=createObject('sc7');
  tab_videos.style.display = 'block';
  
  videos = document.getElementById('tab_videos');
  if(videos)
  {
	 videos.setAttribute('id','tab_videos_on');
  }
  
  
}
