// JavaScript Document

var b_timer = null; 
var b_on = true;
var blnkrs = null;

function blink() { 
var tmp = document.getElementsByTagName("span"); 
if (tmp) { 
blnkrs = new Array(); 
var b_count = 0; 
for (var i = 0; i < tmp.length; ++i) { 
if (tmp[i].className == "blink") { 
blnkrs[b_count] = tmp[i]; 
++b_count; 
} 
} 
blinkTimer(500); 
} 
} 

function blinkTimer(ival) { 
if (b_timer) { 
window.clearTimeout(b_timer); 
b_timer = null; 
} 
blinkIt(); 
b_timer = window.setTimeout('blinkTimer(' + ival + ')', ival); 
} 

function blinkIt() { 
for (var i = 0; i < blnkrs.length; ++i) { 
if (b_on == true) { 
blnkrs[i].style.visibility = "hidden"; 
} 
else { 
blnkrs[i].style.visibility = "visible"; 
} 
} 
b_on =!b_on; 
}

function clear_email() {
if (document.newid.email.value != "valid address")
document.newid.email.value = "";
}

function clear_email2() {
if (document.resend.email.value != "valid address")
document.resend.email.value = "";
}

function clear_user() {
if (document.newid.name.value != "20 characters")
document.newid.name.value = "";
}

function clear_user2() {
document.resend.name.value = "";
}

function loadMsg(){
top.mainFrame.menu.location.reload( true );
top.mainFrame.footer.location.reload( true );
}

function loadPage(id){
top.mainFrame.menu.changeContent(''+id+'','location');
}

function openMsg(profid,profname){
	window.open('/inc/messenger.php?send_msg='+profid+'&main&idto= '+profname+'','EBMessage','resizable=no,scrollbars=yes,height=350,width=275,top=25,left=25');
}
function openProf(profid,profname,support){
	window.open('/prof/pop.php?showid='+profid+'&user='+profname+'&support='+support+'','EBProfile','scrollbars=yes,height=675,width=631,top=25,left=25');
}

function showProfOps() {
  if (document.getElementById('subright1').style.display = "none")
    {
    document.getElementById('subright').style.display = "block";
	document.getElementById('subleft').style.display = "none";
	document.getElementById('subright2').style.display = "block";
  }
  }
function hideProfOps() {
  if (document.getElementById('subleft').style.display = "block")
    {
    document.getElementById('subright1').style.display = "block";
	document.getElementById('subright').style.display = "none";
	document.getElementById('subright2').style.display = "none";
  }
  }
  
  
  function confirmDeleteBuddy(deleteLink) {
	if (confirm("Are you sure you want to remove this profile from your buddy list?")) {
		location="index.php?del_buddy="+deleteLink;
		}
	}
	
function confirmDeleteFav(deleteLink) {
	if (confirm("Are you sure you want to remove this profile from your favorite list?")) {
		location="index.php?del_fav="+deleteLink;
		}
	}
	
function confirmDeleteBlocked(deleteLink) {
	if (confirm("Are you sure you want to remove this profile from your blocked list?")) {
		location="index.php?del_block="+deleteLink;
		}
	}
	
function confirmDeleteWoof(deleteLink) {
	if (confirm("Are you sure you want to remove this Woof?")) {
		location="index.php?del_woof="+deleteLink;
		}
	}


