

function sets(val, url, title)
{
	var u = url;
	var tit = title;
	var urls = new Array();
	urls['google'] = 'http://www.google.com/bookmarks/mark?op=add&bkmk=';
	urls['delicious'] = 'http://delicious.com/save?url=';
	urls['digg'] = 'http://digg.com/submit/?phase=2&partner=%5bpartner%5d&url='; // need login 
	urls['myspace'] = 'http://www.myspace.com/Modules/PostTo/Pages/?u=';
	urls['facebook'] = 'http://www.new.facebook.com/sharer.php?u=';
	urls['linkedin'] = 'http://www.linkedin.com/shareArticle?summary=+&mini=true&ro=true&source=+&url=';
	urls['furl'] = 'http://www.furl.net/savedialog.jsp?p=1&u=';
	urls['myweb'] = 'http://myweb.yahoo.com/myresults/bookmarklet?&ei=UTF-8&u=';
	urls['su'] = 'http://www.stumbleupon.com/submit?url=';
	urls['reddit'] = 'http://www.reddit.com/submit?url=';
	urls['newsvine'] = 'http://www.newsvine.com/_tools/seed&save?u=';
	urls['live'] = 'https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url=';
	urls['technorati'] = 'http://technorati.com/faves?add=';
	urls['twitter'] = 'http://twitter.com/home?status=';
	urls['yahoobkm'] = 'http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&u=';
	urls['aolfav'] = 'http://favorites.my.aol.com/ffclient/webroot/0.4.3/src/html/addBookmarkDialog.html?url=';
	urls['ask'] = 'http://myjeeves.ask.com/mysearch/BookmarkIt?v=1.2&t=webpages&url=';
	urls['fark'] = 'http://cgi.fark.com/cgi/fark/submit.pl?new_url='; // not working  
	urls['slashdot'] = 'http://slashdot.org/bookmark.pl?url=';
	urls['netscape'] = 'http://www.propeller.com/story/submit/?U='; // not working 
	urls['mixx'] = 'http://www.mixx.com/submit?page_url='; // need login
	urls['multiply'] = 'http://sham012.multiply.com/journal/compose?body=&url='; // need username.
	urls['simpy'] = 'http://www.simpy.com/simpy/LinkAdd.do?href=';
	urls['blogmarks'] = ''; // need invite to register
	urls['diigo'] = 'http://secure.diigo.com/post?url=';
	urls['bluedot'] = 'http://faves.com/Authoring.aspx?u=';
	urls['spurl'] = 'http://www.spurl.net/spurl.php?url=';
	urls['linkagogo'] = 'http://www.linkagogo.com/go/AddNoPopup?url=';
	urls['misterwong'] = 'http://www.mister-wong.com/index.php?action=addurl&bm_url=';
	urls['feedmelinks'] = ''; // need invite to register      
	urls['backflip'] = 'http://www.backflip.com/add_page_pop.ihtml?url=';
	urls['magnolia'] = 'http://ma.gnolia.com/bookmarklet/add?url=';
	urls['segnalo'] = 'http://segnalo.alice.it/post.html.php?url=';
	urls['netvouz'] = '' ; // public registration disabled .
	
	var titles = new Array();

	titles['favorites'] = '';
	titles['google'] = 'title';
	titles['delicious'] = 'title';
	titles['digg'] = 'title';
	titles['myspace'] = 't';
	titles['facebook'] = 't';
	titles['linkedin'] = 'title';
	titles['furl'] = 't';
	titles['myweb'] = 't';
	titles['su'] = 'title';
	titles['reddit'] = 'title';
	titles['newsvine'] = 'h';
	titles['live'] = 'title';
	titles['technorati'] = '';
	titles['twitter'] = '';
	titles['yahoobkm'] = 't';
	titles['aolfav'] = 'titles';
	titles['ask'] = 'titles';
	titles['fark'] = 'new_comment';
	titles['slashdot'] = 'title';
	titles['netscape'] = 'T';
	titles['mixx'] = '';
	titles['multiply'] = 'subject';
	titles['simpy'] = 'title';
	titles['blogmarks'] = '';
	titles['diigo'] = 'title';
	titles['bluedot'] = 't';
	titles['spurl'] = 'title';
	titles['linkagogo'] = 'title';
	titles['misterwong'] = 'bm_description';
	titles['feedmelinks'] = '';
	titles['backflip'] = 'title';
	titles['magnolia'] = 'title';
	titles['segnalo'] = 'title';
	titles['netvouz'] = '' ;
	var str = Trim(val);
	log_omniture('bookmarkit:'+str);
	//alert(urls[str]+u+'&'+titles[str]+'='+tit);
	window.open(urls[str]+encodeURIComponent(u)+'&'+titles[str]+'='+encodeURIComponent(tit));

	jQuery.get('/_x.php', {'__a__':'shbmlog', 'a':str, 'g':jQuery('#GET').val()});
}


function sendMsg(){
		
		var text = document.send.messages.value;
		var text = Trim(text);
		
		if(text == ''){
			document.getElementById('dispError').innerHTML='please do not leave blank!'
		}else{
			document.send.submit();
			document.getElementById('plWt').style.display='block'
		}
		
	}


//##################---Trim---#############################

function LTrim(str)
{
  var whitespace = new String(" \t\n\r");

  var s = new String(str);

  if (whitespace.indexOf(s.charAt(0)) != -1) {
    // We have a string with leading blank(s)...

    var j=0, i = s.length;

    // Iterate from the far left of string until we
    // don't have any more whitespace...
    while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
    j++;


    // Get the substring from the first non-whitespace
    // character to the end of the string...
    s = s.substring(j, i);
  }

  return s;
}

// --------------------------------------------------------------------------
// Remove trailing blanks from our string.

// I               str - the string we want to RTrim
// Return          the input string without any trailing whitespace

// Date            03 avr. 2003 23:13:50
// Author          Aurélien Tisné	(CS)
// --------------------------------------------------------------------------
function RTrim(str)
{
  // We don't want to trip JUST spaces, but also tabs,
  // line feeds, etc.  Add anything else you want to
  // "trim" here in Whitespace
  var whitespace = new String(" \t\n\r");

  var s = new String(str);

  if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
    // We have a string with trailing blank(s)...

    var i = s.length - 1;       // Get length of string

    // Iterate from the far right of string until we
    // don't have any more whitespace...
    while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
      i--;


    // Get the substring from the front of the string to
    // where the last non-whitespace character is...
    s = s.substring(0, i+1);
  }

  return s;
}


// --------------------------------------------------------------------------
// Remove trailing and leading blanks from our string.

// I               str - the string we want to Trim
// Return          the trimmed input string

// Date            03 avr. 2003 23:15:09
// Author          Aurélien Tisné	(CS)
// --------------------------------------------------------------------------
function Trim(str)
{
  return RTrim(LTrim(str));
}

//######################################
function CreateBookmarkLink(u, t) {
	var title = t;  // Webpage Title  web sayfasÄ±n başlığı
	  // Blogger - Replace with <$BlogItemTitle$> 
	  // MovableType - Replace with <$MTEntryTitle$>

	var url = u;  //   Webpage URL  (web sayfasının url si )
	  // Blogger - Replace with <$BlogItemPermalinkURL$> 
	  // MovableType - Replace with <$MTEntryPermalink$>
	  // WordPress - <?php bloginfo('url'); ?>
	log_omniture('bookmarkit:favourite');
		if (window.sidebar) { // Mozilla Firefox Bookmark
			window.sidebar.addPanel(title, url,"");
		} else if( window.external ) { // IE Favorite
			window.external.AddFavorite( url, title); }
		else if(window.opera && window.print) { // Opera Hotlist
			return true; }
	}

	
