var LEFT = 300;
var TOP  = 10;
var IMGWIDTH = 100;
function setLeft(leftvalue){
	LEFT = leftvalue;
}
function setTop(topvalue){
	TOP = topvalue;
}
function keptolt(img,width,height){
	$('belsolayerimage').src = img;
	IMGWIDTH = $('belsolayerimage').width;
	layershow(width,height);
	
	
}

function layershow(width,height){
	eltol = document.body.scrollTop;
	$('fulllayers').style.visibility = 'visible';
	$('fulllayers').style.width = '100%';
	$('fulllayers').style.height = $('defaultlayer').offsetHeight;
	/*$('fulllayers').style.height = window.screen.height;*/
	$('fulllayers').style.zIndex = '10';
	$('belsolayer').style.zIndex = '11';
	$('belsolayer').style.top = TOP+eltol;
	
	$('belsolayer').style.visibility = 'visible';
	$('belsolayer').style.width = IMGWIDTH;
	$('belsolayer').style.left = LEFT;
	$('belsolayerfej').style.visibility = 'visible';
	$('belsolayerfej').style.width = IMGWIDTH;
	if(height>0){
		$('belsolayer').style.height = height;
	}else{
		$('belsolayer').style.height = 'auto';
	}
}

function tartalomtolt(szoveg,width,height){
	
	layershow(width,height);
	
	$tolt = new Ajax();
	tolt.url = 'load/tolt.php';
	tolt.post = 'str='+szoveg+'';
	tolt.divname = 'belsolayeradat';
	tolt.betolt();
}	




function layerclose(){
	$('fulllayers').style.width = '0%';
	$('fulllayers').style.visibility = 'hidden';
	$('fulllayers').style.height = '0%';
	$('fulllayers').style.zIndex = '-99';
	$('belsolayer').style.zIndex = '-100';
	$('belsolayer').style.height = '0%';
	$('belsolayer').style.width  = '0%';
	$('belsolayer').style.visibility = 'hidden';
	$('belsolayerfej').style.zIndex = '-100';
	$('belsolayerfej').style.height = '0%';
	$('belsolayerfej').style.width  = '0%';
	$('belsolayerfej').style.visibility = 'hidden';
	$('belsolayerimage').src = '/images/loader.gif';
}

