";
document.getElementById("search-notifications").innerHTML = output_str_long + output_str;
//set height of lightbox for IE
try {
var browser=navigator.appName;
var b_version=navigator.appVersion;
//var version=parseFloat(b_version);
if ((browser=="Microsoft Internet Explorer")) {
b_version_short = b_version.substring(b_version.indexOf("MSIE ")+4);
b_version_short = b_version_short.substring(0,b_version_short.indexOf(";"));
var version=parseFloat(b_version_short);
if (version<7) {
if ($("search-notifications").style.setExpression ) { // IE
var temp_text = $("search-notifications").innerHTML;
$("search-notifications").innerHTML = "
" + temp_text + "
";
var temp_width = $("notif-temp").offsetWidth;
$("search-notifications").innerHTML = temp_text;
$("search-notifications").style.width = temp_width + 'px';
$("search-notifications").style.position = 'absolute';
$("search-notifications").style.setExpression("top", "(document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight) - this.offsetHeight + 'px'");
document.body.style.backgroundImage = "url('" + search_server_to_use + "js/s.gif')";
document.body.style.backgroundAttachment = 'fixed';
}
}
}
}
catch(ex) {}
if(notifications.notification_count > 1) setTimeout('setAndSwap(1)', 5000);
}
}
function setAndSwap(collapse) {
if ($('ws_notifications_big')) $('ws_notifications_big').style.height = $('ws_notifications_big').offsetHeight + "px";
swap_notif(collapse);
}
function swap_notif(collapse) {
if (collapse ) {
if ($('ws_notifications_big').style.display!='none') {
new Effect.BlindUp('ws_notifications_big', {duration:0.5});
setTimeout("new Effect.BlindDown('ws_notifications_small', {duration:0.5, fps:32});", 400);
}
}
else {
new Effect.BlindUp('ws_notifications_small', {duration:0.5});
setTimeout("new Effect.BlindDown('ws_notifications_big', {duration:0.5, fps:32});", 400);
}
}
function search_from_bar( ){
show_ads = true;
window.location=search_server_to_use+'search.html#'+document.forms[0].q.value
}
/** @return the URL, with prepended prefix if the given URL is relative. */
function absolutize_url(prefix, url) {
return /^[^:]+:\/\//.test(url) ? url : prefix + url;
}
/** @return HTML for one leaf menu entry.
@param e - An array like this: [label, url]. */
function html_menu_entry(e) {
if( !e )return;
var label = e[0];
var url = absolutize_url(search_server_to_use, e[1]);
return ''+getspan(label)+'';
}
/** @return HTML for one main menu entry, possibly including a "drop
down menu" (which may actually rise up).
@param e - An array like this: [label, url, id, submenu] id and
submenu are optional. submenu must be an array of menu entries,
suitable as html_menu_entry() arguments.
*/
function html_menu(e, display)
{
var label = e[0];
var url = absolutize_url(search_server_to_use, e[1]);
var id_base= e[2];
var entries= e[3];
var id= id_base+"-more";
var mouseout= 'onmouseout="show_dropdown_timer = '+
'setTimeout(function(){hideProfileDropDown(\''+id+'\')}, 500);"';
var behavior= "";
var menu= "";
if (undefined !== entries) {
behavior= ' onmouseover="clearTimeout(show_dropdown_timer);'+
' showDropDown(\''+id+'\', \'show\', this);"'+
mouseout;
menu= '
';
for (var i= 0; i';
}
var display2= undefined === display ? "inline" :
display ? "inline" : "none";
var button= ''+
''+ getspan(label) +''+
'';
var result= '
'+ button+ menu+ '
';
return result;
}
/** Holds specs for menus. Keeping them in a map allows us to use only
a subset, use a different order, or even use some items in multiple
places. */
var menus=
{
"profile":
["Profile", 'profile.html', "profile",
[["Edit Profile", 'editprofile.html'],
["Edit Photo", 'editpicture.html'],
["Privacy Setting", 'editprofile.html?section=privacy'],
["Change Preferences", 'editprofile.html?section=preferences']
] ],
"friends":
["Friends", 'rel.html', "friends",
[["View Friends", 'rel.html'],
["People You May Know", 'mayknow.html'],
["Find Friends", 'find.html'],
["Invite Friends", 'invite.html']
] ],
"changes":
["Recent Changes", "recent.html", 'recent',
[["Recent Changes", "recent.html"],
["Live Changes", "fun/live_changes.html"],
["Mapped Changes", "fun/mapped_changes.html"]
] ],
"fun":
["Fun", 'fun/fun.html', "fun",
[["Mapped Changes", "fun/mapped_changes.html"],
["Live Changes", "fun/live_changes.html"],
["Bloom", "fun/bloom.html"],
["Keyword Browser", "fun/keys.html"],
["The Faviconnery", "fun/favicon.html"],
["Micro Results", "fun/micro.html"],
["Texter", "fun/texter.html"],
["Clippy", "fun/clippy.html"]
] ],
"community":
["Community", 'about/about.html', "community",
[["Our Principles", 'about/about.html'],
//["People Search", 'friend_search.html'],
["Site Statistics", 'metrics/queries.html'],
["Wiki", server_to_use+'/wiki/'],
["Blog", server_to_use+'/blog'],
["Create an App", server_to_use+'/wiki/Creating_a_WISE_Application'],
["Translate Into Your Language", 'translate.html'],
["Get Involved", 'about/get_involved.html'],
["Crawl The Web", 'about/crawl.html'],
["Contact Us", 'about/contact.html']
] ],
"tools":
["Tools", 'tools/mostqueried.html', "tools",
[["Most Queried", 'tools/mostqueried.html'],
["Most Contributions", 'tools/mostcontributions.html'],
["Recent Top Queries", 'tools/recentqueries.html'],
["Recent Top Contributions", 'tools/recentcontributions.html'],
["Wanted Results", 'tools/wantedresults.html'],
["Toolbar", 'https://addons.mozilla.org/en-US/firefox/addon/8267'],
["Trends", 'tools/trends.html']
] ],
"help":
["Help", 'help/help.html', 'help',
[["Overview", 'help/overview.html'],
["Report a Bug", "https://bugs.launchpad.net/wikia-search"],
["Search Result Tools", "help/help.html"],
["Social Profile Tools", "help/help_profile.html"],
["Contact Us", "help/contact.html"]
] ],
"privacy": ["Privacy", "legal/privacy.html"],
"legal":
["Legal", "legal/legal.html", 'legal',
[["Terms of Use", "legal/legal.html"],
["Privacy Policy", "legal/privacy.html"],
["Copyright Policy", "legal/copyright.html"]
] ],
"applications":
["Applications", server_to_use+'/wiki/Wikia_Intelligent_Search_Extensions',
'applications',
[["About Applications", server_to_use+'/wiki/Wikia_Intelligent_Search_Extensions'],
["Application Gallery", server_to_use+'/wiki/Wikia_Search_Application_Gallery'],
["Creating Application", server_to_use+'/wiki/Creating_a_WISE_Application'],
["Playground", "wise/playground.html"]
] ]
};
/** @return HTML for a menu bar. */
function html_menu_bar()
{
var result= "";
result += '
';
result += html_menu(menus["profile"], is_logged_in_user());
result += html_menu(menus["friends"], is_logged_in_user());
result += html_menu(menus["changes"]);
result += html_menu(menus["community"]);
result += html_menu(menus["applications"]);
result += html_menu(menus["fun"]);
result += html_menu(menus["tools"]);
result += html_menu(menus["legal"]);
result += html_menu(menus["help"]);
result += '';
result += '
';
return result;
}
var header_string = "";
// macbre: add CSS class when not on main page
var container = $('container');
if (container.className != 'main-page') {
// top-bar for search pages
container.addClassName('search-page');
header_string += '