
	var menu_id;
	var last;
	
	function menu_set_color(id)
		{
		document.getElementById(id).style.backgroundColor = '#717171';
		document.getElementById(id).style.color = '#fff';
		}
		
	function menu_unset_color(id)
		{
		document.getElementById(id).style.backgroundColor = '';
		document.getElementById(id).style.color = '#666';
		}	

	function comp_auth()
		{
		if (document.getElementById('comp_auth_ch').checked == true)
			{
			document.getElementById('user_data_b').disabled = false;
			}
		else
			{
			document.getElementById('user_data_b').disabled = true;
			}
		}
		
	function form_reset(form)
		{
		document.forms[form].reset();
		}
		
	function hidden(hid_name)
		{
		document.getElementById(hid_name).style.visibility = 'hidden';
		}
		
	function visible(vis_name)
		{
		document.getElementById(vis_name).style.visibility = 'visible';
		}
		
	function visible_if(vis_name)
		{
		if (document.getElementById(vis_name))
			{
			document.getElementById(vis_name).style.visibility = 'visible';
			}
		}	
		
	function loc(loc)
		{
		window.location = loc;
		}
		
	function show(id)
		{
		document.getElementById(id).style.display='block';	
		}
		
	function hide(id)
		{
		document.getElementById(id).style.display='none';			
		}
		
	function show_hide(id)
		{			
		if (document.getElementById(id).style.display == 'block')
			{
			document.getElementById(id).style.display='none';	
			}
		else
			{
			document.getElementById(id).style.display ='block';	
			}
		}
		
	function show_hide_pro(id)
		{
		if (last)
			{
			document.getElementById(last).style.display='none';
			document.getElementById(last+'_a').style.backgroundImage='url(../images/bg_vnitrek.jpg)';
			document.getElementById(last+'_span').style.backgroundImage='url(../images/tabulka_zabalena.gif)';	
			}
			
		last = id;
		
		if (document.getElementById(id).style.display == 'block')
			{
			document.getElementById(id).style.display='none';
			document.getElementById(id+'_a').style.backgroundImage='url(../images/bg_vnitrek.jpg)';
			document.getElementById(id+'_span').style.backgroundImage='url(../images/tabulka_zabalena.gif)';
			}
		else
			{
			document.getElementById(id).style.display ='block';	
			document.getElementById(id+'_a').style.backgroundImage='none';
			document.getElementById(id+'_span').style.backgroundImage='url(../images/tabulka_rozbalena.gif)';
			}		
		}
		
	function show_hide_a(id)
		{
		if (last)
			{
			document.getElementById(last).style.display='none';
			document.getElementById(last+'_t').style.backgroundImage='url(../images/bg_tabulky.jpg)';
			document.getElementById(last+'_1').style.borderBottom='1px solid #b6bbc1';
			document.getElementById(last+'_2').style.borderBottom='1px solid #b6bbc1';
			document.getElementById(last+'_3').style.borderBottom='1px solid #b6bbc1';
			document.getElementById(last+'_link').style.display ='none';
			}
			
		last = id;
		
		if (document.getElementById(id).style.display == 'block')
			{
			document.getElementById(id).style.display='none';
			document.getElementById(id+'_t').style.backgroundImage='url(../images/bg_tabulky.jpg)';
			document.getElementById(id+'_1').style.borderBottom='1px solid #b6bbc1';
			document.getElementById(id+'_2').style.borderBottom='1px solid #b6bbc1';
			document.getElementById(id+'_3').style.borderBottom='1px solid #b6bbc1';
			document.getElementById(id+'_link').style.display ='none';	
			}
		else
			{
			document.getElementById(id).style.display ='block';	
			document.getElementById(id+'_t').style.backgroundImage='none';
			document.getElementById(id+'_1').style.borderBottom='none';
			document.getElementById(id+'_2').style.borderBottom='none';
			document.getElementById(id+'_3').style.borderBottom='none';
			document.getElementById(id+'_link').style.display ='block';	
			}		
		}		

		
	function check_form(form,exception,color,return_color,div_dia)
		{
		var result = false;			
			interupt = 0;
			type = '';
			war = 0;
			c = 0;			
			div = div_dia;
			
		for (i = 0; i < document.forms[form].elements.length; i++)
			{
			interupt = 0;
			war = 0;
			type = document.forms[form].elements[i].type;				
			
			
			
			for (x = 0; x < exception.length; x++)
				{
				if (document.forms[form].elements[i].name == exception[x])
					{						
					interupt = 1;
					}
				
				if ((type == 'checkbox') || (type == 'hidden') || (type == 'submit'))
					{						
					interupt = 1;
					}							
				}
				
			if (interupt == 0)
				{					
				switch (type)
					{
					case 'radio':
						{												
												
						}
					break;
					default:
						{
						if ((document.forms[form].elements[i].value == '') || (document.forms[form].elements[i].style.border == '1px solid ' + color))
							{
							document.forms[form].elements[i].style.border = '1px solid ' + color;
							c++;
							}
						else
							{
							document.forms[form].elements[i].style.border = '1px solid ' + return_color;
							}
						}
					break;						
					}					
				}				
			}
				
		if ((c == 0) && (submit_bit == 0) && (document.getElementById('phone').value == 0))
			{			
			result = true;			
			}
		else
			{
			show(div);
			
			//if (form == 'user_data_form')
				{							
				window.setTimeout("hide(div);",3000);
				}
			//else
				//{				
				//window.setTimeout("hide(div_dia);",3000);
				//}
				
			result = false;	
			}
			
		return result;	
		}
			
	function check_pass(t)
		{
		var esc = 0;
		
		if (t == 1)
			{
			if (document.getElementById('pass_1').value == '' && document.getElementById('pass_2').value == '')
				{
				esc = 1;
				}
			}
			
		if (esc == 0)
			{		
			if ((document.getElementById('pass_1').value.length < 6) || (document.getElementById('pass_2').value.length < 6))
				{				
				document.getElementById('pass_1').style.color = '#d12438';
				document.getElementById('pass_2').style.color = '#d12438';
				
				if ((document.getElementById('pass_1').value != '') || (document.getElementById('pass_2').value != ''))
					{					
					show('user_pass_short');
					window.setTimeout("hide('user_pass_short')",3000);
					}
					
				submit_bit++;	
				}
			else
				{
				if (document.getElementById('pass_1').value != document.getElementById('pass_2').value)
					{
					show('user_pass_no_match');
					document.getElementById('pass_1').style.color = '#d12438';
					document.getElementById('pass_2').style.color = '#d12438';
					window.setTimeout("hide('user_pass_no_match')",3000);
					submit_bit++;	
					}
				else
					{
					document.getElementById('pass_1').style.color = '#999';
					document.getElementById('pass_2').style.color = '#999';				
					}
				}
			}
		}
		
			
	function action_msg(action_text,action_status)
		{
		document.getElementById('action_text').value = action_text;
						
		show('action_div');
	
		switch (action_status)
			{
			case 1:					
				{
				document.getElementById('action_text').style.color='#ff7616';					
				}
			break;
			case 2:		
				{
				document.getElementById('action_text').style.color='#d12438';					
				}
			break;
			case 3:		
				{
				document.getElementById('action_text').style.color='#FF6600';					
				}
			break;
			}
			
		if (action_status != 3)
			{
			window.setTimeout("hide('action_div');",3000);
			}
		}
		
	function return_color_form(form,exception,color,f_color)
		{
		var interupt = 0;
			type = '';
			war = 0;
			c = 0;
			
		for (i = 0; i < document.forms[form].elements.length; i++)
			{
			interupt = 0;
			war = 0;
			type = document.forms[form].elements[i].type;				
			
			for (x = 0; x < exception.length; x++)
				{
				if (document.forms[form].elements[i].name == exception[x])
					{						
					interupt = 1;
					}
				
				if ((type == 'checkbox') || (type == 'hidden') || (type == 'submit'))
					{						
					interupt = 1;
					}							
				}
				
			if (interupt == 0)
				{
				switch (type)
					{
					case 'radio':
						{
						war = 1;								
						}
					break;
					default:
						{
						document.forms[form].elements[i].style.border = '1px solid ' + color;
						document.forms[form].elements[i].style.color = f_color;
						}
					break;						
					}					
				}				
			}		
		}
		
	function form_submit(form)
		{
		document.forms[form].submit();
		}
		
	function countdowndays() 
		{				
		switch (days)
			{
			case 4:
			case 3:
			case 2:
				{
				writedays=  days + " dny, ";
				countdownhours();
				}
			break;
			case 1:
				{
				writedays = days + " den, ";						
				countdownhours();								
				}
			break;
			case 0:
				{
				writedays = "";					
				countdownhours();								
				}
			break;
			default:
				{
				writedays = days + " dnů, ";
				countdownhours();
				}
			break;
			}
		}	
		
	function countdownhours() 
		{				
		switch (hours)
			{
			case 4:
			case 3:
			case 2:
				{
				writehours=  hours + " hodiny, ";
				countdownminutes();
				}
			break;
			case 1:
				{
				writehours = hours + " hodinu, ";						
				countdownminutes();								
				}
			break;
			case 0:
				{
				writehours = "";				
				
				if (days != 0)
					{
					writehours = "0 hodin, ";
					}
				
				if ((minutes == 0) && (days != 0) && (hours == 0) && (seconds == 0))
					{
					days -=1;
					hours = 24;
					}
					
				countdownminutes();	
				}
			break;
			default:
				{
				writehours = hours + " hodin, ";
				countdownminutes();
				}
			break;
			}
		}		
		
	function countdownminutes() 
		{				
		switch (minutes)
			{
			case 4:
			case 3:
			case 2:
				{
				writeminutes =  minutes + " minuty ";
				countdownseconds();
				}
			break;
			case 1:
				{
				writeminutes = minutes + " minutu ";
				
				if (seconds == 0)
					{						
					document.getElementById('countdown').style.color='#d12438';	
					}
					
				countdownseconds();					
				}
			break;
			case 0:
				{
				writeminutes = "";						
				
				if ((hours != 0) || (days != 0))
					{
					writeminutes = "0 minut ";
					}
				
				if ((seconds == 0) && (hours != 0))
					{
					hours -=1;
					minutes = 60;
					}					
					
				countdownseconds();
				}
			break;
			default:
				{
				writeminutes = minutes + " minut ";
				countdownseconds();
				}
			break;
			}
		}	
	
	function countdownseconds() 
		{		
		switch (seconds)
			{
			case 4:
			case 3:
			case 2:
				{
				if ((minutes == 0) && (hours == 0) && (days == 0)) 
					{
					document.getElementById('countdown').value = c_text + seconds + " sekundy";
					}
				else
					{
					document.getElementById('countdown').value = c_text + writedays + writehours + writeminutes + "a " + seconds + " sekundy"; 
					}
					
				seconds -= 1;
				setTimeout( "countdowndays()",1000);
				}
			break;
			case 1:
				{
				if ((minutes == 0) && (hours == 0) && (days == 0))
					{
					document.getElementById('countdown').value = c_text + seconds + " sekundu";
					}
				else
					{
					document.getElementById('countdown').value = c_text + writedays + writehours + writeminutes + "a " + seconds + " sekundu";
					}
					
				seconds -= 1;
				setTimeout( "countdowndays()",1000);
				}
			break;
			case 0:
				{
				if ((minutes == 0) && (hours == 0) && (days == 0))
					{						
					document.getElementById('countdown').value = c_text + "0 sekund...";	
					window.location = 'http://www.risk-zisk.cz';
					}
				else
					{
					document.getElementById('countdown').value = c_text + writedays + writehours + writeminutes + "a 0 sekund";
					minutes -=1;
					seconds = 59;
					setTimeout( "countdowndays()",1000);
					}
				}
			break;
			default:
				{
				if ((minutes == 0) && (hours == 0) && (days == 0))
					{
					document.getElementById('countdown').value = c_text + writedays + writehours + writeminutes + seconds + " sekund";					
					}
				else
					{ 
					document.getElementById('countdown').value = c_text + writedays + writehours + writeminutes + "a " + seconds + " sekund";
					}
					
				seconds -= 1;
				setTimeout( "countdowndays()",1000);
				}
			break;
			}
		}
		
	function w_open(w_link,w_w,w_h)
		{
		var w_left = Math.ceil((screen.width - w_w ) / 2);				
			w_top = Math.ceil((screen.height - w_h ) / 2);
							
		window.open(w_link,"w_popup","width="+w_w+",height="+w_h+",scrollbars=no,left="+w_left+",top="+w_top);
		}
		
	function w_full_open(w_link)
		{							
		window.open(w_link,"w_popup","width="+screen.width+",height="+screen.height+",scrollbars=1,toolbar=1,location=1,status=1,menubar=1,resizable=1,left=0,top=0");
		}	
		
	function graph_anim()
		{
		if (graph_val < 151)
			{
			q_answer_set_a[0] = graph_val;	
			q_answer_set_a[1] = graph_val;
			q_answer_set_a[2] = graph_val;
			q_answer_set_a[3] = graph_val;
			q_answer_set_a[4] = graph_val;
			q_answer_set_a[5] = graph_val;
			
			if (show_a == 1)
				{
				if (q_answer_set_a[0] <= q_answer_source_a[0])
					{
					document.getElementById('q_answer_g_0').style.width = graph_val + 'px';
					document.getElementById('q_answer_p_0').value = Math.round(graph_val / 1.5) + '%';				
					}
					
				if (q_answer_set_a[1] <= q_answer_source_a[1])
					{
					document.getElementById('q_answer_g_1').style.width = graph_val + 'px';
					document.getElementById('q_answer_p_1').value = Math.round(graph_val / 1.5) + '%';	
					}
					
				if (q_answer_set_a[2] <= q_answer_source_a[2])
					{
					document.getElementById('q_answer_g_2').style.width = graph_val + 'px';
					document.getElementById('q_answer_p_2').value = Math.round(graph_val / 1.5) + '%';				
					}
				}
				
			if (q_answer_set_a[3] <= q_answer_source_a[3])
				{
				document.getElementById('i_q_answer_g_0').style.width = graph_val + 'px';
				document.getElementById('i_q_answer_p_0').value = Math.round(graph_val / 1.5) + '%';				
				}
				
			if (q_answer_set_a[4] <= q_answer_source_a[4])
				{
				document.getElementById('i_q_answer_g_1').style.width = graph_val + 'px';
				document.getElementById('i_q_answer_p_1').value = Math.round(graph_val / 1.5) + '%';				
				}
				
			if (q_answer_set_a[5] <= q_answer_source_a[5])
				{
				document.getElementById('i_q_answer_g_2').style.width = graph_val + 'px';
				document.getElementById('i_q_answer_p_2').value = Math.round(graph_val / 1.5) + '%';				
				}		
			
			graph_val++;	
			setTimeout("graph_anim();",25);
			}		
		}

	function hidden_if(id)
		{
		if (document.getElementById(id))
			{
			document.getElementById(id).style.visibility='hidden';
			}			
		}

	function visible_if(id)
		{
		if (document.getElementById(id))
			{
			document.getElementById(id).style.visibility='visible';
			}			
		}

	function show_if(id)
		{
		if (document.getElementById(id))
			{
			document.getElementById(id).style.display='block';	
			}
		}
		
	function hide_if(id)
		{
		if (document.getElementById(id))
			{
			document.getElementById(id).style.display='none';
			}			
		}
		
	function hover_menu(page)
		{
		switch(page)
			{
			case 'souteze':
				{
				document.getElementById('menu_2_a').style.backgroundImage = 'url(/img/main_menu_2_hover.gif)';	
				}
			break;
			case 'vyherci':
				{
				document.getElementById('menu_3_a').style.backgroundImage = 'url(/img/main_menu_3_hover.gif)';	
				}
			break;
			case 'klub-NEDROG':
				{
				document.getElementById('menu_4_a').style.backgroundImage = 'url(/img/main_menu_4_hover.gif)';	
				}
			break;
			case 'slevy':
				{
				document.getElementById('menu_7_a').style.backgroundImage = 'url(/img/main_menu_7_hover.gif)';	
				}
			break;	
			case 'o-nas':
				{
				document.getElementById('menu_6_a').style.backgroundImage = 'url(/img/main_menu_6_hover.gif)';	
				}	
			break;
			case 'soutezni-rad':
				{
				document.getElementById('gap_menu_1_a').style.backgroundImage = 'url(/img/tab_menu_home_hover.gif)';	
				visible('gap_menu_text_1');
				gap_menu_id = 'gap_menu_text_1';
				}
			break;
			case 'ke-stazeni':
				{
				document.getElementById('gap_menu_2_a').style.backgroundImage = 'url(/img/tab_menu_login_hover.gif)';	
				visible('gap_menu_text_2');
				gap_menu_id = 'gap_menu_text_2';
				}
			break;
			case 'reference':
				{
				document.getElementById('gap_menu_3_a').style.backgroundImage = 'url(/img/tab_menu_comp_hover.gif)';	
				visible('gap_menu_text_3');
				gap_menu_id = 'gap_menu_text_3';
				}
			break;
			case 'sponzori-soutezi':
				{
				document.getElementById('gap_menu_4_a').style.backgroundImage = 'url(/img/tab_menu_winners_hover.gif)';	
				visible('gap_menu_text_4');
				gap_menu_id = 'gap_menu_text_4';
				}
			break;
			default:
				{
				document.getElementById('menu_1_a').style.backgroundImage = 'url(/img/main_menu_1_hover.gif)';	
				}
			break;
			}
		}
	
	function rotate_fly_text()
		{
		window.setTimeout('rotate_fly_text();',150);
		window.status = fly_text;
		fly_text = fly_text.substring(1) + fly_text.substring(0,1);
		}
		
	function fly_time()
		{
		dCol='999999';//date colour.
		fCol='666666';//face colour.
		sCol='#ff7616';//seconds colour.
		mCol='#000000';//minutes colour.
		hCol='#000000';//hours colour.
		ClockHeight=40;
		ClockWidth=60;
		ClockFromMouseY=20;
		ClockFromMouseX=100;
		
		//Alter nothing below! Alignments will be lost!
		d=new Array("NEDĚLE","PONDĚLÍ","ÚTERÝ","STŘEDA","ČTVRTEK","PÁTEK","SOBOTA");
		m=new Array("LEDEN","ÚNOR","BŘEZEN","DUBEN","KVĚTEN","ČERVEN","ČERVENEC","SRPEN","ZÁŘÍ","ŘÍJEN","LISTOPAD","PROSINEC");
		date=new Date();
		day=date.getDate();
		year=date.getYear();
		
		if (year < 2000) year=year+1900;
		TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
		D=TodaysDate.split('');
		H='...';
		H=H.split('');
		M='....';
		M=M.split('');
		S='.....';
		S=S.split('');
		Face='1 2 3 4 5 6 7 8 9 10 11 12';
		
		//font='Arial';
		font='Verdana';
		size=1;
		speed=0.2;
		ns=(document.layers);
		ie=(document.all);
		Face=Face.split(' ');
		n=Face.length;
		a=size*10;
		ymouse=0;
		xmouse=0;
		scrll=0;
		props="<font face="+font+" size="+size+" color="+fCol+"><B>";
		props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
		Split=360/n;
		Dsplit=360/D.length;
		HandHeight=ClockHeight/4.5
		HandWidth=ClockWidth/4.5
		HandY=-7;
		HandX=-2.5;
		scrll=0;
		step=0.06;
		currStep=0;
		
		y=new Array();x=new Array();Y=new Array();X=new Array();
		
		for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
		
		Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
		
		for (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
		
		if (ns)
			{
			for (i=0; i < D.length; i++)
			document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
			
			for (i=0; i < n; i++)
			document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
			
			for (i=0; i < S.length; i++)
			document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
			
			for (i=0; i < M.length; i++)
			document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
			
			for (i=0; i < H.length; i++)
			document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
			}
			
		if (ie)
			{
			document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
			
			for (i=0; i < D.length; i++)
			document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D[i]+'</B></font></div>');
			document.write('</div></div>');
			document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
			
			for (i=0; i < n; i++)
			document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face[i]+'</B></font></div>');
			document.write('</div></div>');
			document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
			
			for (i=0; i < H.length; i++)
			document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
			document.write('</div></div>');
			document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
			
			for (i=0; i < M.length; i++)
			document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
			document.write('</div></div>')
			document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
			
			for (i=0; i < S.length; i++)
			document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
			document.write('</div></div>')
			}
			
		(ns)?window.captureEvents(Event.MOUSEMOVE):0;
				
		function Mouse(evnt)
			{				
			ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):window.event.y+ClockFromMouseY;
			xmouse = (ns)?evnt.pageX+ClockFromMouseX:window.event.x+ClockFromMouseX;
			}
			
		(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;		
			
		if (ns||ie)window.onload=Delay;
		
		}
		
		function ClockAndAssign()
			{
			time = new Date ();
			secs = time.getSeconds();
			sec = -1.57 + Math.PI * secs/30;
			mins = time.getMinutes();
			min = -1.57 + Math.PI * mins/30;
			hr = time.getHours();
			hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
			
			if (ie)
				{
				Od.style.top=window.document.body.scrollTop;
				Of.style.top=window.document.body.scrollTop;
				Oh.style.top=window.document.body.scrollTop;
				Om.style.top=window.document.body.scrollTop;
				Os.style.top=window.document.body.scrollTop;
				}
			
			for (i=0; i < n; i++)
				{
				var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
				F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
				F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
				}
				
			for (i=0; i < H.length; i++)
				{
				var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
				HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
				HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
				}
				
			for (i=0; i < M.length; i++)
				{
				var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
				ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
				ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
				}
				
			for (i=0; i < S.length; i++)
				{
				var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
				SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
				SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
				}
				
			for (i=0; i < D.length; i++)
				{
				var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;
				DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
				DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
				}
				
			currStep-=step;
			}
		
		function Delay()
			{
			scrll=(ns)?window.pageYOffset:0;
			Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
			Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
			
			for (i=1; i < D.length; i++)
				{
				Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);
				Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);
				}
				
			y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
			x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
			
			for (i=1; i < n; i++)
				{
				y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
				x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
				}
				
			ClockAndAssign();
			
			setTimeout('Delay()',70);
			}
			
		function act_que_text(text,x_link)
			{
			if (document.getElementById('reactivation').style.display == 'block')
				{
				return_act_v = 'reactivation';
				hide('reactivation');	
				}
			
			if (document.getElementById('activation').style.display == 'block')
				{
				return_act_v = 'activation';
				hide('activation');	
				}					
		
			document.getElementById('action_question_text').value = text;
			button_question_yes_value = x_link;
			}
			
		function button_question_yes()
			{
			loc(button_question_yes_value);
			}
			
		function return_act()
			{
			if (return_act_v != '')
				{
				show(return_act_v);
				}
			}
			
		function sal_search()
			{
			window.location = '/slevy/vyhledavani/' + document.getElementById('cat_select').options[document.getElementById('cat_select').selectedIndex].value + '-' + document.getElementById('loc_select').options[document.getElementById('loc_select').selectedIndex].value + '-1/';				
			}
		
		
		function check_user() 
			{	
			var header = document.getElementsByTagName('head')[0];
			var dataLoader = document.getElementById('scriptLoader');
			if(dataLoader) header.removeChild(dataLoader);
		
			script = document.createElement('script');
			script.id = 'scriptLoader';
			script.src = '/check-user.php?e_mail=' + document.getElementById('e_mail').value + '&e_mail_old=' + document.getElementById('e_mail_old').value + '&user_name=' + document.getElementById('user_name').value + '&user_name_old=' + document.getElementById('user_name_old').value;
			
			x = document.getElementsByTagName('head')[0];
			x.appendChild(script);
			}
			
		function check_user_values(e_mail,user_name)
			{			
			if (e_mail == '1')
				{
				document.getElementById('user_e_mail').style.display = 'none';
				document.getElementById('e_mail').style.color = '#999';		
				}
			else
				{
				hidden('sex');	
				document.getElementById('user_e_mail').style.display = 'block';
				document.getElementById('e_mail').style.color = '#d12438';
				submit_bit++;
				window.setTimeout("hide('user_e_mail'); visible('sex');	",3000);					
				}
				
			if (document.getElementById('e_mail').value == "@")
				{
				document.getElementById('e_mail').style.color = '#d12438';	
				submit_bit++;
				}
				
			if (user_name == '1')
				{
				document.getElementById('user_name_exists').style.display = 'none';
				document.getElementById('user_name').style.color = '#999';				
				}			
			else			
				{
				document.getElementById('user_name_exists').style.display = 'block';
				document.getElementById('user_name').style.color = '#d12438';
				submit_bit++;
				window.setTimeout("hide('user_name_exists'); ",3000);				
				}
				
			//document.getElementById('phone').value = submit_bit;				
			}
			
