
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  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];}}
}

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

dom = (document.getElementById)? true : false;
nn4 = (document.layers)? true : false;
ie4 = (!dom && document.all)? true : false;

var maxmenu = 5;
var start = 0;
var activmenu = 0;
var cur = 0;
var tim;
var overactiv = 0;
var overcolor = '#FFFFFF';
var outcolor = '#FFFFFF';


function showmenu(el) 
{ 
var cx;
if (dom) {
  cx=document.body.offsetWidth;
};
if (nn4) {
  cx=window.innerWidth;
};
cx=cx / 2 - 256
if (dom) {document.getElementById(el).style.display= "inline";document.getElementById(el).style.left=cx;}
else if (ie4) {document.all[el].style.display= "inline";document.all[el].style.left=cx;}
else if (nn4) {document.layers[el].display= "inline";document.layers[el].left=cx}
activmenu = 1;
}

function hidemenu(el) 
{
 if (dom) document.getElementById(el).style.display= "none";
 else if (ie4) document.all[el].style.display = "none";
 else if (nn4) document.layers[el].display= "none";
 activmenu = 0;
}

function hideall() 
{
  for (i=1; i<=maxmenu; i++)
 {
 if (dom) document.getElementById('menu'+i).style.display= "none";
 else if (ie4) document.all['menu'+i].style.display = "none";
 else if (nn4) document.layers['menu'+i].display = "none";
 }
 activmenu = 0;
}

function noactiv() 
{
if (start != 0) hidemenu(cur)
}

function activ(el) 
{
if (activmenu == 1) 
{
if (el != cur) {hidemenu(cur); showmenu(el); cur = el; }
} 
   else {showmenu(el); cur = el; }
}

function ClickActiv() 
{
if (activmenu == 1) hidemenu(cur);
else showmenu(cur); 
}

function timeactiv()
{
/*e=event.srcElement;
e.style.color='#000000';
pr=e.parentElement;
pr.bgColor='#BFD0EF';*/
 overactiv=0;
 tim=setTimeout('tactiv()','800'); 
}

function tactiv()
{
if (overactiv == 0 && activmenu == 1) hidemenu(cur); 
}

function timedisable()
{
/*e=event.srcElement;
e.style.color='#FFFFFF';
pr=e.parentElement;
pr.bgColor='#4E6099';*/
if (start != 0) 
{clearTimeout(tim);  overactiv=1}
else start = 1;
}

function bgLighting (div,optColor)
{
        if (optColor == 'over') {
        if (dom) document.getElementById(div).style.backgroundColor = overcolor;
        if(ie4) document.all[div].style.backgroundColor = overcolor;
        if(nn4) document.layers[div].bgColor = overcolor;
	}
	else {
        if (dom) document.getElementById(div).style.backgroundColor = outcolor;
        if(ie4) document.all[div].style.backgroundColor = outcolor;
        if(nn4) document.layers[div].bgColor = outcolor;
	}
}

var  status1 = 1;

function SHblock(item)
{
if (item == 'infoblock1') {block = status1}

if (block == 1) 
{
  if (dom) document.getElementById(item).style.display = 'none';
  else if (ie4) document.all[item].style.display = 'none';  
  block = 0;
}
else
{
  if (dom) document.getElementById(item).style.display = 'block';
  else if (ie4) document.all[item].style.display = 'block';
  block = 1;
}

if (item == 'infoblock1') {status1 = block}

}


function makeWin(imsrc, ww, wh) {
ww=ww+25; wh=wh+50;
w1=window.open('','w1','width='+ww+',height='+wh+',status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes');
w1.document.open();
w1.document.write("<html><head><title>Image Zoom<\/title><META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\"><META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\"><\/head>");
w1.document.write("<body bgcolor='#FFFFFF' text='#000000' leftmargin=2 topmargin=10><p align=center>");
w1.document.write("<a href=javascript:close();><img border=0 title=\"Click to Close\" alt=\"Click to Close\" name=theimg src=" + imsrc + "></a><br>");
w1.document.write("<a href=\"javascript:window.close();\"><font size=1 face=tahoma color=#000000>close window<\/font><\/a><\/p><\/body><\/html>");
if(window.focus) w1.window.focus();
};
