
﻿
function overlay(){toggleTags('select');var objWrapper=document.getElementById('wrapper');var objOverlay=document.createElement('div');objOverlay.setAttribute('id','overlay');objOverlay.onclick=function(){hideContainer();return false;}
objWrapper.insertBefore(objOverlay,objWrapper.firstChild);arrayPageSize=getPageSize();objOverlay=document.getElementById("overlay");objOverlay.style.height=(arrayPageSize[1]+'px');$(objOverlay).show();}
function ahahSuccess(msg){var objPreload=document.getElementById("preload");arrayPageSize=getPageSize();yScroll=getPageScroll();objPreload.style.left=(arrayPageSize[2]/2-objPreload.style.width)+'px';objPreload.style.top=yScroll+arrayPageSize[3]*.5+'px';$(objPreload).show();ahahComplete(msg);}
function ahahComplete(msg){$("#preload").hide();document.getElementById("ahahContainer").innerHTML=msg;}
function ahahFailure(msg){alert('Request Failed.'+request);}
function ahahSwap(url){overlay();$.ajax({type:"GET",url:url,success:function(msg){ahahSuccess(msg)}});$("#ahahContainer").show();}
function ahahSwapFixed(url,width,height){var objTarget=document.getElementById("ahahContainer");objTarget.style.width=width+'px';objTarget.style.height=height+38+'px';url=url.replace("&amp;","&");url=url.replace("+"," ");arrayPageSize=getPageSize();yScroll=getPageScroll();objTarget.style.left=(arrayPageSize[2]/2-width/2)+'px';objTarget.style.top=yScroll+arrayPageSize[3]*.1+'px';objTarget.style.position="absolute";ahahSwap(url);}
function hideContainer()
{var objOverlay;var objContainer;if(document.getElementById("overlay")&&document.getElementById("ahahContainer")){objOverlay=document.getElementById("overlay");objContainer=document.getElementById("ahahContainer");}else{alert('could not find overlay and container element');return false;}
$(objContainer).toggle();$(objOverlay).toggle();if(objOverlay){$("#preload").hide();$(objOverlay).hide();objOverlay.style.backgroundColor='transparent';}
toggleTags('select');if(document.getElementById("ahahContainer")){document.getElementById("ahahContainer").innerHTML='';}}