function deactivate(){
	for(var c = 1; c <= 10; c++){
		document.getElementById('menu'+c).style.color = '#FFFFFF';
		document.getElementById('menu'+c).style.border = 'none';
		document.getElementById('menu'+c).style.backgroundColor = '#2A6585';
	}
}	

function goto(this1){
	var c,v;
	c = screen.width;
	v = screen.height;
	
	if(this1 == 'blog/'){
		BlogAir = window.open(this1, "Princeton_Air_Blog", "top=0,left=0,width="+c+",height="+v+",scrollbars=1,menubar=1,resizable=1,toolbar=1");
		if(window.focus){					BlogAir.focus();				}	
	}else{
		window.location.replace(this1);
	}
}

function goto2(this2){
	var c,v;
	c = screen.width;
	v = screen.height;
	
	BlogAir = window.open(this2, "Princeton_Air_Blog", "top=0,left=0,width="+c+",height="+v+",scrollbars=1,menubar=1,resizable=1,toolbar=1");
	if(window.focus){					BlogAir.focus();		}

}

function goto5(this2){
	var c,v;
	c = screen.width;
	v = screen.height;
	
	BlogAir = window.open(this2, "Princeton_Air_Blog", "top=0,left=0,width="+c+",height="+v+",scrollbars=1,menubar=1,resizable=1,toolbar=1");
	if(window.focus){					BlogAir.focus();		}

}


function searcher(){
	
	var cd = document.getElementById('search').value;
	
	window.location.replace("search/search.php?query="+cd+"&search=1");
}

function cleanme(){
	window.document.getElementById('search').value = '';
}

function cleanme2(this3){
	window.document.getElementById(this3).value = '';
}

function detectenter(e){
	var Xkey;
	Xkey = getkey(e);
	
	// control keys
	if ( Xkey==13 )
		$('#gogo').click();
}

function getkey(e)
{
	if (window.event)
		return window.event.keyCode;
	else if (e)
		return e.which;
	else
		return null;
}

function asktheexpert(){
	if(document.getElementById('qhere').value == '' || document.getElementById('qhere').value == 'Enter question here..'){
		alert("Warning! Please enter Question to continue.");
	}else if(document.getElementById('emailers').value == '' || document.getElementById('emailers').value == 'Your email address'){
		alert("Warning! please enter Email to continue.");
	}else{
		window.location.replace('notifier.php?query=asktheexpert&ask='+document.getElementById('qhere').value+'&emailer='+document.getElementById('emailers').value);
	}
}

function subscription(){
	if(document.getElementById('namerz').value == '' || document.getElementById('namerz').value == 'your name'){
		alert("Warning! Please enter Name to continue.");
	}else if(document.getElementById('mailerz').value == '' || document.getElementById('mailerz').value == 'your email address'){
		alert("Warning! please enter Email to continue.");
	}else{
		window.location.replace('notifier.php?query=subscription&n='+document.getElementById('namerz').value+'&emailer='+document.getElementById('mailerz').value);
	}
}

