function mmail(a){a.href=a.href.replace(/@KUKAC/g,"@");return true;}
function mstatus(a,b){if (b){window.status=a.href.replace(/@KUKAC/g,"@");} else {window.status="";}}

function openful(options,b){

	var q = document.getElementById('framefz').style.width;
	q = q.substr(0,(q.length-2));

	document.forms[0]['ful_param0'].value=options;

	self.scrollBy(50,0);
	if (b < 250 && q < 250){
		b+=50;
		document.getElementById('framefz').style.width = b;
		self.scrollBy(50,0);
		setTimeout("openful('"+options+"',"+b+")",100);
	}

}

if (document.layers) {visible='show'; hidden='hide';}
else {visible='visible';hidden='hidden';}

melem_poz = new Array();
meeeg = new Array();
stooop = new Array();
var max_top = 123;
var terkepes = 0;

menuFo = new Array();
menuFo[1]  = new Array('300','225');
menuFo[2]  = new Array('400','350');
menuFo[3]  = new Array('300','465');
menuFo[4]  = new Array('55', '490');
menuFo[5]  = new Array('350','490');
menuFo[6]  = new Array('250','105');
menuFo[7]  = new Array('250','80');
menuFo[8]  = new Array('150', '0');

function cMenu(mode,id){

	var ful_width = document.getElementById('framefz').style.width;
	ful_width = ful_width.substr(0,(ful_width.length-2));

	if ( navigator.appName == 'Microsoft Internet Explorer' ){
		var menu_poz_allando = Math.floor( document.body.offsetWidth / 2 - 375 );
	} else {
		var menu_poz_allando = Math.floor( window.innerWidth / 2 - 375 );
	}

	menu_poz_allando -= Math.floor( ful_width / 2 );
	if ( menu_poz_allando <= 9 ) { menu_poz_allando = 9; }

	var nyelv = document.getElementById( 'menu_nyelv_' + id ).style;

	if ( mode == 'on' ){
		if (stooop[id]){clearTimeout(stooop[id])};
		nyelv.left = eval( menu_poz_allando ) + eval( menuFo[id][1] ) - 2;
		nyelv.visibility = visible;
		melem_poz[id] = 0 - menuFo[id][0] + max_top;
		nyelv.top = melem_poz[id];
		cMenu('moveon',id);
	}

	if ( mode == 'moveon' ){
		if (stooop[id]){clearTimeout(stooop[id])};
		if ( melem_poz[id] <= max_top ){
			melem_poz[id] += Math.floor( menuFo[id][0] / 6 );
			if ( melem_poz[id] > max_top ){ melem_poz[id] = max_top; }
			nyelv.top = melem_poz[id];
			meeeg[id] = setTimeout("cMenu('moveon',"+id+")",50);
		}
	}

	if ( mode == 'keepon' ){
		if (stooop[id]){clearTimeout(stooop[id])};
		if (meeeg[id]){clearTimeout(meeeg[id])};
		nyelv.visibility = visible;
		nyelv.top = max_top;
	}

	if ( mode == 'off' ){
		if (meeeg[id]){clearTimeout(meeeg[id])};
		nyelv.left = eval( menu_poz_allando ) + eval( menuFo[id][1] ) - 2;
		cMenu('moveoff',id);
	}

	if ( mode == 'moveoff' ){
		if (meeeg[id]){clearTimeout(meeeg[id])};
		if ( melem_poz[id] >= ( 0 - menuFo[id][0] + max_top ) ){
			melem_poz[id] -= Math.floor( menuFo[id][0] / 4 );
			nyelv.top = melem_poz[id];
			stooop[id] = setTimeout("cMenu('moveoff',"+id+")",50);
		} else {
			nyelv.visibility = hidden;
		}
	}

	if ( mode == 'timeoff' ){
		if (meeeg[id]){clearTimeout(meeeg[id])};
		stooop[id] = setTimeout("cMenu('off',"+id+")",100);
	}

	if ( mode == 'time2off' ){
		if (meeeg[id]){clearTimeout(meeeg[id])};
		stooop[id] = setTimeout("cMenu('off',"+id+")",10);
	}

	if ( terkepes ){

		if ( mode == 'moveon' || mode == 'on' || mode == 'keepon' ){
			document.getElementById('ft_sel').style.visibility = hidden;
		} else {

			var menuison = 0;
			for ( var z=2; z < menuFo.length; z++ ){
				if ( document.getElementById( 'menu_nyelv_' + z ).style.visibility == visible ){ menuison=1; }
			}

			if ( !menuison ){
				document.getElementById('ft_sel').style.visibility = visible;
			}
		}
	}

}

function szinezos(id,background,color){

	var atszinez = document.getElementById( 'men_div_szin_' + id ).style;

	atszinez.backgroundColor = background;
	atszinez.color = color;	

}

var filename = document.location.href.substring( document.location.href.lastIndexOf("\/") + 1, document.location.href.length );

function picOpenWrite(){

	filename2 = filename.replace(/(.*?)-(.*)\.shtml/, "../fpic/$1/$2-huge.jpg");

	document.writeln("<div id='picopen' class='picopen_off' onClick='picOpen(2)' onMouseOver='picOpen(3)' onMouseOut='picOpen(4)'>");
	document.writeln("	<div class='po1'></div>");
	document.writeln("	<div class='po2'><img src='../pic/0702/ft07_utak_bhead-imgbet.gif' name='pichuge' alt='(c) Fehervar Travel'></div>");
	document.writeln("	<div class='po3'></div>");
	document.writeln("</div>");

}

function picOpen(todo){

	if ( todo == 1 ){
		document.images.pichuge.src = filename2;
		document.getElementById('picopen').className = "picopen_on";
	}
	if ( todo == 2 ){
		document.getElementById('picopen').className = "picopen_off";
	}
	if ( todo == 3 ){
		document.getElementById('picopen').className = "picopen_hov";
	}
	if ( todo == 4 ){
		if ( document.getElementById('picopen').className == "picopen_hov" ) {
			document.getElementById('picopen').className = "picopen_on";
		}
	}

}

function fulWrite(){
	filename3 = filename.replace(/(.*)\.shtml/, "$1");
	parent.frme.location.href = "../site0702.cgi?a=include8-6&id=" + filename3;
}

function insertTitle(cim,szin1,szin2){

	if ( flashinstalled==2 ) {

		document.writeln("<div class='ft_titflash'>");
		document.writeln("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='540' height='34' id='ftravel_utak-tit' align='middle'>");
		document.writeln("<param name='allowScriptAccess' value='sameDomain' />");
		document.writeln("<param name='movie' value='../pic/0709/ftravel_utak-tit.swf?text=" + cim + "&tcolor=" + szin1 + "&fcolor=" + szin2 + "' />");
		document.writeln("<param name='quality' value='high' />");
		document.writeln("<param name='wmode' value='transparent'>");
		document.writeln("<param name='bgcolor' value='#ffffff' />");
		document.writeln("<embed src='../pic/0709/ftravel_utak-tit.swf?text=" + encodeURI(cim) + "&tcolor=" + szin1 + "&fcolor=" + szin2 + "' quality='high' wmode='transparent' bgcolor='#ffffff' width='540' height='34' name='ftravel_utak-tit' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
		document.writeln("</object>");
		document.writeln("</div>");

	} else {
		document.writeln("<div class='ft_titflash'>");
		document.writeln(cim);
		document.writeln("</div>");
	}
}

/* flash detection */

var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length) {
	x = navigator.plugins["Shockwave Flash"];
	if (x) {
		flashinstalled = 2;
		if (x.description) {
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
		}
	} else {
		flashinstalled = 1;
	}

	if (navigator.plugins["Shockwave Flash 2.0"]) {
		flashinstalled = 2;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length) {
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin) {
		flashinstalled = 2;
	} else {
		flashinstalled = 1;
	}
} else {
	MSDetect = "true";
}

zaszlok = new Array();

function placeZaszlo(){
	for ( var i=0; i<zaszlok.length; i++ ){
		document.writeln("<div class='flag_kicsi'><img src='../pic/flag/" + zaszlok[i] + ".gif' width=20 height=13></div>");
	}
}

function hoverZaszlo(){
}

