/* JavaScript file */

//
imgover="images/internal/arent89.gif";
imgout="images/internal/rent89.gif";
function roll(id, bul){
 if (bul) document.getElementById(id).src=imgover
  else document.getElementById(id).src=imgout
}

//
NN=(document.layers) ? true : false;
IE=(document.all) ? true : false;
OLD=!(IE || NN);

function showon(name)
{document.images[name].src="/images/internal/a"+name+".gif";}
function showoff(name)
{document.images[name].src="/images/internal/"+name+".gif";}

function menuon(name)
{document.images[name].src="/images/main/menu/topmenu/a"+name+".gif";}
function menuoff(name)
{document.images[name].src="/images/main/menu/topmenu/"+name+".gif";}

function menuobjon(name)
{document.images[name].src="/images/main/menu/a"+name+".gif";}
function menuobjoff(name)
{document.images[name].src="/images/main/menu/"+name+".gif";}

function menulefton(name)
{document.images[name].src="/images/main/menu/a"+name+".gif"; document.images['loaderpic'].src="/images/main/menu/pic_"+name+".gif";
document.images['loaderpic'].style.height='auto';document.images['loaderpic'].style.width='auto';}
function menuleftoff(name)
{document.images[name].src="/images/main/menu/"+name+".gif";} 

function menuleftoneng(name)
{document.images[name].src="/images/main/menu-en/a"+name+".gif"; document.images['loaderpic'].src="/images/main/menu/pic_"+name+".gif";}
function menuleftoffeng(name)
{document.images[name].src="/images/main/menu-en/"+name+".gif";} 

function menurighton(name)
{document.images[name].src="/images/main/menu/sub/a"+name+".gif"; document.images['loaderpic'].src="/images/main/menu/sub/pic_"+name+".jpg";}
function menurightoff(name)
{document.images[name].src="/images/main/menu/sub/"+name+".gif";} 

function menurightoneng(name)
{document.images[name].src="/images/main/menu-en/sub/a"+name+".gif"; document.images['loaderpic'].src="/images/main/menu/sub/pic_"+name+".jpg";}
function menurightoffeng(name)
{document.images[name].src="/images/main/menu-en/sub/"+name+".gif";} 

// window
function wfloat5 (target,size) {
var wWidth=650;
var wHeight=500;
var cWidth=window.screen.width;
var cHeight=window.screen.height;
if(cHeight && cWidth){
	var leftOffset=Math.ceil((cWidth-wWidth)/2);
	var topOffset=Math.ceil((cHeight-wHeight)/2);
	var size = size || 'width=650,height=500';
	var target = target || 'wfloat5';
	openwnd ('',target,'width='+wWidth+',height='+wHeight+'location=no,toolbar=no,resizable=yes,menubar=no,status=no,scrollbars=no,top='+topOffset+',left='+leftOffset);
 }
return false;
}
// print
function wfloat6 (target,size) {
var wWidth=750;
var wHeight=600;
var cWidth=window.screen.width;
var cHeight=window.screen.height;
if(cHeight && cWidth){
	var leftOffset=Math.ceil((cWidth-wWidth)/2);
	var topOffset=Math.ceil((cHeight-wHeight)/2);
	var size = size || 'width=750,height=600';
	var target = target || 'wfloat6';
	openwnd ('',target,'width='+wWidth+',height='+wHeight+'location=no,toolbar=no,resizable=yes,menubar=no,status=no,scrollbars=yes,top='+topOffset+',left='+leftOffset);
 }
return false;
}

function wfloat7 (target,size) {
var wWidth=600;
var wHeight=400;
var cWidth=window.screen.width;
var cHeight=window.screen.height;
if(cHeight && cWidth){
	var leftOffset=Math.ceil((cWidth-wWidth)/2);
	var topOffset=Math.ceil((cHeight-wHeight)/2);
	var size = size || 'width=600,height=400';
	var target = target || 'wfloat7';
	openwnd ('',target,'width='+wWidth+',height='+wHeight+'location=no,toolbar=no,resizable=no,menubar=no,status=no,scrollbars=no,top='+topOffset+',left='+leftOffset);
 }
return false;
}

function wfloat (target,size) {
var wWidth=830;
var wHeight=700;
var cWidth=window.screen.width;
var cHeight=window.screen.height;
if(cHeight && cWidth){
	var leftOffset=Math.ceil((cWidth-wWidth)/2);
	var topOffset=Math.ceil((cHeight-wHeight)/2);
	var size = size || 'width=830,height=700';
	var target = target || 'wfloat';
	openwnd ('',target,'width='+wWidth+',height='+wHeight+'location=no,toolbar=yes,resizable=no,menubar=no,status=no,scrollbars=no,top='+topOffset+',left='+leftOffset);
 }
return false;
}

function OpenWindowImage1 (url,width,height) {
	wnd = null;
	var url = url || '';
	var width = width || 300;
	var height = height || 300;
	var size = 'width='+width+',height='+height;
	wnd = window.openwnd (url,'wfloat',size+'toolbar=no,menubar=no,scrollbars=no,status=no,resizable=no');
	wnd.document.open();
	wnd.document.open();
	wnd.document.write("<html><head>");
	wnd.document.write("<title>Схема проезда</title></head><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><img src='"+url+"'  border='0' vspace='0' hspace='0' id='photo'/><body></html>");
  wnd.document.close();
}


// newwindow

function OpenWindowImage (url,alt,width,height) {
	wnd1 = null;
	var url = url || '';
	var alt = alt || '';
	var width = width || 300;
	var height = height-19 || 300;
	var size = 'width='+width+',height='+height;
	wnd1 = window.openwnd (url,'wfloat1',size+'toolbar=no,menubar=yes,scrollbars=no,status=no');
	wnd1.document.open();
	wnd1.document.open();
	wnd1.document.write("<html><head><script>function resize(){");
	wnd1.document.write("self.resizeTo (photo.width+12,photo.height+52); } onload=resize;");
	wnd1.document.write("</script><title>Увеличенное изображение</title></head><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><img src='"+url+"' alt='"+alt+"' border='0' vspace='0' hspace='0' id='photo'/><body></html>");
  wnd1.document.close();
}

function OpenWindowImage0 (url,alt,width,height) {
	wnd1 = null;
	var url = url || '';
	var alt = alt || '';
	var width = width || 300;
	var height = height-19 || 300;
	var size = 'width='+width+',height='+height;
	wnd1 = window.openwnd (url,'wfloat1',size+'toolbar=no,menubar=yes,scrollbars=no,status=no');
	wnd1.document.open();
	wnd1.document.open();
	wnd1.document.write("<html><head><script>function resize(){");
	wnd1.document.write("self.resizeTo (photo.width+20,photo.height+105); } onload=resize;");
	wnd1.document.write("</script><title>Увеличенное изображение</title></head><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><img src='"+url+"' alt='"+alt+"' border='0' vspace='0' hspace='0' id='photo'/><body></html>");
  wnd1.document.close();
}

