document.observe("dom:loaded",function(){var add_comments=$A($$('.wall_add_comment'));add_comments.each(function(n){n.hide();});var comment_details=$A($$('.wall_message_details'));comment_details.each(function(n){if(n.next('.wall_add_comment'))
{n.update(n.innerHTML+'<span class="wall_created_date">&bull;</span> <a href="javascript:void(0)" class="wall_comment" >Comment</a>');}});var wall_comments=$A($$('.wall_comment'));wall_comments.each(function(n){n.observe('click',function(){this.up(1).down('.wall_add_comment').toggle()});});var wall_textareas=$A($$('.wall_textbox'));wall_textareas.each(function(n){n.observe('keyup',function(){n.style.height=0;n.style.height=n.scrollHeight+'px';})});});var default_content=new Array();var charsize=new Array();function removeShoutOutDefaultText(type)
{field='shout_out_'+type+'_content';if(default_content[type]==$(field).value)
{$(field).value="";enableDisableShoutOutSave(type,setCharsLeft(field,charsize[type]));}
if(type==3)
{if("title"==$('shout_out_3_title').value)
{$('shout_out_3_title').value="";}}}
function enableDisableShoutOutSave(type,manyleft)
{warn_message="Instructions";urlbad=false;isempty=false;if(type==3)
{v=$('shout_out_3_url').value;c=$('shout_out_3_goto_type_3').checked;if(c==true&&v.length==0)
{urlbad=true;}}
if(manyleft==charsize[type])
{isempty=true;}
isdefaulttext=false;if($('shout_out_'+type+'_content').value==default_content[type])
{isdefaulttext=true;}
if((manyleft<=0)||(isempty==true)||(isdefaulttext==true)||(urlbad==true))
{$('submit_'+type).disabled=true;$('submit_'+type).style.visibility="hidden";$('warning_message_'+type).innerHTML=warn_message;if(urlbad)
{$('warning_message_'+type).innerHTML+="<br/> - Enter above where you want the Click to go!";}
if(isdefaulttext&&default_content[type]!="")
{$('warning_message_'+type).innerHTML+="<br/> - Start by entering your text message above<br/> - Then add an image.";}
if(manyleft<=0)
{$('warning_message_'+type).innerHTML+="<br/> - Too many characters using in your text message above!";}
if(isempty)
{$('warning_message_'+type).innerHTML+="<br/> - Add your text message above!";}}
else
{$('submit_'+type).disabled=false;$('submit_'+type).style.visibility="visible";$('warning_message_'+type).innerHTML=warn_message+"<br/> - Check your Shout-out carefully and press the 'Send' button to the right...";}}
