function push(url) {
    window.location = url;
}

function sort(element, scol, sdir) {
	new Ajax.Updater(element, '/'+element.toLowerCase()+'/list/', {
	  parameters: { sc: scol, sd: sdir }
	});
}

function resizeFont(s) {
	if (s=='small') {
		document.getElementById('WhiteBox').style.fontSize='10px';
		document.getElementById('SmallSize').style.textDecoration='underline';
		document.getElementById('MedSize').style.textDecoration='none';
		document.getElementById('BigSize').style.textDecoration='none';
	} else if (s=='med') {
		document.getElementById('WhiteBox').style.fontSize='12px';
		document.getElementById('SmallSize').style.textDecoration='none';
		document.getElementById('MedSize').style.textDecoration='underline';
		document.getElementById('BigSize').style.textDecoration='none';
	} else if (s=='big') {
		document.getElementById('WhiteBox').style.fontSize='14px';
		document.getElementById('SmallSize').style.textDecoration='none';
		document.getElementById('MedSize').style.textDecoration='none';
		document.getElementById('BigSize').style.textDecoration='underline';
	}
}

function autotab(current,to){
    if (current.getAttribute && 
      current.value.length==current.getAttribute("maxlength")) {
        $(to).focus() 
        }
}

/* for login call from flash */

function login() {
    location.href = 'https://advisor.leipsic.ca/auth/login/';
}