function togglediv(div_id)
{
	if (!div_id) return;
	
	var container = document.getElementById(div_id);
	var status    = container.style.display;
	
	if (status == 'none')
	{
		container.style.display = 'block';
	}
	else 
	{
		container.style.display = 'none';
	}
}

function enableDropdownMenuForIE()
{
    if (document.all)
	{
        uls = document.getElementsByTagName('UL');

        for(i = 0; i < uls.length; i++)
        {
            if (uls[i].className == 'dropExtra' || uls[i].className == 'dropVacation'  || uls[i].className == 'dropSport')
            {
                var lis = uls[i].getElementsByTagName('li');

                for (j = 0; j < lis.length; j++)
                {
                    if(lis[j].lastChild.tagName == 'UL')
                    {
                        lis[j].onmouseover = function() { this.lastChild.style.display = 'block'; }
                        lis[j].onmouseout = function() { this.lastChild.style.display = 'none'; }
                    }
                }
            }
        }
    }
}

function rollOver(element) {
	//change the colour
	//alert(element);
	element.className += (element.className?' ':'') + 'CSStoHighlight';
	//alert(element.className);
	//change display of child
	for( var x = 0; element.childNodes[x]; x++ )
	{
		//alert(element.childNodes[x]);
		if( element.childNodes[x].tagName == 'UL' ) { element.childNodes[x].className += (element.childNodes[x].className?' ':'') + 'CSStoShow'; }
		if( element.childNodes[x].tagName == 'A' ) { element.childNodes[x].className += (element.childNodes[x].className?' ':'') + 'CSStoHighLink'; }
	}
}

function rollOff(element) {
	//change the colour
	element.className = element.className.replace(/ ?CSStoHighlight$/,'');
	//change display of child
	for( var x = 0; element.childNodes[x]; x++ ){
		if( element.childNodes[x].tagName == 'UL' ) { element.childNodes[x].className = element.childNodes[x].className.replace(/ ?CSStoShow$/,''); }
		if( element.childNodes[x].tagName == 'A' ) { element.childNodes[x].className = element.childNodes[x].className.replace(/ ?CSStoHighLink$/,''); }
	}
}

function setChkbox(obj,id_db)	
{
	if (obj.checked==true) 
	{
		document.getElementById(id_db).value=1;
	}	
	else	
	{
		document.getElementById(id_db).value=0;
	}
}

function deleteEntry(confirm_text,redirect_link)
{
	check = confirm(confirm_text);
	if (check === true)
	{
		document.location.href = redirect_link;
	}
	else
	{
		return false;
	}
}