// JavaScript Document

function showServicesMenu(){
	MM_showHideLayers('apDiv1','','show');							
}
function hideServicesMenu(){
	MM_showHideLayers('apDiv1','','hide');							
}

function fnShowImage(img,width,height)
{
	window.open("photos.asp?image="+img ,"","width=" + width + "px, height=" + height + "px, top=20, left=200, resizable=no, toolbar=no,menubar=no,location=no,scrollbar=no");
}

//////////// FUNCTIONS FOR SERVICES MENU ////////
/////////////////////////////////////////////////
var ie5=document.all && !window.opera
var ns6=document.getElementById

if (ie5||ns6)
document.write('<div id="popitmenu" onMouseover="clearhidemenu();" onMouseout="dynamichide(event)"></div>')

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function showmenu(e, which, optWidth){
if (!document.all&&!document.getElementById);
return;
clearhidemenu();
MM_showHideLayers('services_menu','','show');
return false;
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
MM_showHideLayers('services_menu','','hide');
}

function dynamichide(e){
if (ie5&&!menuobj.contains(e.toElement))
hidemenu();
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu();
}

function delayhidemenu(){
delayhide=setTimeout("hidemenu()",1000);
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide);
}

if (ie5||ns6)
document.onclick=hidemenu;

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_showHideLayers_display() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers_display.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}
/////////// END FUNCTIONS FOR SERVICES MENU /////
/////////////////////////////////////////////////
