//
// (c) 2008 primeadd.net
// Service Widget
//
document.write('<style type="text/css">' +
 '#f_3243543179_primadd { overflow: hidden; padding: 0px; margin: 0px; top: 0px; left: 0px; list-style-type: none;}' +
 '#f_3243543179_primadd div { padding: 0px; margin: 0px; cursor:pointer; line-height:28px; width: 32px; height: 32px; background: url("//primadd.net/icon/services_32x32_2.gif") no-repeat;}' +
 '#f_3243543179_primadd li { float: left; padding: 0px; margin: 0px;}' +
 '#f_3243543179_primadd a { display:block;}' +
 '#f_3243543179_primadd li:before { display:none; }' +  '#f_3243543179_primadd img { border:none; }' +
 '</style>');
var f_3243543179_list=new Array(
new Array('whatsthis', 'whatsthis', 0, 'http://en.wikipedia.com/', "what's this?"),
new Array('google_bookmarks', 'Google Bookmarks', 3, 'http://www.google.com/', ""),
new Array('delicious', 'del.icio.us', 4, 'http://del.icio.us/', ""),
new Array('slashdot', 'slashdot', 5, 'http://slashdot.org/', ""),
new Array('stumbleupon', 'StumbleUpon', 6, 'http://www.stumbleupon.com/', ""),
new Array('reddit', 'reddit', 7, 'http://reddit.com/', ""),
new Array('technorati', 'Technorati', 8, 'http://technorati.com/', ""),
new Array('facebook', 'Facebook', 9, 'http://www.facebook.com/', ""),
new Array('spurl', 'spurl', 14, 'http://www.spurl.net/', ""),
new Array('mister_wong', 'Mister Wong', 15, 'http://www.mister-wong.de/', ""),
new Array('diigo', 'Diigo', 17, 'http://www.diigo.com/', ""),
new Array('tailrank', 'Tailrank', 19, 'http://tailrank.com/', ""),
new Array('digg', 'digg', 21, 'http://digg.com/', ""),
new Array('furl', 'furl', 22, 'http://www.furl.net/', ""),
new Array('yahoo_myweb', 'Yahoo MyWeb', 23, 'http://myweb2.search.yahoo.com/', ""),
new Array('twitter', 'twitter', 25, 'http://twitter.com/', ""),
new Array('fark', 'fark', 27, 'http://www.fark.com/', ""),
new Array('magnolia', 'ma.gnolia', 31, 'http://ma.gnolia.com/', ""),
new Array('more', 'more', 1, 'http://primadd.net/', "for more services"));
function f_3243543179_gotoService(service)
{
	subUrl = '//primadd.net/services/' + service + '/';
	if (service == 'more') subUrl = '//primadd.net/bookmark/submit/'
	url = subUrl + '?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(window.location.href);
	window.open(url);
  
	if(typeof 'f_3243543179_hidemenu' == 'function')
	{
		f_3243543179_hidemenu();
	}
}

var f_3243543179_textCnt;
if ( typeof(f_3243543179_textCnt ) == "undefined" ) { f_3243543179_textCnt = 0; } else { f_3243543179_textCnt++; }

document.write(f_3243543179_addLinks());

function f_3243543179_displayText(boxid, mode, i)
{
	f_3243543179_txt = document.getElementById('f_3243543179_primadd_text_'+boxid);
	if (f_3243543179_txt)
	{
		switch (mode)
		{
			default:
			case 0:
				f_3243543179_txt.innerHTML = 'bookmark at ...';
				break;
			case 1:
				var txt = ''
				if (f_3243543179_list[i][4] != '') 
		  		txt = '... ' + f_3243543179_list[i][4];
				else
		  		txt = 'bookmark at ' + f_3243543179_list[i][1];
				f_3243543179_txt.innerHTML = txt;
				break;
		}
	}
}

function f_3243543179_addLinks()
{
	var ret = '';
	ret += '<div id="f_3243543179_primadd_text_'+f_3243543179_textCnt+'">bookmark at ....</div>';
	ret += '<ul id="f_3243543179_primadd">';
	for (var i = 0; i < f_3243543179_list.length; i++)
	{
		var service = f_3243543179_list[i][0];
		var offset_y = f_3243543179_list[i][2];
		var domain = f_3243543179_list[i][3];

		ret += '<li><a onMouseover="f_3243543179_displayText('+f_3243543179_textCnt+', 1,'+i+');" onMouseout="f_3243543179_displayText('+f_3243543179_textCnt+',0,0);" onclick="f_3243543179_gotoService('+"'"+service+"'"+'); return false;" href="'+ domain + '">' + 
		'<div style="background-position: 0px -'+(offset_y*32)+'px;"></div></a></li>';
	}
	return ret + '</ul>';
}
