var same =  Math.floor(Math.random()*1000000);

function decodeemail(str) {
str = str.replace('[KUKAC]', '@');
str = str.replace('[PONT]', '.');
return str;
}

function mypopup(file)
{
mypopup_a(getPath() + 'shared/popupshow.php?show=' + file, 800, 600);
}

function mypopup_a(file, width, height)
{
window.open(file,'mypopup','scrollbars=yes,width=' + width + ',height=' + height);
}

function rand(n) {return (Math.floor(Math.random()*n));}

function getPath()
{

// most tanulok js-ezni, ha tul ocsmany a kod ne nezd meg:-) by Lamarr 2005.08.19

var a = document.location.href.toString();
var i,j = 0;
var lastper = 0;
var url = '';

for (i = 0; i <= a.length;i++)
{
if (a.substring(i, i+1) == '/') {lastper = i;j++;}
if (j == 3) break;
}

url = a.substring(0, lastper+1);

return url;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

