// JavaScript Document

var clickFunction1 = function(){
	var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 612) {
		top = Math.round((arrayPageSize[1] - 552) / 2) - 16;
		$('menu01_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 864) {
		left = Math.round((arrayPageSize[0] - 796) / 2) - 24;
		$('menu01_box').setStyle('left', left);
	}
	$('menu01_box').setStyle('display', 'block');
}
 
var clickFunction2 = function(){
	var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 728) {
		top = Math.round((arrayPageSize[1] - 669) / 2) - 11;
		$('menu02_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 748) {
		left = Math.round((arrayPageSize[0] - 687) / 2) - 24;
		$('menu02_box').setStyle('left', left);
	}
	$('menu02_box').setStyle('display', 'block');
}

var clickFunction3 = function(){
	var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 728) {
		top = Math.round((arrayPageSize[1] - 669) / 2) - 11;
		$('reg_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 748) {
		left = Math.round((arrayPageSize[0] - 687) / 2) - 24;
		$('reg_box').setStyle('left', left);
	}
	$('reg_box').setStyle('display', 'block');
}
 
var clickFunction4 = function(){
	document.location.href='http://www.wermer.hu/blog/?p=76'
	/*var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 728) {
		top = Math.round((arrayPageSize[1] - 669) / 2) - 11;
		$('menu04_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 748) {
		left = Math.round((arrayPageSize[0] - 687) / 2) - 24;
		$('menu04_box').setStyle('left', left);
	}
	$('menu04_box').setStyle('display', 'block');*/
}
 
var clickFunction5 = function(){
	var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 728) {
		top = Math.round((arrayPageSize[1] - 669) / 2) - 11;
		$('menu05_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 748) {
		left = Math.round((arrayPageSize[0] - 687) / 2) - 24;
		$('menu05_box').setStyle('left', left);
	}
	$('menu05_box').setStyle('display', 'block');
}
 
var clickFunction6 = function(){
	var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 728) {
		top = Math.round((arrayPageSize[1] - 669) / 2) - 11;
		$('menu06_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 748) {
		left = Math.round((arrayPageSize[0] - 687) / 2) - 24;
		$('menu06_box').setStyle('left', left);
	}
	$('menu06_box').setStyle('display', 'block');
}
 
var clickFunctionPv = function(){
	var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 728) {
		top = Math.round((arrayPageSize[1] - 669) / 2) - 11;
		$('pv_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 748) {
		left = Math.round((arrayPageSize[0] - 687) / 2) - 24;
		$('pv_box').setStyle('left', left);
	}
	$('pv_box').setStyle('display', 'block');
}
 
var clickFunctionTtReg = function(){
	var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 728) {
		top = Math.round((arrayPageSize[1] - 669) / 2) - 11;
		$('ttreg_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 748) {
		left = Math.round((arrayPageSize[0] - 687) / 2) - 24;
		$('ttreg_box').setStyle('left', left);
	}
	$('ttreg_box').setStyle('display', 'block');
}

var clickFunctionBlog = function(){
	var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 736) {
		top = Math.round((arrayPageSize[1] - 722) / 2) - 6;
		$('blog_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 637) {
		left = Math.round((arrayPageSize[0] - 554) / 2) - 71;
		$('blog_box').setStyle('left', left);
	}
	$('blog_box').setStyle('display', 'block');
}

var clickFunctionCdReg = function(){
	var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 728) {
		top = Math.round((arrayPageSize[1] - 669) / 2) - 11;
		$('cdreg_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 748) {
		left = Math.round((arrayPageSize[0] - 687) / 2) - 24;
		$('cdreg_box').setStyle('left', left);
	}
	$('cdreg_box').setStyle('display', 'block');
}

var clickFunctionTeknos = function(){
	var top, left;
	var arrayPageSize = getPageSize();
	if (arrayPageSize[1] > 612) {
		top = Math.round((arrayPageSize[1] - 552) / 2) - 16;
		$('teknos_box').setStyle('top', top);
	}
	if (arrayPageSize[0] > 864) {
		left = Math.round((arrayPageSize[0] - 796) / 2) - 24;
		$('teknos_box').setStyle('left', left);
	}
	$('teknos_box').setStyle('display', 'block');
}
 
var closeMenu01 = function(){
	$('menu01_box').setStyle('display', 'none');
}
 
var closeMenu02 = function(){
	$('menu02_box').setStyle('display', 'none');
}
 
var closeMenu04 = function(){
	$('menu04_box').setStyle('display', 'none');
}
 
var closeMenu05 = function(){
	$('menu05_box').setStyle('display', 'none');
}
 
var closeMenu06 = function(){
	$('menu06_box').setStyle('display', 'none');
}
 
var closeMenuPv = function(){
	$('pv_box').setStyle('display', 'none');
	document.location.href='index.php?page=menu06'
}
 
var closeTtReg = function(){
	$('ttreg_box').setStyle('display', 'none');
}
 
var closeReg = function(){
	$('reg_box').setStyle('display', 'none');
}
 
var closeCdReg = function(){
	$('cdreg_box').setStyle('display', 'none');
}
 
var closeTeknos = function(){
	$('teknos_box').setStyle('display', 'none');
}
 
window.addEvent('domready', function() {
									 
    $('menu1').addEvent('click', clickFunction1);
    //$('menu2').addEvent('click', clickFunction2);
    $('menu3').addEvent('click', clickFunction3);
    //$('menu4').addEvent('click', clickFunction4);
    $('menu5').addEvent('click', clickFunction5);
    $('menu6').addEvent('click', clickFunction6);
    //$('menu6').addEvent('click', clickFunctionCdReg);

	$('close_menu01').addEvent('click', closeMenu01);
	//$('close_menu02').addEvent('click', closeMenu02);
	$('close_menu04').addEvent('click', closeMenu04);
	$('close_menu05').addEvent('click', closeMenu05);
	$('close_menu06').addEvent('click', closeMenu06);
	$('close_pv').addEvent('click', closeMenuPv);
	
	//$('close_ttreg').addEvent('click', closeTtReg);
    $('close_reg').addEvent('click', closeReg);
    $('close_teknos').addEvent('click', closeTeknos);
    $('close_cdreg').addEvent('click', closeCdReg);
	
});

