// JavaScript Document
function gotoform(formid){
	method = "post";
	path = '';
	var form = document.createElement("man_form");
	form.setAttribute("method", method);
	form.setAttribute("action", path);
	form.setAttribute("formid", formid);
	document.body.appendChild(form);    // Not entirely sure if this is necessary
    form.submit();
}

function addfield(fid) {
	$('#'+fid).fadeIn('slow', function() {setimght();});
	$('#more'+fid).fadeOut('fast', function() {setimght();});
}

function togglea(num) {
	var dispstate = $('#a-'+num).css('display');
	if (dispstate == 'none') {
		$('#a-'+num).show('fast', function() {setimght();});
	} else {
		$('#a-'+num).hide('fast', function() {setimght();});
	}
};
function setimght() {
	var wraphi = $('#wrapall').innerHeight();
	var foothi = $('#footall').innerHeight();
	$('#heropet').css('height', (wraphi-80-foothi)+'px');
}
$(document).ready(function(){
	var wraphi = $('#wrapall').innerHeight();
	var foothi = $('#footall').innerHeight();
	$('#heropet').css('height', (wraphi-80-foothi)+'px');
	$('#sidebar').css('height', (wraphi-40-foothi)+'px');
});

