 function disp(url, width, height)
{
        LeftPosition=(screen.width)?(screen.width-width)/2:100;
     TopPosition=(screen.height)?(screen.height-height)/2:100;
        var Win = window.open(url,'showpic','width=' + width + ',height=' + height + ',top='+TopPosition+',left='+LeftPosition+',resizable=0,scrollbars=no,menubar=no,toolbar=no,status=no')
}

 function disp2(url, width, height)
{
        LeftPosition=(screen.width)?(screen.width-width)/2:100;
     TopPosition=(screen.height)?(screen.height-height)/2:100;
        var Win = window.open(url,'printproduct','width=' + width + ',height=' + height + ',top='+TopPosition+',left='+LeftPosition+',resizable=0,scrollbars=yes,menubar=no,toolbar=no,status=no')
}
function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}

function changeImages() {
    preloadFlag = true;
  if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }
}


function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}
var preloadFlag = false;
function preloadImages() {
  if (document.images) {
    main_on = newImage("images/<?echo $kat;?>/main_.gif");
    promo_on = newImage("images/<?echo $kat;?>/promo_.gif");
    about_on = newImage("images/<?echo $kat;?>/about_.gif");
    news_on = newImage("images/<?echo $kat;?>/news_.gif");
    catalog_on = newImage("images/<?echo $kat;?>/products_.gif");
    transport_on = newImage("images/<?echo $kat;?>/transport_.gif");    
    contact_on = newImage("images/<?echo $kat;?>/contact_.gif");    
    work_on = newImage("images/<?echo $kat;?>/work_.gif");
	    preloadFlag = true;
  }
}