// JavaScript Document function navigate(L){ switch(L){ case 'e': // This checks to see if logged in. If they are, then show the purchase page. If not then they must not be logged in and // must be on the logon screen window.location = "/Events/index.asp" break; case 'r': window.location = "/Registrations/index.asp" break; case 'a': window.location = "/Auctions/index.asp" break; case 'd': window.location = "/Donations/index.asp" break; case 'm': window.location = "/MessageCenter/events.asp" break; case 'rcpt': window.location = "/Receipts/search.asp" break; case 'dm': window.location = "/demos.asp" break; case 'l': window.location = "logout.asp" break; default: window.location = "/Events/index.asp" } } function createPurchase(){ if($('purchase')){ Effect.toggle('purchase','slide', {duration:0.3}); } else { /* Time to create the div that will hold the purchase info */ var targetDiv = $('mainNav'); var newdiv = document.createElement('div'); newdiv.setAttribute('id','purchase'); newdiv.style.padding = '5px'; newdiv.style.border = '1px solid #ccc'; newdiv.style.background = '#ffffff'; newdiv.style.color = '#545454'; newdiv.style.fontFamily = 'tahoma'; newdiv.style.fontSize = '12px'; newdiv.style.width = '450px'; newdiv.style.marginTop = '2px'; newdiv.style.display = 'none'; targetDiv.appendChild(newdiv); var targetDiv = $('purchase'); var newdiv = document.createElement('div'); newdiv.setAttribute('id','purchaseC'); targetDiv.appendChild(newdiv); /* Here i'm going to include the validation javascript */ var headID = document.getElementsByTagName("head")[0]; var newScript = document.createElement('script'); newScript.type = 'text/javascript'; newScript.src = '/js/purchase_allservices.js'; headID.appendChild(newScript); /* now display the purchase link */ new Ajax.Request('/purchase_allservices.asp', {onSuccess:function(transport){ $('purchaseC').update(transport.responseText); new Effect.SlideDown('purchase', {duration:0.3}); }}); } }