 $('.probLink a').click(function(event){
  event.preventDefault();
  $('#overlay').fadeIn('fast',function(){
    var boxY = 10;
    var boxX = ($(window).width() - ($('#box').width() + 40))/2;
    var boxH = Math.min(730,($(window).height()-55));
    $('#box').fadeIn('slow');
    $('#box').css('top',boxY);
    $('#box').css('left',boxX);
    $('#frameWrapper').css('height',boxH);
    $('#boxh3').html("Algebra Problem Solver");
    $('#frameHolder').html("<p>This solver answers your algebra problems. &ldquo;Show Steps&rdquo; takes you to a free 7-day trial!</p><p>If you&rsquo;re not sure how to enter your question, go to <a href=\"http://www.mathway.com/embed_help.aspx\" target=\"_blank\">this help page</a> (opens in a new window).</p><iframe src ='http://www.mathway.com/embed.aspx?p=affil64001' width='600' height='600' frameborder='0' scrolling='auto'></iframe>");
  });
  $('.boxclose').click(function(){
    $('#box').fadeOut('slow');
    $('#overlay').fadeOut('fast');
  });
});
$(document).ready(function(){$('.ajaxtrigger').toggle(function(){thisLink=parseInt($(this).attr('href').split('=')[1]);if($('#target'+thisLink).length==0){$('#ans'+thisLink).after('<div id="target'+thisLink+'" class="ddown">Loading...</div>');$('#ans'+thisLink+' a').append(' ')}$('#target'+thisLink).load($(this).attr('href'),function(e){$('#ans'+thisLink+' a>img').addClass('displayNone')});$('#target'+thisLink).removeClass('displayNone');$('#ans'+thisLink+' a>img').removeClass('displayNone');return false},function(){thisLink=parseInt($(this).attr('href').split('=')[1]);$('#target'+thisLink).addClass('displayNone')})});
function vote(link){for(i=0;i<document.myform.who.length;i++){if(document.myform.who[i].checked){id=document.myform.who[i].value;}}
var xmlhttp=false;try{xmlhttp=new ActiveXObject('Msxml2.XMLHTTP');}catch(e){try{xmlhttp=new
ActiveXObject('Microsoft.XMLHTTP');}catch(E){xmlhttp=false;}}
if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){xmlhttp=new XMLHttpRequest();}
var file=link+'polls/vote.php?id=';xmlhttp.open('GET',file+id,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){var content=xmlhttp.responseText;document.getElementById('poll').innerHTML=content;}}
xmlhttp.send(null)
return;}