// CBB V2 Javascript document.
// Javascripts can be inserted here.
// Its is not advised to edit the current javascripts!
// Official file size:

//Cbb codes
function CBBURL(CBBCode) { 
var A = prompt("Please enter the url below.", "http://");
if (A == null){
alert("Action Aborted");
return;
} if (A == "http://"){
alert("Action Aborted");
return;
} else {
var B = prompt("Please enter the name of the url below.", "");
if (!B) B = A;
var CBBCode = " [url="+A+"]"+B+"[/url]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
} }

function CBBIMG(CBBCode) { 
var A = prompt("Please enter the image url below.", "http://");
if (A == null){
alert("Action Aborted");
return;
} if (A == "http://"){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [img]"+A+"[/img]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
} }
function CBBEMAIL(CBBCode) { 
var A = prompt("Please enter the e-mail adress below.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var B = prompt("Please enter the name of the e-mail adress below.", "");
if (!B) B = A
var CBBCode = " [email="+A+"]"+B+"[/email]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
} }
function CBBSPOIL(CBBCode) { 
var A = prompt("Please type in the word/sentence you want to 'spoil'. If you want to spoil a bigger text, place the text between the [spoiler]{your text}[/spoiler] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [spoiler]"+A+"[/spoiler]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
} }
function CBBBOLD(CBBCode) { 
var A = prompt("Please enter the text you want to be bold. If you want to make a bigger text bold, place the text between the [b]{your text}[/b] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [b]"+A+"[/b]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
}}

function CBBULINE(CBBCode) { 
var A = prompt("Please enter the text you want to underline. If you want to underline a bigger text , place the text between the [u]{your text}[/u] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
 }
else {
var CBBCode = " [u]"+A+"[/u]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
} }

function CBBITALIC(CBBCode) { 
var A = prompt("Please enter the text you want italic. If you want to italic a bigger text , place the text between the [i]{your text}[/i] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [i]"+A+"[/i]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
}}

function CBBSTRIKE(CBBCode) { 
var A = prompt("Please enter the text you want to stike. If you want to strike a bigger text , place the text between the [s]{your text}[/s] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [s]"+A+"[/s]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return;
}}

function CBBQUOTE(CBBCode) { 
var A = prompt("Please enter the text you want to quote. If you want to quote a text with enters in it , place the text between the [quote]{your text}[/quote] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [quote]"+A+"[/quote]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return;
}}
function CBBSUP(CBBCode) { 
var A = prompt("Please enter the text you want to be converted to superscript. If you want to convert a bigger text , place the text between the [sup]{your text}[/sup] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [sup]"+A+"[/sup]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
}}
function CBBSUB(CBBCode) { 
var A = prompt("Please enter the text you want to be converted to supscript. If you want to convert a bigger text , place the text between the [sub]{your text}[/sub] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [sub]"+A+"[/sub]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
}}
function CBBLEFT(CBBCode) { 
var A = prompt("Please enter the text you want aligned left. If you want to align a bigger text , place the text between the [left]{your text}[/left] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [left]"+A+"[/left]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
}}
function CBBRIGHT(CBBCode) { 
var A = prompt("Please enter the text you want aligned right. If you want to align a bigger text , place the text between the [right]{your text}[/right] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [right]"+A+"[/right]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
}}

function CBBCENTER(CBBCode) { 
var A = prompt("Please enter the text you want centered. If you want to center a bigger text , place the text between the [center]{your text}[/center] tags.", "");
if (A == null){
alert("Action Aborted");
return;
} if (A == ""){
alert ("Action Aborted");
return;
} else {
var CBBCode = " [center]"+A+"[/center]"; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
}}

function AddCBBcode(CBBCode) { 
var CBBCode; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+CBBCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
}
function AddSmilie(SmilieCode) { 
var SmilieCode; 
var newMessage; 
var oldMessage = document.CBB.message.value; 
newMessage = oldMessage+SmilieCode; 
document.CBB.message.value=newMessage; 
document.CBB.message.focus(); 
return; 
} 
function AddAvatar(avatar) { 
var avatar; 
var newMessage; 
var oldMessage = document.CBB.avatar.value; 
newMessage = oldMessage+avatar; 
document.CBB.avatar.value=newMessage; 
document.CBB.avatar.focus(); 
return; 
} 

/*
Submit Once form validation- 
© Dynamic Drive (www.dynamicdrive.com)
*/

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}


/******************************************
* Contractible Headers Script- © Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
******************************************/

var ns6=document.getElementById&&!document.all?1:0

var head="display:''"
var folder=''

function expandit(curobj){
folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+1].style
if (folder.display=="none")
folder.display=""
else
folder.display="none"
}

