function imgover (id, direction) {

	/* Használata: <a href="[url]" onmouseover="imgover('[id]','on')" onmouseout="imgover('[id]','off')"><img src="[url - off]" id="[id]" /> */

	var src = document.getElementById(id).src
	if (direction == "on") {
		var rawsrc = src.substr(0, src.length-8);
		document.getElementById(id).src = rawsrc + "_on.png";
	} else {
		var rawsrc = src.substr(0, src.length-7);
		document.getElementById(id).src = rawsrc + "_off.png";
	}
}

/*	SUBNAV MENU	*/

menu_status = new Array();

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}

function setContent () {
	if (self.innerWidth)
	{
		frameHeight = self.innerHeight;
		frameWidth = self.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth)
	{
		frameHeight = document.documentElement.clientHeight;
		frameWidth = document.documentElement.clientWidth;
	}
	else if (document.body)
	{
		frameHeight = document.body.clientHeight;
		frameWidth = document.body.clientWidth;
	}
	else return;
	
	var wrapperElement = document.getElementById('wrapper');
	var footerElement = document.getElementById('footer');
	var contentElement = document.getElementById('content');
	
	if ((wrapperElement.offsetHeight + footerElement.offsetHeight < frameHeight) || ((contentElement.offsetHeight + 290 + footerElement.offsetHeight) < frameHeight))
	{
		wrapperElement.style.height = frameHeight - footerElement.offsetHeight + "px";
		footerElement.style.position = "absolute";
		footerElement.style.top = wrapperElement.offsetHeight + "px";
		footerElement.style.left = ((frameWidth / 2) - 445) + "px";
	} else {
		wrapperElement.style.position = "static";
	}
}

/*	FONT RESIZE	*/

function changeText(text) {
	id = 'content';
	
	var switchdiv = document.getElementById(id);	
	
	switch (text) {
		case 'increase' : 	if (switchdiv.className != 'template_large') {
				switchdiv.className = 'template_large';
				}
		break;
		case 'decrease' :	if (switchdiv.className != 'template_normal') {
				switchdiv.className = 'template_normal';
				}
		break;
	}
	setContent();
	return false;
}