
var restoreimgsrc="";

function MMon(p){
restoreimgsrc = document.images[p].src;
document.images[p].src=restoreimgsrc.substring(0,restoreimgsrc.length-4)+"_on.gif";
}
function MMof(p){
 document.images[p].src=restoreimgsrc;
}

function ok(){
}

function ImgOn(p){
imgpath = document.images['left_img'].src;
imgpath_base = imgpath.substring(0,imgpath.length-13);
document.images['left_img'].src=imgpath_base + p;
}

function Pagelocation(page) {
 if (page.indexOf("/")>=0 ) document.location = page;
}

function imgchange(chimg){
  var imgobj = document.images[chimg];
  imgpath = imgobj.src;
  imgpath_base = imgpath.substring(0,imgpath.length-6);

  switch (imgobj.width){
     case 231:   // normal=>lager
       imgobj.width  = 456;
       imgobj.height = 306;
       imgobj.src=imgpath_base + '_1.jpg';
       break;
     case 456:
       imgobj.width  = 231;
       imgobj.height = 156;
       imgobj.src=imgpath_base + '_2.jpg';
       break;
     case 156:  //vertcal=>v.large
       imgobj.width  = 306;
       imgobj.height = 456;
       imgobj.src=imgpath_base + '_1.jpg';
       break;
     case 306:  //vertcal=>v.large
       imgobj.width  = 156;
       imgobj.height = 231;
       imgobj.src=imgpath_base + '_2.jpg';
       break;
  }

}

function galeryimgshow(chimg){
  var imgobj = document.images[chimg];
  imgpath = imgobj.src;
  imgpath_base = imgpath.substring(0,imgpath.length-5);
  //imgwidth  = imgobj.width;
  bgimg.src=imgpath_base + '1.jpg';
}

function showNavLayer(){
document.getElementById("NavLayer").style.visibility="visible";
}

function hideNavLayer(){
document.getElementById("NavLayer").style.visibility="hidden";
}


function ShowMe(el) {
  document.all[el].style.visibility = "visible";
}
function HideMe(el) {
  document.all[el].style.visibility = "hidden";
}


function popup( src) {
 wdparms = 'width=330,height=330,scrollbars=no,resizable=yes,toolbar=no,menubar=no,left=20,top=20';
 window.open( 'popup.php?src='+src,'',  wdparms );
}


var restorebck="";

function changeBckOver(p){
restorebck = document.getElementById(p).style.backgroundImage;
//alert(restorebck);
if (restorebck.indexOf('_on')==-1){
document.getElementById(p).style.backgroundImage = restorebck.substring(0,restorebck.length-5)+"_on.gif)";
}
//alert(restorebck.substring(0,restorebck.length-5)+"_on.gif)");
//document.images[p].src=restorebck.substring(0,restorebck.length-4)+"_on.gif";
}
function changeBckOut(p){
if (restorebck.indexOf('_on')==-1){
document.getElementById(p).style.backgroundImage = restorebck;
}
// document.images[p].src=restorebck;
}


function mC(a){
//alert(a.tagName);
//alert();
z=a.getElementsByTagName("a");
myBody=z.item(0);
//alert(myBody.href);
//z=myBody.getElementsByTagName('a')
//window.open(myBody.href);
location.href=myBody.href;
//myBody.click();
}