function printPage(){
	$(".hidePara").css("display","block");
	$(".hidePara").attr("class","showPara");
	$('[id*="collapseMenu"]').html("<img class='iconcollapse' src='/ncriconference/images/icons/collapse.gif' alt='-' border='0' width='19' height='9' />");
	$('[id*="collapseSess"]').html("<img class='iconcollapse' src='/ncriconference/images/icons/collapse.gif' alt='-' border='0' width='19' height='9' />");
	$('[id*="symposiumcollapseMenu"]').html("<img class='iconcollapse' src='/ncriconference/images/icons/collapse.gif' alt='-' border='0' width='19' height='9' />");
	window.print()
}


function showHide2(myObj) {
	alert(myObj);

}

menu_status = new Array();
function showHide(theid, collapse){

    if (document.getElementById) {
    var switch_id = document.getElementById(theid);
	var collapse = document.getElementById(collapse);
        if(switch_id.className != 'showPara') {
		   switch_id.className = 'showPara'
		   switch_id.style.display = 'block';
		   collapse.innerHTML = "<img class='iconcollapse' src='/ncriconference/images/icons/collapse.gif' alt='-' border='0' width='19' height='9' />";
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hidePara';
		   switch_id.style.display = 'none';
		   collapse.innerHTML = "<img class='iconexpand' src='/ncriconference/images/icons/expand.gif' alt='+' border='0' width='19' height='9' />";
           menu_status[theid] = 'hide';
        }
    }
}


function hidemenu(elmnt)
{ document.getElementById(elmnt).style.display="none" }

function hideAll()
{	hidemenu('informationSubMenu');
	hidemenu('programmeSubMenu');
	hidemenu('abstractsSubMenu');
	hidemenu('exhibitionSubMenu');
	hidemenu('sponsorshipSubMenu');
	hidemenu('registrationSubMenu');
	hidemenu('archiveSubMenu');
}


function showmenu(elmnt)
{ 	hideAll();
	document.getElementById(elmnt).style.display="block"
}
	
	
function showDetails(element) {
	document.getElementById(element).style.display="block"
}

function hideDetails(element) {
	document.getElementById(element).style.display="none"
}

function changeLink2(action,dispElmnt,linkElmnt) {
	
	/*var hideHTML = '<a href="#" onClick="changeLink(\'hide\',\'viewDetails\',\'sympDetails\')">(Hide Details)</a>'
	var showHTML = '<a href="#" onClick="changeLink(\'show\',\'viewDetails\',\'sympDetails\')">(Show Details)</a>'*/
	
	var hideCode = 'changeLink(\'hide\',\'sympDetails\',\'viewDetails\')';
	var showCode = 'changeLink(\'show\',\'sympDetails\',\'viewDetails\')';
	
	var hideText = '(Hide Details)';
	var showText = '(Show Details)';
	
	var hideTextNode = document.createTextNode(hideText);
	var showTextNode = document.createTextNode(showText);
	
	var anchorElement = document.createElement('a');
	
	var Link = document.getElementById(linkElmnt);
	
	if (Link.firstChild) {  Link.removeChild(Link.firstChild); }
	
	if (action == 'show') {
		document.getElementById(dispElmnt).style.display="block";
		
		anchorElement.setAttribute('onClick',hideCode);
		anchorElement.appendChild(hideTextNode);
		
		Link.appendChild(anchorElement);	
	}
	else if (action == 'hide') {
		document.getElementById(dispElmnt).style.display="none";
		
		anchorElement.setAttribute('onClick',showCode);
		anchorElement.appendChild(showTextNode);
		
		Link.appendChild(anchorElement);
	}

	
	
	
}

function changeLink(action,dispElmnt,linkElmnt) {
	
	var hideHTML = '<a href="#void" onClick="changeLink(\'hide\',\''+dispElmnt+'\',\''+linkElmnt+'\')">(Hide Details)</a>'
	var showHTML = '<a href="#void" onClick="changeLink(\'show\',\''+dispElmnt+'\',\''+linkElmnt+'\')">(Show Details)</a>'
	
	var Link = document.getElementById(linkElmnt);
	
	if (Link.firstChild) {  Link.removeChild(Link.firstChild); }
	
	if (action == 'show') {
		document.getElementById(dispElmnt).style.display="block";
		Link.innerHTML = hideHTML;	
	}
	else if (action == 'hide') {
		document.getElementById(dispElmnt).style.display="none";
		Link.innerHTML = showHTML;
	}

	
	
	
}




$(document).ready(function(){
  $("#expandAll").click(function(){
    $(".hidePara").css("display","block");
	$(".hidePara").attr("class","showPara");
	$('[id*="collapseMenu"]').html("<img class='iconcollapse' src='/ncriconference/images/icons/collapse.gif' alt='-' border='0' width='19' height='9' title='Collapse' />");
	$('[id*="collapseSess"]').html("<img class='iconcollapse' src='/ncriconference/images/icons/collapse.gif' alt='-' border='0' width='19' height='9' title='Collapse' />");
	$('[id*="symposiumcollapseMenu"]').html("<img class='iconcollapse' src='/ncriconference/images/icons/collapse.gif' alt='-' border='0' width='19' height='9' title='Collapse' />");
  });
  $("#collapseAll").click(function(){
    $(".showPara").css("display","none");
	$(".showPara").attr("class","hidePara");
	$('[id*="collapseMenu"]').html("<img class='iconexpand' src='/ncriconference/images/icons/expand.gif' alt='+' border='0' width='19' height='9' title='Expand' />");	
	$('[id*="symposiumcollapseMenu"]').html("<img class='iconexpand' src='/ncriconference/images/icons/expand.gif' alt='+' border='0' width='19' height='9' title='Expand' />");
	$('[id*="collapseSess"]').html("<img class='iconexpand' src='/ncriconference/images/icons/expand.gif' alt='+' border='0' width='19' height='9' title='Expand' />");
  });  
  $("#printPage").click(function(){  
  	printPage();
  });
});;



