

jQuery(document).ready(function ()
{
	// jQuery('#main table').css({'max-width':'175px'});
});

function menu_over( indx, no_anim )
{
	var new_text = get_menu_text( indx )
	if( $('menu_tipp').innerHTML != new_text )
	{
		$('menu_tipp').update(new_text)
		$('menu_tipp').setStyle('height: 0px; top: 123px; background-image: url(images/2011_menu_tipp_bg_'+indx+'.png)')
		if( no_anim )
		{
			$('menu_tipp').setStyle('height: 25px; top: 98px')
		}else{
			$('menu_tipp').morph('height: 25px; top: 98px;', { duration: 0.3 } );
		}
		if( indx == '5' )
		{
			$('menu_tipp').setStyle('color: #000000')
		}else{
			$('menu_tipp').setStyle('color: #FFFFFF')
		}
	}
}
function menu_out()
{
	var indx = siteState.sid
	var new_text = get_menu_text( indx )
	$('menu_tipp').update(new_text)
	$('menu_tipp').setStyle('height: 25px; top: 98px; background-image: url(images/2011_menu_tipp_bg_'+indx+'.png)')
	if( indx == '5' )
	{
		$('menu_tipp').setStyle('color: #000000')
	}else{
		$('menu_tipp').setStyle('color: #FFFFFF')
	}
}
function get_menu_text( indx )
{
	var indx_ = ''+indx
	switch( indx_ )
	{
		case '1' : return 'RENDEZVÉNY';
		case '2' : return 'TEMATIKA' ;
		case '3' : return 'KIÁLLÍTÚI LISTA' ;
		case '4' : return 'PROGRAMOK' ;
		case '5' : return 'PARTNEREINK' ;
	}
}
function inic()
{
	menu_over( siteState.sid, true )
}
window.onload = inic;

function sendFrom2(){

	colors=['#9DD750','#fc6000'];
	itemz=['c_name','name','telefon','mail'];
	itemz_names=['cégnév','név','telefon','e-mail cím'];
	for(var i=0;i<itemz.length;i++){
		it=document.forms[0][itemz[i]];
		it.style.background=colors[0];
		if(it.value.length<1){
			it.style.background=colors[1];
			alert('Hiba: A megadott '+itemz_names[i]+ ' mező túl rövid!');
			returned=false;
			break;
		}else{
			returned=true;
		}
	}
	if(returned){
		if(document.form.mail.value.indexOf('@')==-1 || document.form.mail.value.indexOf('@')==-1){
			document.form.mail.style.background=colors[1];
			alert('Hiba: A megadott e-mail cím helytelen!');
			returned=false;
		}
	}
	return returned;


}

function sendFrom(){

	colors=['#9DD750','#fc6000'];
	itemz=['v_name','k_name','mail'];
	itemz_names=['vezeték név','keresztnév','e-mail cím'];
	for(var i=0;i<itemz.length;i++){
		it=document.forms[0][itemz[i]];
		it.style.background=colors[0];
		if(it.value.length<1){
			it.style.background=colors[1];
			alert('Hiba: A megadott '+itemz_names[i]+ ' mező túl rövid!');
			returned=false;
			break;
		}else{
			returned=true;
		}
	}
	if(returned){
		if(document.form.mail.value.indexOf('@')==-1 || document.form.mail.value.indexOf('@')==-1){
			document.form.mail.style.background=colors[1];
			alert('Hiba: A megadott e-mail cím helytelen!');
			returned=false;
		}
	}
	return returned;


}
function chk(o){
	if(o.value=='*'){
		o.value='';
	}
}
function chk3(o){
	colors=['#9DD750','#fc6000'];
	if(o.value.length>2){
		o.style.background=colors[0];
	}
}
function chk2(o){
	if(o.value==''){
		o.value='*';
	}
}


	function PopupPic(sPicURL) {
	   var screenWidth = screen.availWidth;
	   var screenHeight = screen.availHeight;
	   var x = (screenWidth/2)-(400/2);
	   var y = (screenHeight/2)-(400/2);
	   window.open("popup.html?"+sPicURL,"","screenX="+x+",left="+x+",screenY="+y+",top="+y+",resizable=false,HEIGHT=200,WIDTH=200");
	}
