
ua = navigator.userAgent.toLowerCase(); 
isIE = ((ua.indexOf("msie") != -1) );
isIE6 = ((ua.indexOf("msie 6.0") != -1) );
isOPERA = ((ua.indexOf("opera") != -1) );
isFF = ((ua.indexOf("firefox") != -1) );
isSafari = ((ua.indexOf("safari") != -1) );

$(document).ready(function(){

if(isIE6)
{
DD_belatedPNG.fix('img, ul.map_hungary, ul.map_hungary li a'); 
}
//$('img[src$=.png]').ifixpng();

});


//-----------------------------------------------
function debug(txt)
{
try {
	console.debug(txt);
	}
catch(e){}
}
//-----------------------------------------------
function WriteFlash(width,height,src)
{
fobj='';
fobj+='<object type="application/x-shockwave-flash" data="'+src+'" width="'+width+'" height="'+height+'">';
fobj+='<param name="movie" value="'+src+'"/>';
fobj+='<param name="wmode" value="transparent"/>';
fobj+='</object>';

document.write(fobj);
}
//-----------------------------------------------
function View(wth,hei,src) 
{
srcp="imgview.php?width="+wth+"&height="+hei+"&src="+src;

view=window.open(srcp,'user','width='+wth+',height='+hei+',status=0,resizable=0');
var xc =(screen.width - wth) / 2;
var yc =(screen.height - hei) / 2;
view.moveTo(xc, yc);
}
//-----------------------------------------------
function initbpmap() 
{
var imgdir='images/';
var imgobj=$('#map_img');

var images=new Array();
for(var i=1;i<=23;i++)
	{
	images[i] = $('<img />').attr('src', imgdir+'terkep_bp_'+i+'.png');
	}
	
$('#map area').hover(
	function()
		{
		var id=$(this).attr('id');
		var ker=Getnumberbyid(id);
			
		$(imgobj).attr('src', imgdir+'terkep_bp_'+ker+'.png' );
		},
	function()
		{
		$(imgobj).attr('src', imgdir+'terkep_bp.png' );	
		}
	);	
}
//-----------------------------------------------
function Getnumberbyid(idstring)
{
var myregexp = /(_)(.+)$/;
var match = myregexp.exec(idstring);
if (match != null)
return match[2];
}

