//-----------------------------------------------------------------
// expand/collapse the specified id and toggle the icons
//-----------------------------------------------------------------
function icprefs_hideshow(id, action, storesetting)
{
  // toggle the show/hide icons
  if (action == "show") { 
    document.getElementById(id).style.display = "";
    document.getElementById("show_" + id + "_icon").style.display = "none";
    document.getElementById("hide_" + id + "_icon").style.display = "";
  }
  else {
    document.getElementById(id).style.display = "none";
    document.getElementById("show_" + id + "_icon").style.display = "";
    document.getElementById("hide_" + id + "_icon").style.display = "none";
  }

  if( storesetting )
    set_icprefs(id, action);
}

function newsdesc_hideshow(id, action, storesetting)
{
 var container = document.getElementById("anwcxpc" + id);
 if( action=="expand" )
 { 
    container.className = "newsxp";
    var expButton = document.getElementById("anwcexp" + id);
    if( expButton )
      expButton.style.display = "none";
    var colButton = document.getElementById("anwccol" + id);
    if( colButton )
      colButton.style.display = "";
 }
 else
 { 
    container.className = "newsxp newsxpcol";
     var expButton = document.getElementById("anwcexp" + id);
    if( expButton )
      expButton.style.display = "";
    var colButton = document.getElementById("anwccol" + id);
    if( colButton )
      colButton.style.display = "none";
 }
  if( storesetting )
    set_icprefs("h" + id, action);
}

function ReloadScript(id)
{
 var oldurl = document.getElementById(id).src;
 var pos = oldurl.indexOf("&dummy=");
 var newurl = oldurl.substring(0,pos>=0 ? pos : oldurl.length) + "&dummy=" + escape(new Date().toString());
 document.getElementById(id).src = newurl;
}



function set_icprefs(cookie, info)
{
  if( cookie=="searchcat" )
    window.open("/nlapps/diversen/storepref.asp?close=1&key=" + cookie + "&value=" + info,
            "_blank","toolbar=no,width=10,height=10,resizable=no,status=no,scrollbars=no,left=50,top=50");
  else
    window.open("/nlapps/diversen/storepref.asp?key=" + cookie + "&value=" + info,
            "storepref","toolbar=no,width=10,height=10,resizable=no,status=no,scrollbars=no,left=50,top=50");
}

function openPrefs()
{
	var win = window.open('/nlapps/diversen/preferences_f.asp','pref','top=100,left=100,width=425,height=480');
}
document.write('<'+'iframe style="display:none" id="storepref" name="storepref" src="/nlapps/dummy.htm"><'+'/iframe>');
