/*#############################################################################
# LEGAL:
# All technical material (specificaly the PHP, CSS, JS, code documentation, 
# configs and htaccess) in this website was indepentantly created by 
# Owen Beresford, with his own resources.
# The page structure and template system is an original work of Owen Beresford, 
# designed indepentantly with his own resources.
# All this was built without reference to any companies intellectual property.
#  
# All this is released for general use in websites under the terms of the 
# perl artistic licence.
# The complete terms of this licence may be found at
# http://dev.perl.org/perl6/rfc/346.html
# or typing
# `man perlartistic'
# in a any usefull shell.
############################################################################*/

function confirm_delete() 
{{{
	try 
	{
		var e=document.forms['f1'].existing; 
		if(e.selectedIndex==-1)				
		{ 
			alert("Nothing selected, can't delete."); 
			return false; 
		}
		else
		{ 
			return window.confirm("Are you sure you want to delete the page "+e.options[e.selectedIndex].value+" ?"); 
		}
	} 
	catch(e) { }
	return false; 
}}}

function alter_display()
{{{
	names=new Array('blocka', 'blockAA', 'blockp', 'blocki', 'blockh', 'blockr', 'blockuo', 'blockuc', 'blockto', 'blocktc', 'blockfo', 'blockfc', 'blockFoFo', 'blockFcFc', 'blocktr', 'blocke', 'blocks');
	var ff=document.forms['f1'];

	if(ff.ctype.selectedIndex!=-1) 
	{
		var tt=ff.ctype.options[ff.ctype.selectedIndex].value;
	} else								{ var tt=false; }
	
	for(var i=0; i<names.length; i++)
	{
		var t1=window.get(names[i]);
		t1.style.display='none';
	}
	if(tt)
	{
		var t1=window.get('block'+tt);
		t1.style.display='block';
	}
}}}

function alter_style(obj)
{{{
	if(obj.selectedIndex==-1)			{ return; }
	var tt	=obj.options[obj.selectedIndex].value;
	if(tt=='0') 
	{
		alert("Sorry, you'll have to moan at Owen to get this added.");
		obj.selectedIndex=-1;
	}
}}}

function alter_cells(sel, id) 
{{{
	if(sel.selectedIndex==-1)			{ return; }
	var tt	=sel.options[sel.selectedIndex].value;
	if(window.location.href.substr('?')){ window.location.href+='&tr='+tt; }
	else								{ window.location.href+='?tr='+tt; }
	
 //	window.location.
}}}

function wipe_default(id, val) 
{{{
	var t=window.get(id);
	if(t.value==val)					{ t.value=''; }
	return true;
}}}

function warn_inputs(sel) 
{{{
	if(sel.selectedIndex==-1)			{ return; }
	var t=sel.options[sel.selectedIndex].value;
	if(t=='1' || t=='2') 
	{
		alert('This needs to be done via a raw block.');
		sel.selectedIndex=-1;
	}
}}}

if(!window.tbbs)
{
	window.tbbs=1;
//	window.get=document.getElementById;
// there are no registered functions that you need to register.

}
// vi: ts=4
// vim: syn=javascript sw=4 st=4 tw=4 fdm=marker
