var socBookmarks_onload

document.write ( "<style type=\"text/css\" media=\"screen\">@import \"_assets/client/css/default/packages-css/jsSocialBookmarks.css\";</style>")


if ( window.onload )
{
	socBookmarks_onload = window.onload
}
window.onload = socialBookmarkInit
function socialBookmarkInit()

{
	
	var DIV = document.getElementById("social-bookmarks")
	DIV.style.position = "relative"
	DIV.getElementsByTagName("UL")[0].style.display = "none"

	// Create Expand Link
	var expand = document.createElement("A")
	expand.href = "#"
	expand.id = "expand"
	var txt = document.createTextNode ("Share This")
	expand.appendChild(txt)
	expand.onclick = expandUL
	DIV.appendChild(expand)	
	
	// Create Close Link
	var close = document.createElement("A")
	close.href = "#"
	close.id = "close"
	var txt = document.createTextNode ("Close")
	close.appendChild(txt)
	close.onclick = closeUL
	close.style.display = "none"
	DIV.appendChild(close)	
	
	if (socBookmarks_onload )
	{
		socBookmarks_onload()
	}
	
	
}

function expandUL()
{
	var DIV = document.getElementById("social-bookmarks")
	document.getElementById("close").style.display = "block"
	document.getElementById("expand").style.display = "none"
	var linkHeight = document.getElementById("close").offsetHeight

	DIV.getElementsByTagName("UL")[0].style.display = "block"	
	var ULy = DIV.getElementsByTagName("UL")[0].offsetHeight;
	DIV.getElementsByTagName("UL")[0].style.position = "absolute"
	//DIV.getElementsByTagName("UL")[0].style.background = "#fff"
	DIV.getElementsByTagName("UL")[0].style.top = "-" + parseInt(ULy) + "px"
	return false
}	

function closeUL()
{
	var DIV = document.getElementById("social-bookmarks")
	document.getElementById("close").style.display = "none"
	document.getElementById("expand").style.display = "block"
	DIV.getElementsByTagName("UL")[0].style.display = "none"	
	return false
}	




