var calActive = "no";

var stampExpanded = false;

function expandStampEditArea()
{
  document.getElementById('stampEditor').style.height = (document.body.clientHeight - 218) + "px";
}

function expandSection() {
	/*if (stampExpanded == false) {
		document.getElementById('stampEditor').style.display = "inline";
		document.getElementById('stampEditor').innerHTML = document.getElementById('headText').innerHTML;
		document.getElementById('headText').innerHTML = "";
		stampExpanded = true;
	} else {
		document.getElementById('headText').innerHTML = document.getElementById('stampEditor').innerHTML;
		document.getElementById('stampEditor').style.display = "none";	
		stampExpanded = false;
	}*/
}



function setVisibility(id, state) {
	if(state=='table-row' && whichBrs()=='Internet Explorer')
		document.getElementById(id).style.display='block';
	else
		document.getElementById(id).style.display=state;
}

function popDown(id) {
	document.getElementById(id).style.top='8.86em';
	document.getElementById(id + 'Trans').style.top='8.86em';
}

function popUp(id) {
	document.getElementById(id).style.top='5.86em';
	document.getElementById(id + 'Trans').style.top='5.86em';
}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}

function openPlayer(src) {
	window.open(src,"MusicPlayer", "menubar=no,width=468,height=200,toolbar=no,status=no");
}

function calActivate() {
	calActive = "yes";
}
function calDeactivate() {
	calActive = "no";
}
/*
function getMouseMove() {
	var isIE = document.all;
	document.onmousemove = getMouseXY;

	var mouseX = 0;
	var mouseY = 0;

	function getMouseXY(e)
		{ 
 		 if (!e) e = window.event;
 		 if (e)
 			 { 
			  mouseX = isIE ? (e.clientX + document.body.scrollLeft) : e.clientX;
			  mouseY = isIE ? (e.clientY + document.body.scrollTop) : e.clientY;
			 }
		mouseX += 5;
		mouseY += 5;
		//alert(document.body.scrollLeft);
		if ((mouseX+200) >= document.body.scrollLeft) {
			document.getElementById("concertDetail").style.left = (mouseX-210)+'px';
		} else {
			document.getElementById("concertDetail").style.left = mouseX+'px';
		}
		document.getElementById("concertDetail").style.top = mouseY+'px';
		return true
	}
}
*/

function getMouseMove() {
	var isIE = document.all;
	document.onmousemove = getMouseXY;

	var mouseX = 0;
	var mouseY = 0;

	function getMouseXY(e)
		{ 
 		 if (!e) e = window.event;
 		 if (e)
 			 { 
			  mouseX = e.clientX;
			  mouseY = e.clientY;
			 }
			 
		var ScrollTop = document.body.scrollTop;

		if (ScrollTop == 0)	{
			if (window.pageYOffset)
				ScrollTop = window.pageYOffset;
			else
				ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
		}
		
		//alert(ScrollTop);
		
		mouseX += 5;
		mouseY += ScrollTop + 10;
		
		if ((mouseX+200) >= document.body.scrollLeft) {
			document.getElementById("concertDetail").style.left = (mouseX-190)+'px';
		} else {
			document.getElementById("concertDetail").style.left = mouseX+'px';
		}
		document.getElementById("concertDetail").style.top = mouseY+'px';
		return true
	}
}
function getMouseStop() {
	document.onmousemove = "null";
	hidePopUp();
}


function showPopUp(details) 
{ 
	
    var div; 

	div = document.getElementById('concertDetail'); 
   
    if(div.style.display== '' && div.offsetWidth != undefined && div.offsetHeight != undefined) 
    { 
        div.style.display = (div.offsetWidth!=0 && elem.offsetHeight!=0)?'inline':'none'; 
    }  

    div.style.display = (div.style.display==''||div.style.display=='inline')?'none':'inline';  

   // div.style.left = mouseX+'px'; 
    //div.style.top = mouseY+'px'; 
	div.innerHTML = details;
} 
function hidePopUp()
{
	var div; 
	div = document.getElementById('concertDetail');
	div.style.display = 'none';
}

