function makeLIlinks(list){
if (list != null)
  {
	for( var i=0; i<list.childNodes.length; i++ ){
		if (list.childNodes[i].tagName == "LI"){
			
			list.childNodes[i].onclick = followLink;
			list.childNodes[i].onmouseover = mouseover;
			list.childNodes[i].onmouseout = mouseout;
			list.childNodes[i].style.cursor = 'pointer';
			
			
			for ( var j=0; j<list.childNodes[i].childNodes.length; j++ ){
				if (list.childNodes[i].childNodes[j].tagName == "UL"){
						 makeLIlinks(list.childNodes[i].childNodes[j]);
				}
			}
		}
	}
  }	
}

function followLink(){

	if(!e) var e = window.event;
	
	if (this.firstChild.href)
	    {
	    
        if (navigator.appName == "Microsoft Internet Explorer")
            {
            window.location = this.firstChild.href;
            }
		}
	if (e)
	    {
	    e.cancelBubble = true;
	    e.returnValue = false;
	    }
}

function mouseover(){
		this.className = this.className.replace(/\w?over/g, '');
		this.className = this.className + ' over';
}

function mouseout(){
		this.className = this.className.replace(/over/g, '');

}

function show(thetab, details){
	
	thetabs = thetab.parentNode.childNodes;
	
	for ( var i=0; i< thetabs.length; i++){
		if (thetabs[i].className != '')
			thetabs[i].className = '';
	}
	
	thetab.className = 'active';
	
	thetabs = document.getElementById('tab_details').childNodes;
	for ( var i=0; i< thetabs.length; i++)
		thetabs[i].className = '';
	
	document.getElementById(details).className = 'active';
	
	
	
	if (document.getElementById('txtTab') != null)
	    {	    
	    document.getElementById('txtTab').value = details;
	    }
	
	
	try{
	if ( ie6 ){ 
		document.styleSheets[0].disabled = true;
		document.styleSheets[0].disabled = false;
	}
	}
	catch(e){}
	
	
	

}

function GetUrlParameterValue(name)
{  

name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
var regexS = "[\\?&]"+name+"=([^&#]*)";  
var regex = new RegExp( regexS );  
var results = regex.exec( window.location.href );  
if( results == null )    
    return "";  
else    
    return results[1];
}





function RunUrlParam()
    {
    var value = GetUrlParameterValue("EventID");    
    if (value != "")
        {        
        var tabobj = document.getElementById('tabs');        
        //this passes in the Register tab
        show(tabobj.childNodes[2], 'Register');        
        }
     } 
     
     
   
     //this toggles the processingimage animation gif for ajax calls
     function toggleLayer( whichLayer )
     {  
     var elem, vis;  
     if( document.getElementById )      // this is the way the standards work   
        elem = document.getElementById( whichLayer );  
     else if( document.all ) // this is the way old msie versions work      
        elem = document.all[whichLayer];  
     else if( document.layers ) // this is the way nn4 works    
     elem = document.layers[whichLayer];  
     vis = elem.style;  // if the style.display value is blank we try to figure it out here  
     if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)   
         vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';  
     vis.display = (vis.display==''||vis.display=='block')?'none':'block';
     }
     
     
function PrintFriendly()
{
var url = location.href;

if (url.indexOf("?") >= 0)
    {
    window.open(url + "&print=1");
    }
else
    {
    window.open(url + "?print=1");
    }

}     
