function mnuOver(m) {
  if (m.className=="mnuitem") {
    m.className = "mnusel";
  } else {
    m.className = "mnuitem";
  }
}

function highlightmenu(nm) {
  var m = document.getElementById(nm);
  var p = m.innerText;
  m.outerHTML = '<span>'+p+'</span>';
//  alert(p);
}

function highlightgmenu(nm,fn) {
  var m = document.getElementById(nm);
  if (m==null)
    m = document.all[nm];

  if (document.all) {
    m.outerHTML = '<img name="home" border="0" src="'+ fn +'">';
  } else {
    var range = document.createRange();
    range.setStartBefore(m);
    var docFrag = range.createContextualFragment('<img name="home" border="0" src="'+ fn +'">');
    m.parentNode.replaceChild(docFrag, m); 
  }
}

function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function aClick(u) {
 location = u;
}

function popD(f) {
  pup = open(f, "PopupDisplay", "width=700,height=450,status=no,toolbar=no,menubar=no,scrollbars=yes,titlebar=no");
}


function openImg(n) {
  l = (screen.width-100)/2;
  t = (screen.height-100)/2;
  iWin = open('', "PopupWin", "left="+l+",top="+t+",width=100,height=100,status=no,toolbar=no,menubar=no,scrollbars=no,titlebar=no,resizable=no");
  iWin.document.open();
  iWin.document.write("<html><head>");

iWin.document.writeln('<script  language="JavaScript1.2">');
iWin.document.writeln("function onimldr(im) {");    
iWin.document.writeln("var ww = im.width;");  
iWin.document.writeln("var hh = im.height;");  
iWin.document.writeln("window.moveTo((screen.width-ww)/2, (screen.height-hh)/2);");
iWin.document.writeln("window.resizeTo(ww+40, hh+60);");

iWin.document.writeln("ll = document.getElementById('ilod');");
iWin.document.writeln("ll.style.visibility = 'hidden';");
iWin.document.writeln("ll.style.height = '0';");
iWin.document.writeln("ll.style.position = 'absolute';");
iWin.document.writeln("ll.style.top = '-100';");
iWin.document.writeln("ll = document.getElementById('icont');");
iWin.document.writeln("ll.style.visibility = 'visible';");

iWin.document.writeln("}");    
iWin.document.writeln("function body_onkeypress() {");
iWin.document.writeln("window.close();");
iWin.document.writeln("}");

iWin.document.write("</script>");  
iWin.document.write("<title>Image Detail</title>");  

  iWin.document.write("</head><body onmousedown='body_onkeypress();' onkeydown='body_onkeypress();' background=photo/im_bg.gif>");
  iWin.document.write("<center>");

iWin.document.writeln("<div id='ilod' name='ilod'>");
iWin.document.writeln("<img src='../_img/loading.gif'>");
iWin.document.writeln("<br>Loading...</div>");

iWin.document.writeln("<div id='icont' style='visibility: hidden'>");
  iWin.document.write('<img onLoad="onimldr(this);" border=0 src='+n+'>');
iWin.document.writeln("</div>");
  iWin.document.write("");

  iWin.document.write("</center></body></html>");
  iWin.document.close();
}

