function dispmenu() {
 displm (0);
 }

function displm(nr,na) {
if (na == undefined) { na=0; }
 var lm = document.getElementById('menuleft');
 var act='subs';
 var sub='sub';
 var n=0;
 for (var i in lm.childNodes) {
  var p=lm.childNodes[i];
  if (p.className == undefined) {continue;}
  if (p.className.indexOf(sub)!=(p.className.length-4)) {continue;}	// is it a class name ending with 'sub%'
  n=n+1;
 if (n<nr) {continue;}
  if (((p.className.indexOf(act)==(p.className.length-4)) || (n==nr)) && na==0) { p.style.display='block'; }
  else { p.style.display='none'; }
  }
 }

function WinLnk(lnk,wi,he) { var w;
 var s="";if (he>0) s=" height="+he; if (wi>0) s=" width="+wi;
 w=window.open("","Photo", "width=40,height=40,status=yes,resizable=yes");
 w.document.open("text/html");
 w.document.writeln("<html><head><title>Photo</title><script language='javascript1.2'>");
 w.document.writeln("function WinLnkS(){var id=window.document.getElementById('photo'); window.resizeTo(id.width+5,id.height+50);}");
 w.document.writeln("</script></head><body style='margin:0;' onLoad='WinLnkS()'><img id='photo' src='"+lnk+"'"+s+"></body></html>");
// w.document.writeln("<html><head><title>Photo</title></head><body style='margin:0'><img id='photo' src='"+lnk+"'"+s+"></body></html>");
 w.document.close();
 w.focus();
 }

 function SymError() { return true; }
 window.onerror = SymError;

 function writeContact (usr,sit,nam,fmt) {
 if ((nam == undefined) || (nam == '') ) { nam=usr + '@' + sit; }
 if (fmt == undefined) { fmt=''; }
 if (sit.length == 0) { document.write('<a hr'+'ef=\"ma'+'ilto:\">' + nam + '<\/a>'); }
 else { document.write('<a ' + fmt + 'hr'+'ef=\"ma'+'ilto:' + usr + '@' + sit + '\">' + nam + '<\/a>'); }
 }

// function MM_preloadImages(){
// var d=document;if(d.images){
//  if(!d.MM_p) d.MM_p=new Array();
//  var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
//  for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}
// }}
//  onLoad=MM_preloadImages(",lnk,")


function printpr(doc) { var wi;

scrollTo(0,0);
print(doc);

// var OLECMDID = 7;
/* OLECMDID values:
* 6 - print
* 7 - print preview
* 1 - open window
* 4 - Save As
*/
// var PROMPT = 1; // 2 DONTPROMPTUSER 
// var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
// document.body.insertAdjacentHTML('beforeEnd', WebBrowser); 
// WebBrowser1.ExecWB(OLECMDID, PROMPT);
// WebBrowser1.outerHTML = "";
}

function MyTip (cod, txt, tit) { 
 switch(cod) {
  case "button":
//   alert (txt);
   return Tip(txt, TITLE, tit, ABOVE, true, SHADOW, true, JUMPHORZ, true);
  }
 }

