
// social-networking share buttons 
function digg(url, title, synopsis) {
	var genreStr;
	var urlStr = 'http://digg.com/submit?phase=2&url=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&title=' + t;
	var s = encodeURIComponent(synopsis).replace(/%E2%80%99/g,"%27");
	urlStr += '&bodytext=' + s;


	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function stumble(url, title) {
	var urlStr = 'http://www.stumbleupon.com/submit?url=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&title=' + t;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function delicious(url, title) {
	var urlStr = 'http://del.icio.us/post?url=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&title=' + t;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function netscape(url, title, synopsis) {
	var genreStr;
	var urlStr = 'http://www.netscape.com/submit/?U=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	if(title.length < 10) title = "AtomFilms: " + title;
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&T=' + t;
	var s = encodeURIComponent(synopsis).replace(/%E2%80%99/g,"%27");
	//encode m-dash &#8212; properly
	s = s.replace(/%E2%80%94/g,"--");
	urlStr += '&C=' + s;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function mywebyahoo(url, title) {
	var urlStr = 'http://myweb2.search.yahoo.com/myresults/bookmarklet?u=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&t=' + t;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function furl(url, title) {
	var urlStr = 'http://www.furl.net/savedialog.jsp?u=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&t=' + t;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function reedit(url, title) {
	var urlStr = 'http://reddit.com/submit?url=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&title=' + t;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function technorati(url) {
	var urlStr = 'http://www.technorati.com/faves?add=' + encodeURIComponent(url);

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function ask(url, title, synopsis) {
	var urlStr = 'http://myjeeves.ask.com/mysearch/BookmarkIt?v=1.2&t=webpages&url=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&title=' + t;
	var s = encodeURIComponent(synopsis).replace(/%E2%80%99/g,"%27");
	urlStr += '&abstext=' + s;
	
	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function google(url, title) {
	var urlStr = 'http://www.google.com/bookmarks/mark?op=edit&bkmk=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&title=' + t;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function simpy(url, title, synopsis) {
	var genreStr;
	var urlStr = 'http://www.simpy.com/simpy/LinkAdd.do?href=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&title=' + t;
	var s = encodeURIComponent(synopsis).replace(/%E2%80%99/g,"%27");
	urlStr += '&note=' + s;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function misterwong(url, title) {
	var urlStr = 'http://www.mister-wong.com/index.php?action=addurl&bm_url=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&bm_description=' + t;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function magnolia(url, title) {
	var urlStr = 'http://ma.gnolia.com/bookmarklet/add?url=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&title=' + t;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function netvouz(url, title, synopsis) {
	var genreStr;
	var urlStr = 'http://netvouz.com/action/submitBookmark?url=' + encodeURIComponent(url);

	//encode single-quote entity &#8217; properly
	var t = encodeURIComponent(title).replace(/%E2%80%99/g,"%27");
	urlStr += '&title=' + t;
	var s = encodeURIComponent(synopsis).replace(/%E2%80%99/g,"%27");
	urlStr += '&description=' + s;

	//alert(urlStr);
	var newWindow = window.open(urlStr,'blank');
	newWindow.focus();
}

function facebook(u) {
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u), 'blank', 'resizable=1,toolbar=0,status=0,width=626,height=436');
}



// this toggles multiple Tabs
function toggleMultiTabs ( showNum, prefix, numberTabs ) {
	for (i=1; i < numberTabs+1 ;i++) {
		if ( i == showNum ) {
			//show
			document.getElementById( prefix + 'Pod' + i ).style.display = 'block';
			document.getElementById( prefix + 'Tab' + i ).className = 'current';
		} else {
			//hide
			document.getElementById( prefix + 'Pod' + i ).style.display = 'none';
			document.getElementById( prefix + 'Tab' + i ).className = '';
		}
	}
}
