function new_window(nw)
{
window.open(nw,'newwin','top=0, left=0, menubar=0, toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=0, width=900, height=600');
}

function btnOver(e, btn, subID) {
	var menu_l2 = document.getElementById(subID);
	if (menu_l2) {
		var obj = btn;
		var x = 0;
		var y = 0;
		while (obj != menu_l2.offsetParent) {
			x +=obj.offsetLeft;
			y +=obj.offsetTop;
			obj = obj.offsetParent;
		}
		showElement(menu_l2, x, y+btn.offsetHeight-3);
	}
}
function btnOut(e, btn, subId) {
	var menu_l2 = document.getElementById(subId);
	if (menu_l2) {
		try {
			var target = e.toElement || e.relatedTarget;
			while (!(target.tagName == "DIV" || target.tagName == "BODY")) target = target.offsetParent;
			if (!(target.tagName == "DIV" && target == menu_l2)) hideElement(menu_l2);
		} catch(exception) {}
	}
}
function subOut(e, btnId, menu_l2) {
	var btn = document.getElementById(btnId);
	if (btn) {
		try {
			var target = e.toElement || e.relatedTarget;
			while (!(target == btn || target == menu_l2 || target.tagName == "BODY")) target = target.offsetParent;
			if (!(target.tagName == "DIV" && (target == btn || target == menu_l2))) hideElement(menu_l2);
		} catch(exception) {}
	}
}
function showElement(el, x, y) {
	el.style.top = y;
	el.style.left = x;
	el.style.visibility = 'visible';
}
function hideElement(el) {
	el.style.visibility = 'hidden';
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		vs_27_over = newImage("http://www.vist-service.ru/images/vs_27-over.gif");
		vs_28_over = newImage("http://www.vist-service.ru/images/vs_28-over.gif");
		vs_29_over = newImage("http://www.vist-service.ru/images/vs_29-over.gif");
		vs_30_over = newImage("http://www.vist-service.ru/images/vs_30-over.gif");
		vs_31_over = newImage("http://www.vist-service.ru/images/vs_31-over.gif");
		preloadFlag = true;
	}
}

<!-- Случайный Выбор -->
today=new Date();
jran=today.getTime();
var number = 7;
var random_number="";
var image="";
var text_href="";
var namepic="";
ia=9301;
ic=49297;
im=233280;
jran = (jran*ia+ic) % im;
random_number = Math.ceil( (jran/(im*1.0)) *number);
// Loads the appropriate image and text color based on random number.
if (random_number==1) {
text_href="/new_win.php?folder=1354&foundID=4885";
image="http://www.xerox.ru/common/data/pub/pictures/7269.jpg";
namepic="WorkCentre 420";
}
if (random_number==2) {
text_href="/new_win.php?folder=1355&foundID=4742";
image="http://www.xerox.ru/common/data/pub/pictures/7224.jpg";
namepic="WorkCentre 4150";

}
if (random_number==3) {
text_href="/new_win.php?folder=798&foundID=4750";
image="http://www.xerox.ru/common/data/pub/pictures/7226.jpg";
namepic="XEROX Phaser 6110";
}

if (random_number==4) {
text_href="/new_win.php?folder=792&foundID=4730";
image="http://www.xerox.ru/common/data/pub/pictures/7207.jpg";
namepic="WorkCentre 7655/7665";
}

if (random_number==5) {
text_href="/new_win.php?folder=821&foundID=4636";
image="http://www.xerox.ru/common/data/pub/pictures/6640.jpg";
namepic="WorkCentreC 7228/7235/7245";
}

if (random_number==6) {
text_href="/new_win.php?folder=824&foundID=4043";
image="http://www.xerox.ru/common/data/pub/pictures/7284.jpg";
namepic="DocuColor 240/250";
}

if (random_number==7) {
text_href="/new_win.php?folder=1650&foundID=4890";
image="http://www.xerox.ru/common/data/pub/pictures/7283.jpg";
namepic="DocuPrint 4590 EPS";
}

<!-- Конец Случайного Выбора -->

function wmenu1(){
}

//function wmenu1(){
//str1=" <DIV class=menu_l2_item id=btn_1_1><NOBR><A class='myhref'";
//str2="href='/empty.php'>Компьютеры</NOBR></A></DIV>";
//str3=" <DIV class=menu_l2_item id=btn_1_2><NOBR><A class='myhref'";
//str4="href='/empty.php'>Комплектующие</A></NOBR></DIV>";
//str5=" <DIV class=menu_l2_item id=btn_1_3><NOBR><A class='myhref'";
//str6="href='/empty.php'>Периферия</A></NOBR></DIV>";
//document.write(str1);
//document.write(str2);
//document.write(str3);
//document.write(str4);
//document.write(str5);
//document.write(str6);
//}

function wmenu2(){
str1=" <DIV class=menu_l2_item id=btn_2_1><NOBR><A class='myhref'";
str2="href='/paper.php'>Бумага</NOBR></A></DIV>";
str3=" <DIV class=menu_l2_item id=btn_2_2><NOBR><A class='myhref'";
str4="href='/cartridges.php'>Картриджи</A></NOBR></DIV>";
str5="  <DIV class=menu_l2_item id=btn_2_3><NOBR><A class='myhref'";
str6="href='/zapravka.php'>Заправочные комплекты</A></NOBR></DIV>";
str7=" <DIV class=menu_l2_item id=btn_2_4><NOBR><A class='myhref'";
str8="href='/empty.php'>ЗИП</A></NOBR></DIV>";
document.write(str1);
document.write(str2);
document.write(str3);
document.write(str4);
document.write(str5);
document.write(str6);
document.write(str7);
document.write(str8);
}
function wmenu3(){
str1="           <DIV class=menu_l2_item id=btn_3_1><NOBR><A class='myhref'";
str2="            href='/polygraphy.php'>О салоне</NOBR></A></DIV>";
str3="            <DIV class=menu_l2_item id=btn_3_2><NOBR><A class='myhref'";
str4="            href='/prod_graphy.php'>Наша продукция</A></NOBR></DIV>";
str5="            <DIV class=menu_l2_item id=btn_3_3><NOBR><A class='myhref'";
str6="            href='/requirements.php'>Требования к макетам</A></NOBR></DIV>";
str7="            <DIV class=menu_l2_item id=btn_3_5><NOBR><A class='myhref'";
str8="            href='/zakaz.php'>Написать письмо</A></NOBR></DIV>";
document.write(str1);
document.write(str2);
document.write(str3);
document.write(str4);
document.write(str5);
document.write(str6);
document.write(str7);
document.write(str8);
}
function wmenu4(){
//str1="            <DIV class=menu_l2_item id=btn_4_1><NOBR><A class='myhref'";
//str2="            href='/house.php'>Техника для дома</NOBR></A></DIV>";
//str3="            <DIV class=menu_l2_item id=btn_4_2><NOBR><A class='myhref'";
//str4="            href='/office.php'>Техника для офиса</A></NOBR></DIV>";
//str5="            <DIV class=menu_l2_item id=btn_4_3><NOBR><A class='myhref'";
//str6="            href='/enterprise.php'>Техника для предприятия</A></NOBR></DIV>";
str7="            <DIV class=menu_l2_item id=btn_4_4><NOBR><A class='myhref'";
str8="            href='/xerox.php'>Описание и Цены на оборудование Xerox</A></NOBR></DIV>";
//document.write(str1);
//document.write(str2);
//document.write(str3);
//document.write(str4);
//document.write(str5);
//document.write(str6);
document.write(str7);
document.write(str8);
}