
function local_drop_html(name) {
  //return '<a href="/' + name + '">My page</a><br><a href="/journal/add/">Add post</a><br><a href="/user/account/">My Account</a><br><a href="/favorites">My Friends</a><br><a href="/bookmark/show/' + name + '">My Bookmarks</a><br><a href="/login/logout">Logout</a>' 
  //  <a href="/user/face/' + name + '">My face</a>
  return '<a href="/user/account">My account</a><a href="/' + name + '">My page</a><a href="/user/edit/' + name + '">Edit my page</a><a href="/poem/by/' + name + '">My poems</a><a href="/favorite/fav">My favorites</a><a href="/favorite/recent/?impress=1&limit=25">Quick favorites</a><a href="/favorite/enjoy">I might enjoy</a><a href="/bookmark/show/' + name + '">My bookmarks</a><a href="/poem/add">Add poem</a><a href="/login/logout">Logout</a>'
}

var tinyShown = [];
// need different name for each editor..
// this should be the default?

/* available buttons: 
	bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,
	styleselect,formatselect bullist,numlist,outdent,indent,
	undo,redo,link,unlink,anchor,image,cleanup,help,code,
	hr,removeformat,visualaid,sub,sup,charmap,separator,code */
/*tiny_options = {
	theme : 'advanced',
	verify_html : true, 
	extended_valid_elements : 'hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]',
	plugins : 'inlinepopups,emotions,paste,fullscreen,table',
	theme_advanced_toolbar_location : 'top',
	//entity_encoding : 'raw', 
	remove_linebreaks : false, 
	entities : "160,nbsp", 	
	// pretty good list by default, but more are fairly safe, damn, doesn't like this
	theme_advanced_fonts : 'Andale Mono=Andale Mono;Arial=Arial;Arial Black=Arial Black,Sans-serif;Book Antiqua=Book Antiqua,Sans-serif;Bookmark Old Style=Bookmark Old Style,Arial,Sans-serif;Century Gothic=Century Gothic,Sans-serif;Century Schoolbook=Century Schoolbook,Sans-serif;Comic Sans MS=Comic Sans MS,Sans-serif;Courier New=Courier New,Monospace;Garamond=Garamond;Georgia=Georgia;Helvetica=Helvetica;Impact=Impact;Monospace=Monospace;Palatino=Palatino;Sans-serif=Sans-serif;Serif=Serif;Tahoma=Tahoma,Sans-serif;Terminal=Terminal,Monospace;Times New Roman=Times New Roman,Serif;trebuchet MS=trebuchet MS,Serif;Verdana=Verdana,Sans-serif;Webdings=Webdings;Wingdings=Wingdings',
	theme_advanced_buttons1 : 'bold,italic,underline,strikethrough,separator,table,row_after,col_after,delete_row, delete_col,separator,justifyleft,justifycenter,justifyright,justifyfull,fontselect,fontsizeselect',
	theme_advanced_buttons2 : 'hr,bullist,numlist,outdent,indent,separator,link,unlink,image,separator,fullscreen,removeformat,code,separator,forecolor, backcolor, emotions, separator, cut,paste,pasteword',
	theme_advanced_buttons3 : '',
	BADBAD
	content_css : 'http://img.allpoetry.com/images/tiny_mce/tiny_ap.css',
	fullscreen_settings : {
		theme_advanced_path_location : "top",
		content_css : 'http://img.allpoetry.com/images/tiny_mce/tiny_ap.css'
	},
	height:'400px',
	width:'600px'
};*/

//tiny_options['height']='400px'
//tiny_options['width']='600px'
tiny_options['content_css']='/stylesheets/tiny_ap.css'
tiny_options['fullscreen_settings']['content_css']='/stylesheets/tiny_ap.css'


/* overload line numbering. vs. sw?  Hmm, this should be default+that overloaded */
var lineno = 0
var lineno_toggled = 0
function toggle_lines() {
  lineno_toggled = 1
  if (lineno==0) {
    showLines()
  } else {
    removeLines()
  }
  
  lineno += 1
  if (lineno == 2) lineno = 0
}

/* overwrite encourage function.keep it under 1 line, including Tip: */
function encourage(evt) {
  len = $('comment_body').value.length

  var e = gid('rdesc')
  if (len < 40) {
    msg = "Point out your favorite and least favorite parts."
  } else if (len < 80) {
    msg = "Which areas sound awkward?  Use line numbers."
  } else if (len < 120) {
    msg = "Try relating your emotional response to the poem."
  } else if (len < 200) {
    msg = "If you were to revise this poem, what would you change?"
  } else if (len < 250) {
    msg = "Analyse the use of Title / First line / Last line." // effective use
  } else if (len < 350) {
    msg = "Offer a rephrasing of an awkward area."
  } else if (len < 400) {   
    msg = "Is there another aspect this could address?"
  } else {
    msg = "Any other ideas about how the poem could improve?"
  } 
  
  e.innerHTML = "<b>Tip</b>: " + msg
  grow('comment_body', evt)
}


menu['mypage'] = [
  ['Poems','/poem/by/'],
  ['Bookmarks', '/bookmark/show/'],  
  ['Favorites', '/favorite/fav/'],
  ['Lists', '/list/by/'],
  ['Columns', '/column/by/'],
  ['Contests', '/contest/by/'],
  ['Journals', '/journal/by/'],  
  ['Drafts', '/item/drafts/'],  
  ['Views', '/item/logall/'],
  ['Comments on', '/comment/to/']
  ]


/* menu junk */
//function addEvent( node, evtType, func ) {
//	if( node.addEventListener ) {
//		node.addEventListener( evtType, func, false );
//		return true;
//	} else if( node.attachEvent ) {
//		return node.attachEvent( "on" + evtType, func );
//	} else {
//		return false;
//	}
//}
////addEvent( window, 'load', load );
//var popupDelayID;
//var timerID;
