// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Ultimate client-side JavaScript client sniff. Version 3.03
// (C) Netscape Communications 1999-2001.  Permission granted to reuse and distribute.
// http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav2 = (is_nav && (is_major == 2));
var is_nav3 = (is_nav && (is_major == 3));
var is_nav4 = (is_nav && (is_major == 4));
var is_nav4up = (is_nav && (is_major >= 4));
var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) );
var is_nav6 = (is_nav && (is_major == 5));
var is_nav6up = (is_nav && (is_major >= 5));
var is_gecko = (agt.indexOf('gecko') != -1);
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3    = (is_ie && (is_major < 4));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up  = (is_ie && (is_major >= 4));
var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
var is_opera = (agt.indexOf("opera") != -1);
var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------

function showEditWindow(src,wname,w,h,s,st,f,r)
{
	if (src=="#") return
	else
	{
		w = w ? w : 600;
		h = h ? h : 500;
		s = s ? s : "yes";
		st = st ? st : "yes";
		f = f ? f : "no";
		r = r ? r : "yes";
		wname = wname ? wname : "newWin"+(Math.floor(Math.random()*100000));
		var winl = (screen.width - w) / 2;
		var wint = (screen.height / 2) - h;
		winprops = "Fullscreen="+f+",height="+h+",width="+w+",top="+wint+",left="+winl+
		           ",toolbar=no,status="+st+",scrollbars="+s+",location=0,menubar=0,directories=0,resizable="+r;
		window.open(src,wname,winprops);

	}
}

var allchecked;

function checkAll( theForm) {
  if (allchecked) { allchecked = false; }
    else { allchecked = true; }
  for (var i=0;i<theForm.elements.length;i++)
  {
    var e = theForm.elements[i];
      e.checked = allchecked;
  }

}

function setSc(v)
{
	if (v) document.body.scrollTop=v;
}
function writeSc(frm)
{
	obj=eval("document.forms."+frm);
	if (obj) obj.scroll_value.value=document.body.scrollTop;
}

// [k] getElementById wrapper for x-browser comp.
if(document.all && !document.getElementById) {
	document.getElementById = function(id) {
		return document.all[id];
	}
}

var isExplorerBrowser = navigator.appName.indexOf("Microsoft") != -1;

// A hírgörgető a főoldalon


function objektum_vissza( obj ) {
	var strObj
	if ( document.all ) {
		strObj = document.all.item( obj );
	} else if ( document.getElementById ) {
		strObj = document.getElementById( obj );
	}
	return strObj;
}

var theTop = 505;
var theHeight = 200;
var theWidth = 200;
var theLeft = 0;
var toClip = 240;

function frisscikkek( newsDiv, toMove ) {
	theDiv = objektum_vissza( newsDiv.toString() );
	if ( theDiv == null ) { return; }
	if ( document.layers ) {
		theDiv.clip.top = toMove;
		theDiv.clip.bottom = toMove + toClip;
		theDiv.top = theTop - toMove;
	} else {
		theDiv = theDiv.style;
		theDiv.clip = "rect(" + toMove + "px " + (theWidth + theLeft) + "px " + (toMove + toClip) + "px 0px)";
		theDiv.top = theTop - toMove + 'px';
	}
	if ( ( theTop + theHeight - toMove ) < ( theTop - theHeight - 20 ) ) {
		toMove = 0;
		if ( document.layers ) {
			theDiv.clip.top = theTop;
			theDiv.clip.bottom = toClip;
			theDiv.top = theTop
		} else {
			theDiv.clip = "rect(" + toMove + "px " + (theWidth + theLeft) + "px " + (toMove + toClip) + "px 0px)";
			theDiv.top = theTop + 'px';
		}
	}
	toMove = (toMove + 1);
	setTimeout("frisscikkek('" + newsDiv + "'," + toMove + ")", 50);
}

