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 picOpen(a,b,c){
	var c = c.split("x");
	popup_left = ( screen.width -  c[0] ) / 2 - 20;
	popup_top  = ( screen.height - c[1] ) / 2 - 20;
//	open ("pre/picopen.html?" + a + "--pre--" + b,'fnet_pic','width=' + c[0] + ',height=' + c[1] + ',top='+popup_top+',left='+popup_left+',location=no,menubar=no,status=no,titlebar=no,resizable=no,scrollbars=no,toolbar=no');
	createPicContent('openpic','2',c[0],c[1], "./pic/public/" + a + "/" + b + "_nagy.jpg");
}

function galeriaOpen(a,b,c,d){
	var c = c.split("x");
	if ( c[0] > c[1] ){ max = c[0]; } else { max = c[1]; }
	max = 500;
	createPicGaleriaContent('opengaleria','2', max, max, a + "___bound___" + b + "___bound___" + d );
}

var curr_id=0;

function createCikkContent(type,id){
	if (window.frames){
		parent.window.frames.transparent.location.href="site.cgi?a=iframe-2&todo=opencikk&id=" + id + "&type=" + type;
	} else {
		parent.document.frames.transparent.location.href="site.cgi?a=iframe-2&todo=opencikk&id=" + id + "&type=" + type;
	}
}

function createGaleriaContent(type,id){
	if (window.frames){
		parent.window.frames.transparent.location.href="site.cgi?a=iframe-2&todo=opengaleria&id=" + id + "&type=" + type;
	} else {
		parent.document.frames.transparent.location.href="site.cgi?a=iframe-2&todo=opengaleria&id=" + id + "&type=" + type;
	}
}


function createBioContent(type,id){
	if (window.frames){
		parent.window.frames.transparent.location.href="site.cgi?a=iframe-2&todo=openrolunk&id=" + id + "&type=" + type;
	} else {
		parent.document.frames.transparent.location.href="site.cgi?a=iframe-2&todo=openrolunk&id=" + id + "&type=" + type;
	}
}

function createForumContent(type,id){
	if (window.frames){
		parent.window.frames.transparent.location.href="site.cgi?a=iframe-2&todo=openforum&id=" + id + "&type=" + type;
	} else {
		parent.document.frames.transparent.location.href="site.cgi?a=iframe-2&todo=openforum&id=" + id + "&type=" + type;
	}
}

function createPicContent(type,id,width,height,url){
	if (window.frames){
		parent.window.frames.transparent.location.href="site.cgi?a=iframe-2&todo=openpic&id=" + id + "&type=" + type + "&width=" + width + "&height=" + height + "&url=" + url;
	} else {
		parent.document.frames.transparent.location.href="site.cgi?a=iframe-2&todo=openpic&id=" + id + "&type=" + type + "&width=" + width + "&height=" + height + "&url=" + url;
	}
}

function createPicGaleriaContent(type,id,width,height,url){
	if (window.frames){
		parent.window.frames.transparent.location.href="site.cgi?a=iframe-2&todo=openpicgal&id=" + id + "&type=" + type + "&width=" + width + "&height=" + height + "&url=" + url;
	} else {
		parent.document.frames.transparent.location.href="site.cgi?a=iframe-2&todo=openpicgal&id=" + id + "&type=" + type + "&width=" + width + "&height=" + height + "&url=" + url;
	}
}

function createHtml(id,type,file,width,height){
	var code = "<br><object width='" + width + "' height=' + height + ' id='video" + id + "'>";
	   code += "  <param name='allowFullScreen' value='true'>";
	   code += "  <param name='movie' value='pre/flvplayer/player.swf?movie=../../pic/video/" + file + "&bgcolor=0x051615&fgcolor=0x13ABEC&volume=100&autoload=on&autorewind=on'>";
	   code += "  <embed src='pre/flvplayer/player.swf?movie=../../pic/video/" + file + "&bgcolor=0x051615&fgcolor=0x13ABEC&volume=100&autoload=on&autorewind=on' width='" + width + "' height='" + height + "' allowFullScreen='true' type='application/x-shockwave-flash'>";
	   code += " </object><br>";

	document.writeln(code);

}

function clearForm (theText){
	if (theText.value == theText.defaultValue){
		theText.value = ""
	}else if (theText.value == ""){
		theText.value = theText.defaultValue
	}
}

function bezar( ){
	document.getElementById( 'nagypopup' ).className = 'popup_off';
	document.getElementById( 'nagypopup2' ).className = 'popup_off';


}

function popup(){
	yWithScroll = window.innerHeight;
	xWithScroll = window.innerWidth;
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
  	}
	document.getElementById( 'nagypopup' ).style.height= parseInt(yWithScroll) + 'px';
	document.getElementById( 'nagypopup2' ).style.height= parseInt(yWithScroll) + 'px';
	document.getElementById( 'nagypopup' ).style.width= parseInt(xWithScroll) + 'px';
	document.getElementById( 'nagypopup2' ).style.width= parseInt(xWithScroll) + 'px';
}
