function checkBrowser(){
        this.ver=navigator.appVersion
        this.dom=document.getElementById?1:0
        this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
        this.ie4=(document.all && !this.dom)?1:0;
        this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
        this.ns4=(document.layers && !this.dom)?1:0;
        this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
        return this
}
bw=new checkBrowser()
var speed=100
var dloop, uloop, timer;

function makeObj(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
        this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
        this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
        this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
        this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
        this.up=goUp;this.down=goDown;
        this.moveIt=moveIt; this.x; this.y;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}
function moveIt(x,y){
        this.x=x;this.y=y
        this.css.left=this.x
        this.css.top=this.y
}
function goDown(move){
        if(this.y>-this.scrollHeight) 
		this.moveIt(0,this.y-move);
        else 
		this.moveIt(0,oCont.clipHeight);
        if(dloop) timer=setTimeout(this.obj+".down("+move+")",speed);
}
function goUp(move){
        if(this.y<oCont.clipHeight) 
		this.moveIt(0,this.y-move);
        else 
		this.moveIt(0,-this.scrollHeight);
        if(uloop) timer=setTimeout(this.obj+".up("+move+")",speed);
}

function scroll(speed){
	if(timer) clearTimeout(timer);
        if(loaded){
                if(speed>0) {uloop=false;dloop=true;oScroll.down(speed);}
                else {dloop=false;uloop=true;oScroll.up(speed);}
        }
}
var loaded;
function scrollInit(){
        oCont=new makeObj('divCont')
        oScroll=new makeObj('divText','divCont')
        oScroll.moveIt(0,0)
        oCont.css.visibility='visible'
        loaded=true;
	uloop=false;
	dloop=true;
	oScroll.down(1);
}

function drawMenu(){
	document.write("<DIV id=divUp><A onmouseover=scroll(-1) href='#'> <img src='images/up.gif' width='23' height='31' vspace='5' hspace='0' border='0' align='right'></A></DIV>" +
				"  </td>	" +
                                "      </tr>	" +
                                "      <tr> 	" +
                                "        <td  valign=top rowspan='3'  >	" +
				"						<DIV id=divCont>	" +
                                "            <DIV id=divText> 	" +
                                "              <a href='http://www.conditioning.ru'><img src='images/scr_kond.gif' border='0'></a><br><br> " +
                                "              <a href='http://www.ugogrand.ru/vent' ><img src='images/scr_vent.gif' border='0'></a><br><br> " +
                                "              <a href='http://www.ugogrand.ru/air' ><img src='images/scr_vozduxooch.gif' border='0'></a><br><br> " +
                                "              <a href='http://teplo.ugogrand.ru' ><img src='images/scr_kotel.gif' border='0'></a><br><br> " +
                                "              <a href='http://www.ugogrand.ru/tpol' ><img src='images/scr_tpol.gif' border='0'></a><br><br>" +
								"              <a href='http://www.ugogrand.ru/rad' ><img src='images/rad.gif' border='0'></a><br><br>" +
                                "              <a href='http://www.ugogrand.ru/vod_filtr'><img src='images/scr_vfiltr.gif' border='0'></a><br><br>" +
                                "              <a href='http://www.ugogrand.ru/sos'><img src='images/scr_vstrpilesos.gif' border='0'></a> " +
                                "            </DIV></DIV>" +
				"	</td> " +
                                "      </tr>" +
                                "      <tr> " +
                                "        <td  valign=top  >&nbsp;</td> " +
                                "      </tr>" +
                                "      <tr> " +
                                "        <td  valign=top  >" +
			"<DIV id=divDown><A onmouseover=scroll(1) href='#'><img src='images/dawn.gif' width='23' height='20' vspace='0' hspace='0' border='0' align='right'></A></DIV>");
}	