function openWindow(theURL,winName,features) {
		window.open(theURL,winName,features);
	}
	
function showMenu(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}	

var newwindow;
var wheight = 0, wwidth = 0;

function showImage(url, title, iwidth, iheight, color) {

var pwidth, pheight;

    if ( !newwindow || newwindow.closed ) {
        pwidth=iwidth+30;
        pheight=iheight+30;
        newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=no,top=50,left=10');
        wheight=iheight;
        wwidth=iwidth;
    }

    if (wheight!=iheight || wwidth!=iwidth ) {
        pwidth=iwidth+30;
        pheight=iheight+90;
        newwindow.resizeTo(pwidth, pheight);
        wheight=iheight;
        wwidth=iwidth;
    }
        
    newwindow.document.clear();
    newwindow.focus();
    newwindow.document.writeln('<html> <head> <title>' + title + '<\/title>');
    newwindow.document.writeln('<script language=\"javascript\" src=\"scripts/OnKeyDown.js\"><\/script>');
    newwindow.document.writeln('<\/head> <body bgcolor= \"' + color + '\"> <center>');
    newwindow.document.writeln('<img src=' + escape(url) + ' title=\"' + title + '\" alt=\"' + title + '\" >');
    newwindow.document.writeln('<\/center> <\/body> <\/html>');
    newwindow.document.close();
    newwindow.focus();
}

// Routines to tidy up popup windows when page is left
// Call with an onUnload="tidy()" in body tag
function tidy() {
    if (newwindow && !newwindow.closed) { newwindow.close(); }
}

// browser lockdown code

//hp_ok=true;

//function hp_d00(s)
//{
//  if(!hp_ok)return;
//  document.write(s)
//}

//function setupOnError()
//{
//  return true
//}
//onerror=setupOnError;
//function setupOnSelectStart(a)
//{
//  return false
//}
//function setupOnContextMenu()
//{
//  alert("The menu key has been disabled.");
//  return false
//}
//function setupOnMouseDown2(e)
//{
//  return(e.target.tagName!=null&&e.target.tagName.search('^(INPUT|TEXTAREA|BUTTON|SELECT)$')!=-1);
//}
//function setupOnMouseDown(e)
//{
//  mac=navigator.userAgent.indexOf('Mac')!=-1;
//  if(document.all)
//  {
//    if(event.button==2||(mac&&(event.ctrlKey||event.keyCode==91)))
//    {
//      alert("\u0054\u0068\u0069\u0073\u0020\u0070\u0061\u0067\u0065\u0020\u0068\u0061\u0073\u0020\u0062\u0065\u0065\u006E\u0020\u0070\u0072\u006F\u0074\u0065\u0063\u0074\u0065\u0064\u002E\u0020\u0050\u0072\u0065\u0076\u0069\u0065\u0077\u0020\u006F\u006E\u006C\u0079\u002E");
//      return(false)
//    }
//  }
//  else
//  {
//    if(e.which==3||(mac&&(e.modifiers==2||e.ctrlKey)))
//    {
//      alert("\u0054\u0068\u0069\u0073\u0020\u0070\u0061\u0067\u0065\u0020\u0068\u0061\u0073\u0020\u0062\u0065\u0065\u006E\u0020\u0070\u0072\u006F\u0074\u0065\u0063\u0074\u0065\u0064\u002E\u0020\u0050\u0072\u0065\u0076\u0069\u0065\u0077\u0020\u006F\u006E\u006C\u0079\u002E");
//      return false
//    }
//    else if(e.which==1)
//    {
//      window.captureEvents(Event.MOUSEMOVE);
//      window.onmousemove=setupOnSelectStart
//    }
//  }
//}
//function setupOnMouseUp(e)
//{
//  if(e.which==1)
//  {
//    window.releaseEvents(Event.MOUSEMOVE);
//    window.onmousemove=null
//  }
//}
//if(navigator.appName.indexOf('Internet Explorer')==-1||(navigator.userAgent.indexOf('MSIE')!=-1&&document.all.length!=0))
//{
//  if(document.all)
//  {
//    mac=navigator.userAgent.indexOf('Mac')!=-1;
//    version=parseFloat('0'+navigator.userAgent.substr(navigator.userAgent.indexOf('MSIE')+5),10);
//    if(!mac&&version>4)
//    {
//      document.oncontextmenu=setupOnContextMenu
//    }
//    else
//    {
//      document.onmousedown=setupOnMouseDown;
//      document.onkeydown=setupOnMouseDown;
//    }
//    document.onselectstart=setupOnSelectStart
//  }
//  else if(document.layers)
//  {
//    window.captureEvents(Event.MOUSEDOWN|Event.modifiers|Event.KEYDOWN|Event.MOUSEUP);
//    window.onmousedown=setupOnMouseDown;window.onkeydown=setupOnMouseDown;
//    window.onmouseup=setupOnMouseUp
//  }
//  else if(document.getElementById&&!document.all)
//  {
//    document.oncontextmenu=setupOnContextMenu;document.onmousedown=setupOnMouseDown2
//  }
//}
//function setupOnBeforePrint()
//{
//  for(i=0;i<document.all.length;i++)
//  {
//    if(document.all[i].style.visibility!="hidden")
//    {
//      document.all[i].style.visibility="hidden";document.all[i].id="hp_id"
//    }
//  }
//};
//function setupOnAfterPrint()
//{
//  for(i=0;i<document.all.length;i++)
//  {
//    if(document.all[i].id=="hp_id")document.all[i].style.visibility=""
//  }
//};
//window.onbeforeprint = setupOnBeforePrint;
//window.onafterprint = setupOnAfterPrint;
//document.write('<style type="text/css" media="print"><!--body{display:none}--></style>');


//function setupOnDragStart()
//{
//  return false
//}
//document.ondragstart = setupOnDragStart;

//function ToggleCheckboxes(spanChk){

//   // Added as ASPX uses SPAN for checkbox
//   var oItem = spanChk.children;
//   var theBox= (spanChk.type=="checkbox") ? 
//        spanChk : spanChk.children.item[0];
//   xState=theBox.checked;
//   elm=theBox.form.elements;

//   for(i=0;i<elm.length;i++)
//     if(elm[i].type=="checkbox" && 
//              elm[i].id!=theBox.id)
//     {
//       //elm[i].click();
//       if(elm[i].checked!=xState)
//         elm[i].click();
//       //elm[i].checked=xState;
//     }
// }
// 
//var bPageSubmitting;
//SetPageLock(false);

//function SetPageLock(bLock)
//{
//	if (top.m_bSubmitting!=null)
//	{
//		if (bLock)
//		{
//			if (top.m_bSubmitting!="locked")
//			{
//				top.m_bSubmitting="lock";
//			}
//		}
//		else
//		{
//			top.m_bSubmitting="unlock";
//		}
//	}
//	else
//	{
//		if (bLock)
//		{
//			if (bPageSubmitting!="locked")
//			{
//				bPageSubmitting="lock";
//			}
//		}
//		else
//		{
//			bPageSubmitting="unlock";
//		}
//	}
//}

