var same =  Math.floor(Math.random()*1000000);

function decodeemail(str) {
str = str.replace('[KUKAC]', '@');
str = str.replace('[PONT]', '.');
return str;
}


function mypopup2(file)
{
window.open(getPath() + 'shared/popupshow_new.php?show=' + file,'mypopup','scrollbars=yes,width=658,height=600');
}

function mypopup(file)
{
window.open(getPath() + 'shared/popupshow_new.php?show=' + file,'mypopup','scrollbars=yes,width=640,height=500');
}

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 URLDecode( encoded )
{
   var HEXCHARS = "0123456789ABCDEFabcdef";
   var plaintext = "";
   var i = 0;
   while (i < encoded.length) {
       var ch = encoded.charAt(i);
	   if (ch == "+") {
	       plaintext += " ";
		   i++;
	   } else if (ch == "%") {
			if (i < (encoded.length-2) 
					&& HEXCHARS.indexOf(encoded.charAt(i+1)) != -1 
					&& HEXCHARS.indexOf(encoded.charAt(i+2)) != -1 ) {
				plaintext += unescape( encoded.substr(i,3) );
				i += 3;
			} else {
				alert( 'Bad escape combination near ...' + encoded.substr(i) );
				plaintext += "%[ERROR]";
				i++;
			}
		} else {
		   plaintext += ch;
		   i++;
		}
	} // while
   
   return plaintext;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

