var varosok = new Array();
varosok[0] = new _varos( "Békéscsaba", "http://www.bekescsaba.hu" );
varosok[1] = new _varos( "Debrecen", "http://www.debrecen.hu/" );
varosok[2] = new _varos( "Dunaújváros", "http://www.dunaujvaros.hu/" );
varosok[3] = new _varos( "Eger", "http://www.eger.hu/" );
varosok[4] = new _varos( "Érd", "http://www.erd.hu/" );
varosok[5] = new _varos( "Győr", "http://www.gyor.hu/" );
varosok[6] = new _varos( "Hódmezővásárhely", "http://www.hodmezovasarhely.hu/" );
varosok[7] = new _varos( "Kaposvár", "http://www.kaposvar.hu/" );
varosok[8] = new _varos( "Kecskemét", "http://www.kecskemet.hu/" );
varosok[9] = new _varos( "Miskolc", "http://www.miskolc.hu/" );
varosok[10] = new _varos( "Nagykanizsa", "http://www.nagykanizsa.hu/" );
varosok[11] = new _varos( "Nyíregyháza", "http://www.nyiregyhaza.hu/" );
varosok[12] = new _varos( "Pécs", "http://www.pecs.hu/" );
varosok[13] = new _varos( "Salgótarján", "http://www.salgotarjan.hu/" );
varosok[14] = new _varos( "Sopron", "http://www.sopron.hu/" );
varosok[15] = new _varos( "Szeged", "http://www.szegedvaros.hu/" );
varosok[16] = new _varos( "Székesfehérvár", "http://www.szekesfehervar.hu/" );
varosok[17] = new _varos( "Szekszárd", "http://www.szekszard.hu/" );
varosok[18] = new _varos( "Szolnok", "http://www.szolnok.hu/" );
varosok[19] = new _varos( "Szombathely", "http://www.szombathely.hu/" );
varosok[20] = new _varos( "Tatabánya", "http://www.tatabanya.hu/" );
varosok[21] = new _varos( "Veszprém", "http://www.veszprem.hu/" );
varosok[22] = new _varos( "Zalaegerszeg", "http://www.zalaegerszeg.hu/" );

//Specify the marquee's width (in pixels)
var marqueewidth = "718px";
//Specify the marquee's height
var marqueeheight = "22px";
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed = 2;
//configure background color:
var marqueebgcolor = "#DEFDD9";
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit = 1;

var marqueecontent = "<nobr>";
for( j = 0; j<5; j++ ) {
	for( i = 0; i<varosok.length; i++ ) {
		marqueecontent += "&#160;&#160;<a href=\"" + varosok[i].url + "\" class=\"marquee_link\" target=\"new\">" + varosok[i].nev + "</a>&#160;";
	}
}
marqueecontent += "</nobr>";


marqueespeed = (document.all)? marqueespeed : Math.max(1, marqueespeed-1);
var copyspeed = marqueespeed;
var pausespeed = (pauseit==0)? copyspeed: 0;
var dom = document.getElementById;
if (dom) {
var str = '<style type="text/css">.marquee_link { font-family: Arial, Tahoma, Verdena; font-size: 11pt; color: #FFFFFF; text-decoration: none; } </style>';
str += '<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>';
	document.write(str);
}
var actualwidth = '';
var cross_marquee;

var _balra = null, _jobbra = null;


function populate(){
	if (dom){
		cross_marquee = document.getElementById("_marquee_");
		//cross_marquee.style.left = parseInt(marqueewidth)+8+"px";
		//cross_marquee.style.left = 8+"px";
		cross_marquee.style.left = -3390+"px";
		cross_marquee.innerHTML = marqueecontent;
		actualwidth = document.getElementById("temp").offsetWidth;
	}
	//lefttime = setInterval("scrollmarquee()",20);
}

window.onload = populate;
copyspeed = pausespeed;

function scrollmarquee(){
	if (dom){
		//if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8)) {
		if (parseInt(cross_marquee.style.left)>(actualwidth*(-1))) {
			cross_marquee.style.left = parseInt(cross_marquee.style.left)-copyspeed+"px";
		}
		else {
			//cross_marquee.style.left = parseInt(marqueewidth)+8+"px";
			cross_marquee.style.left = parseInt(marqueewidth)+"px";
		}
	}
}

if (dom) {
	with (document){
		//write('<center><table border="0" cellspacing="0" cellpadding="0" background="top1.gif" style="background-color: inherit;"><tr>');
		write('<center><table border="0" cellspacing="0" cellpadding="0" background="' + _s_hatterkep_ + '" style="background-color: inherit;"><tr>');
		write('<td><a href="#" class=\"marquee_link\" onmouseover="balra()" onmouseout="copyspeed=0">&lt;&lt;</a>&#160;</td>');
		write('<td>');
		if (dom){
			write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
			//write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=marqueespeed" onMouseout="copyspeed=pausespeed">')
			//write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'">')
			write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:inherit">')
			write('<div id="_marquee_" style="position:absolute;left:0px;top:0px"></div>')
			write('</div></div>')
		}
		write('</td>');
		write('<td>&#160;<a href="#" class=\"marquee_link\" onmouseover="jobbra()" onmouseout="copyspeed=0">&gt;&gt;</a></td>');
		write('</tr></table></center>')
	}
}

function _varos(  nev, url ) {
	this.nev = nev;
	this.url = url;
	return this;
}

function balra() {
	_clearIntervals();
	//copyspeed = -1*marqueespeed;
	copyspeed = marqueespeed;
	_balra = setInterval("scrollbalra()",20);
	return;
}

function jobbra() {
	_clearIntervals();
	copyspeed = marqueespeed;
	_jobbra = setInterval("scrolljobbra()",20);
	return;
}

function scrollbalra(){
	if (dom){
		//if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8)) {
		if (parseInt(cross_marquee.style.left)>(actualwidth*(-1))) {
			cross_marquee.style.left = parseInt(cross_marquee.style.left)-copyspeed+"px";
		}
		else {
			//cross_marquee.style.left = parseInt(marqueewidth)+8+"px";
			cross_marquee.style.left = parseInt(marqueewidth)+"px";
		}
	}
}

var al = true;

function scrolljobbra(){
	if (dom){
		//if (parseInt(cross_marquee.style.left)>parseInt((marqueewidth+8))) {
		if (parseInt(cross_marquee.style.left)>parseInt((marqueewidth))) {
			//cross_marquee.style.left = 0 - parseInt(actualwidth)+8+"px";
			cross_marquee.style.left = 0 - parseInt(actualwidth)+"px";
		}
		else {
			cross_marquee.style.left = parseInt(cross_marquee.style.left)-copyspeed*(-1)+"px";
		}
	}
}

function _clearIntervals() {
	if( _balra != null ) {
		clearInterval(_balra);
	}
	if( _jobbra != null ) {
			clearInterval(_jobbra);
	}
}