function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}


/* Window popup*/
function popup(url, width, height, name)
{
if (!name)
{
name = '_popup';
}

window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes, width=' + width);
return false;
}

/* terms */
function launch_terms(url)
{
popup(url, 600, 400, '_terms');
return false;
}


/* dropdown */
$(document).ready(function(){
$('#cssdropdown li.headlink').hover(
function() { $('ul', this).css('display', 'block'); },
function() { $('ul', this).css('display', 'none'); });
});


/* tabs*/
$(document).ready(function(){
$('ul.tabNav a').click(function() {
var curChildIndex = $(this).parent().prevAll().length + 1;
$(this).parent().parent().children('.current').removeClass('current');
$(this).parent().addClass('current');
$(this).parent().parent().next('.tabContainer').children('.current').slideUp('fast',function() {
$(this).removeClass('current');
$(this).parent().children('div:nth-child('+curChildIndex+')').slideDown('normal',function() {
$(this).addClass('current');
});
});
return false;								
});
});
/* end tabs */


function confirmDelete()
{return confirm("Are you sure you wish to delete this file?");}

function confirmTagDel()
{return confirm("Are you sure you want to PERMANENTLY delete this tag?");}


function getTag(t){
var myVal;
var myValtoo

myVal = document.getElementById('tagger').value;
myVal += t + ', ';
document.getElementById('tagger').value = myVal;
myValtoo = document.getElementById('taggertoo').value;
myValtoo += t + ', ';
document.getElementById('taggertoo').value = myValtoo;}


function clearBox(){
document.getElementById('tagger').value=document.getElementById('tagger').value='';
document.getElementById('taggertoo').value=document.getElementById('taggertoo').value='';
}