Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var f = null;
- function hideResults() {
- $("#results").css("visibility", "hidden")
- }
- function submitForm(A) {
- if (window.event) {
- window.event.returnValue = false
- } else {
- A.preventDefault()
- }
- hideResults();
- f.submit()
- }
- function showForm(C) {
- var B = C.target;
- var A = B.href.substring(B.href.indexOf("#"));
- switch (A) {
- case "#traditionalForm":
- $("#inputForm").hide();
- $("#outputForm").hide();
- $("#toIForm").removeClass("current");
- $("#toOForm").removeClass("current");
- break;
- case "#inputForm":
- $("#traditionalForm").hide();
- $("#outputForm").hide();
- $("#toOForm").removeClass("current");
- $("#toTForm").removeClass("current");
- break;
- case "#outputForm":
- $("#traditionalForm").hide();
- $("#inputForm").hide();
- $("#toIForm").removeClass("current");
- $("#toTForm").removeClass("current");
- break
- }
- $(A).fadeIn(500);
- $('a[href="' + A + '"]').addClass("current");
- C.preventDefault();
- return false
- }
- function showRand(A) {
- f.expr.value = $.trim(decodeURIComponent(randomExample))
- }
- var tagline_count = 5;
- var current_tagline = 0;
- function taglineRotate() {
- current_tagline = ((current_tagline + 1) % tagline_count) + 1;
- $("#adTagline").fadeOut(1000, function() {
- $("#adTagline").attr("src", "images/tagline" + current_tagline + ".gif").fadeIn(1000)
- })
- }
- $(document).ready(function() {
- $("#integrator").after('<a href="#" id="compute" title="Compute online with Mathematica" accesskey="c"></a>');
- f = document.forms[0];
- if (f.random && f.expr) {
- f.expr.onchange = function() {
- f.random.value = "false"
- }
- }
- $("#dx").click(hideResults);
- $("#compute").click(submitForm);
- $("#toTForm").click(showForm);
- $("#toOForm").click(showForm);
- $("#toIForm").click(showForm);
- $("#random").click(function(A) {
- hideResults();
- showRand()
- });
- $('#connect a[rel="external"]').click(function(A) {
- $.get("/Integrator/utilities/Hello.jsp", {
- url: $(this).attr("href")
- })
- });
- $('a[rel="external"]').click(function(A) {
- window.open($(this).attr("href"));
- return false
- });
- $("#video").unbind().click(function(A) {
- A.preventDefault();
- window.open($(this).attr("href"), "video", "height=635, width=742, resizable=1");
- return false
- });
- $("#toIForm,#toOForm").click(function(A) {
- $.get("/Integrator/utilities/Hello.jsp", {
- url: $(this).attr("href")
- })
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement