// JavaScript Document
var currentTab = 1;


function slideClick(slideSelected) {	
	tabSelect = slideSelected;			
	if (((tabSelect == 2) && (currentTab == 1)) || ((tabSelect == 1) && (currentTab == 2))){
		slideUp.start();
	}
	changeTabBackground();
}
function changeTabBackground(){
	if (tabSelect == 2) {
		document.getElementById("sharetab1").style.backgroundPosition = "0px 0px";
		document.getElementById("sharetab2").style.backgroundPosition = "0px -28px";
		/*document.getElementById("sharetab1").style.backgroundImage = "url(images/buttons/share-panel-out.jpg)";
		document.getElementById("sharetab2").style.backgroundImage = "url(images/buttons/share-panel-over.jpg)";*/
	} else {
		document.getElementById("sharetab1").style.backgroundPosition = "0px -28px";
		document.getElementById("sharetab2").style.backgroundPosition = "0px 0px";
	}
}
function slidePanel() {
	//alert (tabSelect);
	if (tabSelect == 2) {
		document.getElementById("slide1").style.display = "none";
		document.getElementById("slide2").style.display = "block";
		tabSelect = 2;
	} else {
		document.getElementById("slide1").style.display = "block";
		document.getElementById("slide2").style.display = "none";		
		tabSelect = 1;
	}
	slideDown.start();	
	currentTab = tabSelect;
}

function flipArrow(arrow) {
	//alert (document.getElementById("moreArrow"+arrow).style.backgroundPosition);
	if (document.getElementById("moreArrow"+arrow).style.backgroundPosition != "0px -15px") {		
		document.getElementById("moreArrow"+arrow).style.backgroundPosition = "0px -15px";
	} else {
		document.getElementById("moreArrow"+arrow).style.backgroundPosition = "0px 0px";
	}
}
