var a1 = new Image();a1.src = '/_template1/1.gif';
var a1on = new Image();a1on.src = '/_template1/1on.gif';
var a2 = new Image();a2.src = '/_template1/2.gif';
var a2on = new Image();a2on.src = '/_template1/2on.gif';
var a3 = new Image();a3.src = '/_template1/3.gif';
var a3on = new Image();a3on.src = '/_template1/3on.gif';
var a4 = new Image();a4.src = '/_template1/4.gif';
var a4on = new Image();a4on.src = '/_template1/4on.gif';
var a5 = new Image();a5.src = '/_template1/5.gif';
var a5on = new Image();a5on.src = '/_template1/5on.gif';


function getObj(name)
{
  if (document.getElementById)
    {this.obj = document.getElementById(name);
    this.style = document.getElementById(name).style;}
  else if (document.all)
    {this.obj = document.all[name];
    this.style = document.all[name].style;}
  else if (document.layers)
    {this.obj = document.layers[name];
    this.style = document.layers[name];}
}

function hidestyle(whichid)
{
  mainobject = new getObj(whichid);
  if (mainobject.style.display=='none')
    {mainobject.style.display='';}
  else
    {mainobject.style.display='none';}
}
function hidestyleON(whichid)
{
  mainobject = new getObj(whichid);
  mainobject.style.display='none';
}

function hidestyleOFF(whichid)
{
  mainobject = new getObj(whichid);
  mainobject.style.display='';
}
function WindowOpen(uri,w,h) {
  window.open(uri,'','width='+w+',height='+h+',status=yes,resizable=yes,scrollbars=no');
}
function FotoOpen(uri,w,h) {
  window.open(uri,'','width='+(w+20)+',height='+(h+20)+',left='+(screen.width/2-w/2-10)+',top='+(screen.height/2-h/2-10)+',status=yes,resizable=yes,scrollbars=no');
}

function GetName(p) {
  var pole = p.split('\\');
  var file = pole[pole.length-1];
  var pole = file.split('.');
  if(pole.length>=2) return pole[pole.length-2];
  if(pole.length>=1) return pole[pole.length-1];
}