tmt_css_NN = "styles_n.css";
tmt_css_IE = "styles_e.css";
if(document.layers){
   document.write("<link rel='stylesheet' href='" + tmt_css_NN + "' type='text/css'>");
}
else{
   document.write("<link rel='stylesheet' href='" + tmt_css_IE + "' type='text/css'>");
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function ujflash(hely,szeles,magas,szoveg) {
	if (DetectFlashVer(5, 0, 0)) {
		document.write('<embed src="' + hely + '" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + szeles + '" height="' + magas + '"></embed>');
	} else {
		document.write(szoveg);
	}
}

function toogleExpand(controller,divId) {
	controller.style.backgroundImage="url('images/disclosureMixed.png')";
	var div=document.getElementById(divId);
	if (div.className=="expandable expanded") {
		div.className="expandable";
		animateElement(div,"height",div.offsetHeight,0,250,0,setCollapsed,controller,0);
	} else {
		var eredeti=div.offsetHeight;
		div.style.overflow="";
		div.style.height="auto";
		var magas=div.offsetHeight;
		div.style.overflow="hidden";
		div.style.height=eredeti+"px";
		div.className="expandable expanded";
		animateElement(div,"height",eredeti,magas+5,250,0,setExpanded,controller,0);
	}
}
function setExpanded(element) {
	element.style.backgroundImage="url('images/disclosureExpanded.png')";
}
function setCollapsed(element) {
	element.style.backgroundImage="url('images/disclosureCollapsed.png')";
}

var elozo;
var most;
var animating;
var animElement=new Array();
var animStyle=new Array();
var animParam=new Array();
var animUserInfo=new Array();
var animSelector=new Array();
function animateElement(element,style,defValue,value,time,mode,selector,userInfo,maradt) {
	animUserInfo.push(userInfo);
	animElement.push(element);
	animStyle.push(style);
	animParam.push(animatorSetup(defValue,value,time,mode));
	animParam[animParam.length-1][0]+=maradt;
	animSelector.push(selector);
	if (!animating) {
		currentTime = new Date();
		elozo=currentTime.getMilliseconds()+currentTime.getSeconds()*1000+currentTime.getMinutes()*60000;
		render();
	}
}
function animator(time) {
	var szamlal=0;
	var value;
	animating=false;
	while (szamlal<animElement.length) {
		animating=true;
		animParam[szamlal][0]-=time;
		value=animatorGetValue(animParam[szamlal])
		if (animStyle[szamlal]=="x") {
			animElement[szamlal].style.left=value+oldal.offsetLeft+"px";
		}
		if (animStyle[szamlal]=="y") {
			animElement[szamlal].style.top=value+"px";
		}
		if (animStyle[szamlal]=="width") {
			animElement[szamlal].style.width=value+"px";
		}
		if (animStyle[szamlal]=="height") {
			animElement[szamlal].style.height=value+"px";
		}
		if (animStyle[szamlal]=="alpha") {
			if (value==1) {
				animElement[szamlal].style.opacity="";
				animElement[szamlal].style.filter="";
			} else {
				animElement[szamlal].style.opacity=value;
				animElement[szamlal].style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+(value*100)+")";
			}
		}
		if (animStyle[szamlal]=="marginLeft") {
			animElement[szamlal].style.marginLeft=value+"px";
		}
		if (animParam[szamlal][0]<=0) {
			if (animSelector[szamlal]!=null) {
				animSelector[szamlal](animUserInfo[szamlal],animParam[szamlal][0]);
			}
			animElement.splice(szamlal,1);
			animStyle.splice(szamlal,1);
			animParam.splice(szamlal,1);
			animSelector.splice(szamlal,1);
			animUserInfo.splice(szamlal,1);
		} else {
			szamlal++;
		}
	}
}
function animatorGetValue(parameters) {
	if (parameters[0]<=0) {
		return parameters[1];
	} else {
		if (parameters[4]==0) {
			return parameters[2] / 2 - Math.cos(parameters[0] * 3.141592653589793 / parameters[3])/2 * parameters[2] + parameters[1];
		} else if (parameters[4]==1) {
			return parameters[2] / 2 - Math.cos(parameters[0] * (3.141592653589793/2) / parameters[3]) * parameters[2] + parameters[1]+parameters[2] / 2;
		} else if (parameters[4]==2) {
			return parameters[2] / 2 - Math.cos(parameters[0] * (3.141592653589793/2) / parameters[3]+(3.14/2)) * parameters[2] + parameters[1]-parameters[2] / 2;
		}
	}
	return 0;
}
// 0:smooth 1:in 2:out
function animatorSetup(start, end, time, mode) {
	var array=new Array;
	array[0]=time;
	array[1]=end;
	array[2]=start-end;
	array[3]=time;
	array[4]=mode;
	return array;
}
function render() {
	currentTime = new Date();
	leptet=(currentTime.getMilliseconds()+currentTime.getSeconds()*1000+currentTime.getMinutes()*60000)-elozo;
	elozo=currentTime.getMilliseconds()+currentTime.getSeconds()*1000+currentTime.getMinutes()*60000;
	animator(leptet);
	if (animating) {
		setTimeout("render()",1);
	}
}
