function SwitchBoxs(z)
{
	
	if(z == 'new')
	{
		$('BoxGuide').style.display = 'none';
		$('BoxNewContents').style.display = 'block';
	}else{
		$('BoxNewContents').style.display = 'none';
		$('BoxGuide').style.display = 'block';
	}
}

function SwitchBox(z)
{
	if(z == 'new')
	{
		box = 'BoxGuide'
		boxb = 'BoxNewContents';
	}else{
		box = 'BoxNewContents';
		boxb = 'BoxGuide';
	}
	
	new Effect.BlindDown(box, { 
			from:0.9,
			to:0.0,
	        fps:60, 
	        duration: 0.5, 
	        afterFinishInternal: function(effect) { 
	            $(box).style.display = 'none'; 
				SwitchShowBox(boxb);
	        } 
	    }); 

}

function SwitchShowBox(boxb)
{
	new Effect.BlindUp(boxb, { 
	        from:1.0,
	        to:0.0,
	        fps:60,
	        duration: 0.5,
	        beforeStartInternal: function(effect) { 
	            $(boxb).style.display = 'block'; 
			},
			afterFinishInternal: function(effect) { 

	        } 
	    }); 	
}

function WeatherStatusOver(i,e)
{
	$("WeatherStatus" + i).style.left = Event.pointerX(e) + 20 + "px";
	$("WeatherStatus" + i).style.top = Event.pointerY(e) - 30 + "px";
	$("WeatherStatus" + i).style.display = "block";
}

function WeatherStatusOut(i,e)
{
	$("WeatherStatus" + i).style.display = "none";
}

/*
ZODIAC
*/

function Zodiac(x)
{
	/*
	rat
	ox
	tiger
	rabbit
	dragon
	snake
	horse
	sheep
	monkey
	rooster
	dog
	boar
	*/
	
	z = ((x.value - 1900)%12);
	
	if(z == 0)
	{
		img = "rat";
		txt = "Meticulous, industrious, and intelligent, cautious, and conservative, rats are gentle in their dealings with others and mindful of small details. Naturally thrifty, they are good at conserving and saving. However, they often have trouble spending and enjoying their money. Possessing a strong work ethic, they can endure hardships without becoming pessimistic. Intuitive thinkers who sometimes find it difficult to concentrate, they will be successful if they focus on one thing and see it through to the end.";
	}else if(z == 1){
		img = "ox";
		txt = "Calm, steady, dependable and hardworking, oxes have honest and determined personalities. While they appear relaxed and mild mannered on the surface, on the inside, they are brave and passionate. Because of their honesty and strong sense of responsibility, they often hold positions of authority. Stubborn and quick to anger, oxes often have difficulty making friends. However, once a relationship is established, they are devoted and loyal partners.";
	}else if(z == 2){
		img = "tiger";
		txt = "Passionate, daring, and powerful, tigers have the personality of leaders. They have a strong sense of independence and can act on their own without support from others. They are brave and desire adventure, always searching for new things. Generous and compassionate towards their followers, if something is asked of them, they will do their best to provide. Their tendency to be insubordinate and rebellious can cause them to make enemies but they are always ready to rise to the challenge.";
	}else if(z == 3){
		img = "rabbit";
		txt = "Sensitive, meek and gentle, rabbits dislike fighting and will be flexible and obedient towards others to avoid arguments. They are averse to risk taking and will retreat at the first sign of danger. Without ambitions or aspirations of their own, they are loved and supported by others. They are fashionable and tasteful in their choice of clothing and surroundings. Being very social, they love company and enjoy polite conversation. Generous and kind, they are very popular and well liked.";
	}else if(z == 4){
		img = "dragon";
		txt = "Proud, noble, energetic and charismatic, dragons are natural leaders. They are good at giving orders and doing what is necessary to stay on top. Being prideful, they promote their own opinion without regard for others, and so they can easily get into arguments. They possess a natural wisdom and are very intelligent. However, they are idealistic and can be removed from reality. With their many talents they are capable of great things.";
	}else if(z == 5){
		img = "snake";
		txt = "Seductive, charming, and fashionable, and sophisticated, snakes enjoy the finer things in life. Possessing a cool and calm exterior, they are passionate on the inside. Proud and vain, they dislike being subordinate to others. They tend to be loners and can have difficulty socializing. Possessive in their relationships, they can be jealous and suspicious. If they keep their jealousy in check, they will be successful in love.";
	}else if(z == 6){
		img = "horse";
		txt = "Energetic, self reliant and adventurous, horses are free spirits. Friendly and sociable, they enjoy large gatherings. They can make friends quickly but also split up easily. Unconcerned with small details, they sometimes overlook things of importance. Being energetic and excitable, they find it difficult to calm down and concentrate and they are prone to insomnia. Comfortable in front of large crowds, they can be successful as public speakers or performers.";
	}else if(z == 7){
		img = "sheep";
		txt = "Obedient, kind and passive, sheep are thoughtful and cautious in their behavior. They are creative thinkers and enjoy being alone in their thoughts. They dislike confrontations, preferring to compromise. Their passivity can be seen as indecisiveness. They possess a strong sense of empathy and have trouble refusing requests of favors. Being timid and restrained, they have difficulty advocating for themselves. Because they need support and reassurance, finding people who understand them is crucial to their success.";
	}else if(z == 8){
		img = "monkey";
		txt = "Intelligent and fun-loving, monkeys love being active and stimulated. They can skillfully predict events. They have a cheerful, optimistic and forward-looking personality. Rather than sitting at a desk, they prefer being involved with people. Possessing little empathy, they can sometimes break promises and can be sly and manipulative. Due to their intelligence, they can adapt to any situation and make a living despite the circumstances.";
	}else if(z == 9){
		img = "rooster";
		txt = "Organized and precise, roosters are detail oriented and perfectionistic. They have good foresight and make decisions quickly but they can be hasty and impatient. They are very fashionable, well dressed, and possess good sense of style and they enjoy showing off flashy and gaudy clothing. They dislike incompetence and can be critical of others. They can be paranoid and have difficulty trusting people. They are ambitious and their organizational skills and attention to detail will bring them success in business.";
	}else if(z == 10){
		img = "dog";
		txt = "Honest, loyal and warm-hearted, dogs have a sincere personality and would never betray someone's trust. They have a strong sense of justice and a conservative nature so they always follow the rules and dislike unorthodox behavior. They have one-track minds and have difficulty analyzing complex situations so they can be vulnerable to being swindled. Not natural leaders, they are better suited to being dependable second-in-commands. Their loyalty and insight into human nature makes them great coaches and counselors.";
	}else if(z == 11){
		img = "boar";
		txt = "Determined, strong willed and self-reliant, boars follow their own path without considering the opinions of others. On the surface they are strong, but they are also deeply emotional. They are social and make long-lasting friendships. They are straightforward and steadfast. They have strong emotions and can easily become obsessed. Their disinterest in collaboration and compromise can cause problems in relationships. Their strength and determination allows them to accomplish even the most difficult task.";
	}
	
	$("EtoImgBox").innerHTML = '<img src="/eto/' + img + '.gif" />';
	$("EtoTxt").innerHTML = txt;
	//alert(x.value);
}

function Quiz(x,y){
	var url = '/js/quiz.php';
	var pars = 'id=' + x + '&a=' + y;

	var myAjax = new Ajax.Updater(
		{success: 'QuizAnswer'}, 
		url, 
		{
			method: 'post', 
			parameters: pars,
			onFailure: reportError
		});
	
	
}

function NextQuestion(){
	var url = '/js/quiz_next.php';

	var myAjax = new Ajax.Updater(
		{success: 'QuizBody'}, 
		url, 
		{
			method: 'post', 
			onFailure: reportError
		});
}
