function ready()
{
	setInterval( "slideSwitch()", 5000 );
	$("#biography_header").click(function ()
	{
		$("#offices").slideToggle('slow');
		$("#biography").slideToggle('slow')
	});
	$("#office_header").click(function ()
	{
		$("#offices").slideToggle('slow');
		$("#biography").slideToggle('slow')
	});
	$('#sw').focus(function() {
  		$('#sw').attr( 'value', '' );
	});
}
function ready2()
{
	$('#sw').focus(function() {
  		$('#sw').attr( 'value', '' );
	});
}
function slideSwitch() {
    var $active = $('#slideshow DIV.active');
    if ( $active.length == 0 ) $active = $('#slideshow DIV:last');
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow DIV:first');

    $active.addClass('last-active');
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}
function submit_ajaxform(formNameValue)
{
  //alert(formNameValue)
  var func_un=formNameValue.split('_');
  document.getElementById(func_un[0]+'_formName').value=formNameValue;
  xajax.config.requestURI="/fa/?state=ajax&un="+func_un[0];
  xajax_processForm(xajax.getFormValues(func_un[0]));
  return false;
}

function openUpload(url)
{
  window.open(url,'',"width=500,height=300,scrollbars=1,resizable=1,addressbar=0,status=0,toolbar=0");
}

function openBook(url)
{
  window.open(url,'',"width=750,height=600,scrollbars=0,resizable=0,addressbar=0,status=0,toolbar=0");	
}
  

function openComment(url)
{
  window.open(url,'',"width=500,height=800,scrollbars=1,resizable=0,addressbar=0,status=0,toolbar=0");
}

function openSendToFriend(url)
{
  window.open(url,'',"width=700,height=500,scrollbars=1,resizable=0,addressbar=0,status=0,toolbar=0");
}



function openVideoPlayer(url)
{
  window.open(url,'',"width=405,height=605,scrollbars=1,resizable=0,addressbar=0,status=0,toolbar=0");	
}

function openSoundPlayer(url)
{
  window.open(url,'',"width=300,height=250,scrollbars=1,resizable=0,addressbar=0,status=0,toolbar=0");	
}

function select_unselectAlpha(id)
{
	
	
	var tdName;
	for (i=1;i<=32;i++)
	{
		
		tdName=document.getElementById('a'+i);
		if (i==id)
			tdName.className="selectAlpha";
		else
			tdName.className="UnselectAlpha";
	}
	document.cform.d.value=id;
	xajax.config.requestURI+='&un=question';
    xajax_processForm(xajax.getFormValues('cform'));

}
