window.onload = function(){
var divs = document.getElementsByTagName('div');

for(var i=0; i < divs.length; i++) {
		if(divs[i].id == 'js' ){
			divs[i].style.display = 'block';
		}
	}

for(var i=0; i < divs.length; i++) {
		if(divs[i].id == 'nojs' ){
			divs[i].style.display = 'none';
		}
	}
}

$(document).ready(function() {
    $('textarea.expanding').autogrow({
	lineHeight: 16
    })
})

function jumpPage(newLoc) {
   newPage = newLoc.options[newLoc.selectedIndex].value
    if (newPage != "") {
        window.location = newPage
    }
}

var checking = '<img src="http://www.freedombeginshere.org/_graphics/spinning.gif" height="15" width="15" border="0" align="texttop" /> Checking';

function checkit(what, box){
		//remove all the class add the messagebox classes and start fading
		$(box).html(checking).fadeIn("slow");
		//check the username exists or not from ajax
		$.post("../_includes/ajax.php",{nickname: $(what).val() } ,function(data){
		  	$(box).fadeTo(200,0.1,function(){ 
			  //add message and change the class of the box and start fading
			  $(this).html(data).fadeTo(900,1);
			})
        })
}

function checkemail(what, box){
		//remove all the class add the messagebox classes and start fading
		$(box).html(checking).fadeIn("slow");
		//check the username exists or not from ajax
		$.post("../_includes/ajax.php",{email: $(what).val() } ,function(data){
		  	$(box).fadeTo(200,0.1,function(){ 
			  //add message and change the class of the box and start fading
			  $(this).html(data).fadeTo(900,1);
			})         				
        })
}

function checkemail(what, box){
		//remove all the class add the messagebox classes and start fading
		$(box).html(checking).fadeIn("slow");
		//check the username exists or not from ajax
		$.post("../_includes/ajax.php",{email: $(what).val() } ,function(data){
		  	$(box).fadeTo(200,0.1,function(){ 
			  //add message and change the class of the box and start fading
			  $(this).html(data).fadeTo(900,1);
			})	
        })
}