function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_controlSound(x, sndObj, sndFile) { //v3.0 
 var i, method = "", sndObj = eval(sndObj); 
 if (sndObj != null) { 
 if (navigator.appName == 'Netscape') method = "play"; 
 else { 
 if (window.MM_WMP == null) { 
 window.MM_WMP = false; 
 for(i in sndObj) if (i == "ActiveMovie") { 
 window.MM_WMP = true; break; 
 } } 
 if (window.MM_WMP) method = "play"; 
 else if (sndObj.FileName) method = "run"; 
 } } 
 if (method) eval(sndObj+"."+method+"()"); 
 else window.location = sndFile; 
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


/*!
    Invert the status of checkboxes named 'checkboxname' in form 'formname'.
    If you have a list of checkboxes name them with 'someName[]' in order to toggle them all.
*/
function ezjs_toggleCheckboxes( formname, checkboxname )
{
    with( formname )
	{
        for( var i=0; i<elements.length; i++ )
        {
            if( elements[i].type == 'checkbox' && elements[i].name == checkboxname && elements[i].disabled == "" )
            {
                if( elements[i].checked == true )
                {
                    elements[i].checked = false;
                }
                else
                {
                    elements[i].checked = true;
                }
            }
        }
    }
}


function toggleVisibility( name )
{
    document.getElementById( name ).className = document.getElementById( name ).className == "vis" ? "invis" : "vis";
}

function handleFrontpageLightbox( onlyOnce )
{
    if ( onlyOnce )
    {
        if ( jQuery.cookie('FrontpagePopupWasShown' ) == '1' ) return;

        jQuery.cookie('FrontpagePopupWasShown', '1', { expires: 365 });
    }

    jQuery("#frontpage-lightbox" ).dialog({
        modal: true,
        autoOpen: true,
        draggable: false,
        resizable: false,
        width: 975
    });
}

function closeFrontpageLightbox()
{
    jQuery("#frontpage-lightbox" ).dialog( "close" );
}

