function seldate(){document.getElementById("editprofile").editdateformat.value=document.getElementById("selectformat").value;}
function changesize(n){document.getElementById("reply").message.rows+=n;}
function confirmpm(message){if(confirm(message))parent.location="?ibaction=pm&type=inbox";}
function addtags(a){var s,e,t=document.getElementById("reply").message;if(t.selectionStart>=0){s=t.selectionStart;e=t.selectionEnd;t.value=t.value.substr(0,s)+'['+a+']'+t.value.substr(s,e-s)+'[/'+a+']'+t.value.substr(e,t.value.length);}else t.value+='['+a+'][/'+a+']';t.focus();}
function aat(a,b){var s,e,t=document.getElementById("reply").message;if(t.selectionStart>=0){s=t.selectionStart;e=t.selectionEnd;t.value=t.value.substr(0,s)+a+t.value.substr(s,e-s)+b+t.value.substr(e);}else t.value+=a+b;t.focus();}
function addsmilie(c){var t=document.getElementById("reply").message;var y=t.scrollTop;if(t.selectionStart>0)t.value=t.value.substr(0,t.selectionStart)+' :'+c+': '+t.value.substr(t.selectionEnd,t.value.length);else t.value+=' :'+c+': ';t.focus();t.scrollTop=y}
function addvote(){var l,s='',n,c=prompt('Enter a vote choice:','');l=prompt("You can enter an URL that has information about this choice. If you don't want an URL just press OK.",'');for(n=0;n<c.length;n++){a=c.substr(n,1);if(a=='|')s+='¦';else s+=a;}document.getElementById("reply").votechoices.value+=s+'|';document.getElementById("reply").voteurls.value+=l+'|';}
function perform(t){var s='',a,b;switch(t){case 'bar':a=prompt('Bars are used for making charts. Enter the width in pixels:');if(a)s='[bar]'+a+'[/bar]';break;case 'youtube':a=prompt('Enter the ID of the video:');if(a)s='[youtube]'+a+'[/youtube]';break;case 'googlevideo':a=prompt('Enter the ID of the video, including the minus sign, if necessary:');if(a)s='[googlevideo]'+a+'[/googlevideo]';break;case 'list':a=prompt("Enter the list type. Select from none, disc, circle, square, decimal, decimal-leading-zero, lower-roman, upper-roman, lower-alpha or upper-alpha","decimal");if(a=='')return;s='[list type='+a+']\n[/list]';alert('Your list tags have been created. Type each list item on a new line between the tags');break;case 'link':a=prompt('Enter the address:','http://');if(a=='')return;b=prompt('Enter the text to display:','link text');if(a==b)s='[url]'+a+'[/url]';else s='[url='+a+']'+b+'[/url]';break;case 'email':a=prompt('Enter the e-mail address:','user@host.com');if(a)s='[email]'+a+'[/email]';break;case 'colour':a=prompt("Enter the HEX value starting with '#', the name of the colour or the rgb value like 'rgb(0,125,255)':","black");if(a)aat('[colour='+a+']','[/colour]');break;case 'size':a=prompt('You can use xx-small, x-small, small, medium, large, x-large, xx-large for the size.','3');if(a)aat('[size='+a+']','[/size]');break;case 'quote':a=prompt('Type the quote author:','Anonymous');if(a)s='[quote='+a+']'+' [/quote]';break;case 'font':a=prompt('Type the font name:','arial');if(a)aat('[font='+a+']','[/font]');break;case 'image':a=prompt("Enter the location of an image on the web. Please don't steal other people's bandwidth!",'http://');if(a)s='[img]'+a+'[/img]';break;case 'random':a=prompt('Enter the lowest possible value:','0');if(a=='')return;b=prompt('Enter the highest possible value:','10');if(b=='')return;s='[random]'+a+','+b+'[/random]';break;case 'repeat':a=prompt('Type the text to be repeated:','');if(a=='')return;b=prompt('Enter the number of times to repeat the text, between 1 and 10.','5');if(b=='')return;s='[repeat='+b+']'+a+'[/repeat]';break;}if(s!='')document.getElementById("reply").message.value+=s;}
function spellcheck(){var n='',m=document.getElementById("reply").message.value;for(c=0;c<m.length;c++){r=m.substr(c,1);if(r=='&') n+='[and]';else if(r=="\n") n+=" ";else n+=r;}window.open('http://www.spellcheck.net/cgi-bin/spell.exe?action=checkpg&string='+n,'1','resizable=1,width=700,height=600');}