function show_mobile()
{
	var device = $("#phone_device").val();
	var test = $("#phone_test").val();

	$(".phone_l").hide();

	if (device && test && $("#phone_l_"+device+"_"+test))
	{
		$("#phone_l_"+device+"_"+test).fadeIn("slow");
	}
}

function show_home_info(show)
{
	$(".legend").hide();
	$("#hi_"+show).show();
}

var cur_slide = 1;
var slide_inteval;

function slide()
{
	var next_slide = cur_slide+1;

	if (next_slide == 4)
	  next_slide = 1;

    $("#slide_"+cur_slide).fadeOut(1000);
    $("#slide_"+next_slide).fadeIn(1000);

	cur_slide = next_slide;

	clearTimeout(slide_inteval);
	slide_inteval = setTimeout("slide()",10000);
}

$(function(){

	slide_inteval = setTimeout("slide()",10000);

	if (getIEVersionNumber() > 0 && getIEVersionNumber() < 8)
		$(".cloud_gmat").css("top","-240px");
	else
		$(".cloud_gmat").css("top","-160px");

	$("#afsr_desc").html("Master the AF PDG with thousands of single question and answer flashcards. Study online anytime, anywhere in the world. No disks. No books. No hassle.");

});

function getIEVersionNumber() {
    var ua = navigator.userAgent;
    var MSIEOffset = ua.indexOf("MSIE ");

    if (MSIEOffset == -1) {
        return 0;
    } else {
        return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
    }
}

$(document).ready(function(){
var partleft = $('#partleft').height();
var partright = $('#partright').height();
if (partleft > partright) $('#partright').height(partleft); else $('#partleft').height(partright);
});
