/*
 * $Id: common.js 176 2009-09-03 06:44:53Z root $
 */
function newWindow(mypage,myname,w,h,features) {
	if(screen.width){
		var winl = (screen.width-w)/2;
		var wint = (screen.height-h)/2;
	}
	else{winl = 0;wint =0;}
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;

	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += features;
	win = window.open(mypage,myname,settings);
	win.window.focus();
}

var swidth=220;
var sheight=130;
var sbcolor='';
var sspeed=1;
var resumesspeed=sspeed
function start() {
        if (document.all) iemarquee(ticker);
        else if (document.getElementById)
        ns6marquee(document.getElementById('ticker'));
}

function iemarquee(whichdiv){
    iediv=eval(whichdiv)
    sheight += 50;
    iediv.style.pixelTop=sheight
    iediv.innerHTML=msg
    sizeup=iediv.offsetHeight
    ieslide()
}

function ieslide(){
    if (iediv.style.pixelTop>=sizeup*(-1)){
            iediv.style.pixelTop-=sspeed
            setTimeout("ieslide()",20)
    }
    else{
            iediv.style.pixelTop=sheight
            ieslide()
    }
}

function ns6marquee(whichdiv){
    ns6div=eval(whichdiv)
    sheight += 50;
    ns6div.style.top=sheight + "px";
    ns6div.innerHTML=msg
    sizeup=ns6div.offsetHeight
    ns6slide()
}
function ns6slide(){
   if (parseInt(ns6div.style.top)>=sizeup*(-1)){
           theTop = parseInt(ns6div.style.top)-sspeed
           ns6div.style.top = theTop + "px";
           setTimeout("ns6slide()",20)
   }
   else {
           ns6div.style.top = sheight + "px";
           ns6slide()
   }
}
