// JavaScript Document - blog comments
function xToggleLayer(id) {
	var el = document.getElementById(id).style;
	if(el.display == "none") {
		for (var i=1;i<=2;i++ ) {
			//alert(' - Closing '+i+' - ');
			var nel = document.getElementById('mn'+i).style;
			nel.display = 'none';
		}
		el.display = "block";
	}else if(el.display == "block") {
		el.display = "none";
	}
}

function toggleT(_w,_h) {
	if (document.all) { // is IE
		if (_h=='s') eval("document.all."+_w+".style.visibility='visible';");
		if (_h=='h') eval("document.all."+_w+".style.visibility='hidden';");
	} else { // is NS? 
	if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
		if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
	}
}

function toggleLayer(id) { 
	var el = document.getElementById(id).style; 
	if(el.display == "none") { 
		el.display = "block"; 
	} 
	else if(el.display == "block") { 
		el.display = "none"; 
	} 
} 

function showDisplay(id,display) { 
	document.getElementById(id).style.display=display; 
}

// JavaScript Document - Social Web
function akst_share(url, title) {	
	document.getElementById('akst_delicious').href = akst_share_url("http://del.icio.us/post?url={url}&title={title}", url, title);
	document.getElementById('akst_digg').href = akst_share_url("http://digg.com/submit?phase=2&url={url}&title={title}", url, title);
	document.getElementById("akst_furl").href = akst_share_url("http://furl.net/storeIt.jsp?u={url}&t={title}", url, title);
	document.getElementById("akst_netscape").href = akst_share_url(" http://www.netscape.com/submit/?U={url}&T={title}", url, title);
	document.getElementById("akst_yahoo_myweb").href = akst_share_url("http://myweb2.search.yahoo.com/myresults/bookmarklet?u={url}&t={title}", url, title);
	document.getElementById("akst_stumbleupon").href = akst_share_url("http://www.stumbleupon.com/submit?url={url}&title={title}", url, title);
	document.getElementById("akst_google_bmarks").href = akst_share_url("  http://www.google.com/bookmarks/mark?op=edit&bkmk={url}&title={title}", url, title);
	document.getElementById("akst_technorati").href = akst_share_url("http://www.technorati.com/faves?add={url}", url, title);
	document.getElementById("akst_blinklist").href = akst_share_url("http://blinklist.com/index.php?Action=Blink/addblink.php&Url={url}&Title={title}", url, title);
	document.getElementById("akst_newsvine").href = akst_share_url("http://www.newsvine.com/_wine/save?u={url}&h={title}", url, title);
	document.getElementById("akst_magnolia").href = akst_share_url("http://ma.gnolia.com/bookmarklet/add?url={url}&title={title}", url, title);
	document.getElementById("akst_reddit").href = akst_share_url("http://reddit.com/submit?url={url}&title={title}", url, title);
	document.getElementById("akst_windows_live").href = akst_share_url("https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url={url}&title={title}&top=1", url, title);
	//document.getElementById("akst_tailrank").href = akst_share_url("http://tailrank.com/share/?link_href={url}&title={title}", url, title);	
	
	//Calling 21 New Services
	document.getElementById("akst_facebook").href = akst_share_url("http://www.facebook.com/share.php?u={url}", url, title);
	document.getElementById("akst_yahoo_bmarks").href = akst_share_url("http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&u={url}&t={title}", url, title);
	document.getElementById("akst_slashdot").href = akst_share_url("http://slashdot.org/bookmark.pl?url={url}&title={title}", url, title);
	document.getElementById("akst_n4g").href = akst_share_url("=http://www.n4g.com/tips.aspx?url={url}&title={title}", url, title);
	document.getElementById("akst_blogmarks").href = akst_share_url("http://blogmarks.net/my/new.php?mini=1&url={url}&title={title}", url, title);
	document.getElementById("akst_current").href = akst_share_url("http://current.com/clipper.htm?url={url}&title={title}&src=st", url, title);
	document.getElementById("akst_meneame").href = akst_share_url("http://meneame.net/submit.php?url={url}", url, title);
	document.getElementById("akst_oknotizie").href = akst_share_url("http://oknotizie.alice.it/post?url={url}title={title}", url, title);
	document.getElementById("akst_diigo").href = akst_share_url("http://secure.diigo.com/post?url={url}&title={title}", url, title);
	document.getElementById("akst_funp").href = akst_share_url("http://funp.com/pages/submit/add.php?title={title}&url={url}&via=tools", url, title);
	document.getElementById("akst_hugg").href = akst_share_url("http://www.hugg.com/node/add/storylink?edit[title]={title}&edit[url]={url}", url, title);
	document.getElementById("akst_myspace").href = akst_share_url("http://www.myspace.com/Modules/PostTo/Pages/?l=3&u={url}&t={title}", url, title);
	document.getElementById("akst_propeller").href = akst_share_url("http://www.propeller.com/submit/?U={url}&T={title}", url, title);
	document.getElementById("akst_mixx").href = akst_share_url("http://www.mixx.com/submit?page_url={url}", url, title);
	document.getElementById("akst_mister_wong").href = akst_share_url("http://www.mister-wong.com/index.php?action=addurl&bm_url={url}&bm_description={tile}", url, title);
	document.getElementById("akst_faves").href = akst_share_url("http://www.faves.com/Authoring.aspx?u={url}&t={title}", url, title);
	document.getElementById("akst_simpy").href = akst_share_url("http://www.simpy.com/simpy/LinkAdd.do?href={url}&title={title}", url, title);
	document.getElementById("akst_yigg").href = akst_share_url("=http://www.yigg.de/neu?exturl={url}&exttitle={title}", url, title);
	document.getElementById("akst_fresqui").href = akst_share_url("http://ocio.fresqui.com/post?url={url}&title={title}", url, title);
	document.getElementById("akst_care2").href = akst_share_url("http://www.care2.com/news/compose?share[link_url]={url}&share[title]={title}", url, title);
	document.getElementById("akst_kirtsy").href = akst_share_url("http://www.kirtsy.com?submit.php?url={url}", url, title);
	
	document.getElementById('akst_form').style.display='block';
}

function akst_share_url(base, url, title) {
	base = base.replace('{url}', url);
	return base.replace('{title}', title);
}
