/************************************************************
 ** Clears a field
 ** By: 	Joshua Sowin (fireandknowledge.org)
 ** HTML: <input type="text" value="Search" name="search"
 **			id="search" size="25" 
 ** 		onFocus="clearInput('search', 'Search')" 
 ** 		onBlur="clearInput('search', 'Search')" />
 ***********************************************************/

var one = false;
var two = false;

$(document).ready(function() {
	initPage();
});
 
function clearInput(field_id, term_to_clear) {
	
	// Clear input if it matches default value
	if (document.getElementById(field_id).value == term_to_clear ) {
		document.getElementById(field_id).value = '';
	}
	
	// If the value is blank, then put back term
	else if (document.getElementById(field_id).value == '' ) {
		document.getElementById(field_id).value = term_to_clear;
	}
} // end clearInput()

function initPage(){
	/*shortcut.add("UP",function() {
		shortcut.add("DOWN",function() {
			shortcut.add("UP",function() {
				shortcut.add("DOWN",function() {
					shortcut.add("LEFT",function() {
						shortcut.add("RIGHT",function() {
							shortcut.add("LEFT",function() {
								shortcut.add("RIGHT",function() {
									shortcut.add("B",function() {
										shortcut.add("A",function() {
											shortcut.add("Shift",function() {
												shortcut.add("Enter",function() {
													easterEgg();
												});
											});
										});
									});
								});
							});
						});
					});
				});
			});
		});
	});*/
}

function redirect(time,url){
	if(time){
		 var t=setTimeout("window.location = '"+url+"'",time);
	}else{
		window.location = url;
	}
}

function easterEgg(){
	alert('you found me');
}
