var SIGNUP_CONTENT_WIDTH = 800; var SIGNUP_CONTENT_HEIGHT = 735; var signupLoadingImage = 'loading.gif'; var signupBodyLayer = null; var signupOverlayLayer = null; var signupLayer = null; var SIGNUP_BASE_PAGE = "/signup"; var signupAjaxInstance = new AjaxObject(); var signupOverlayTop = ( ( browser.getWindowHeight() - 35 - SIGNUP_CONTENT_HEIGHT ) / 2 ); if ( signupOverlayTop < 0 ) { signupOverlayTop = 20; } var signupOverlayLeft = ( ( browser.getWindowWidth() - 20 - SIGNUP_CONTENT_WIDTH ) / 2 ); function initSignupOverlayLayers() { signupBodyLayer = document.getElementsByTagName( "body" ).item( 0 ); //alert( signupBodyLayer.id ); signupOverlayLayer = document.createElement( "div" ); signupOverlayLayer.setAttribute( 'id', 'signupOverlayLayer' ); signupOverlayLayer.onclick = function() { hideSignupOverlay(); }; signupOverlayLayer.style.position = 'absolute'; signupOverlayLayer.style.visibility = "hidden"; signupOverlayLayer.style.height = ( browser.getPageHeight() + 'px'); signupOverlayLayer.style.top = '-5px'; signupOverlayLayer.style.left = '0px'; signupOverlayLayer.style.zIndex = '100'; signupOverlayLayer.style.width = '100%'; signupBodyLayer.insertBefore( signupOverlayLayer, signupBodyLayer.firstChild ); signupLayer = document.createElement( "div" ); signupLayer.setAttribute( 'id', 'signupLayer' ); signupLayer.style.position = 'absolute'; signupLayer.style.visibility = "hidden"; signupLayer.style.top = signupOverlayTop + 'px'; signupLayer.style.left = signupOverlayLeft + 'px'; signupLayer.style.zIndex = '200'; signupLayer.style.width = SIGNUP_CONTENT_WIDTH + 'px'; signupLayer.style.height = SIGNUP_CONTENT_HEIGHT + 'px'; //signupOverlayLayer.appendChild( signupLayer ); signupBodyLayer.insertBefore( signupLayer, signupBodyLayer.firstChild ); } var initialParams = ""; function showSignupOverlay( initialParams ) { browser.hideSelects(); initSignupOverlayLayers(); signupAjaxInstance = null; signupAjaxInstance = new AjaxObject(); signupAjaxInstance.intializeConnection(); signupAjaxInstance.setUrl( SIGNUP_BASE_PAGE ); signupAjaxInstance.setWriteToLayer( "signupLayer" ); signupAjaxInstance.setUrlParams( initialParams ); signupAjaxInstance.xmlhttpPost(); browser.changeAttribute( "flash_player", "visibility", "hidden" ); signupOverlayLayer.style.visibility = "visible"; signupLayer.style.visibility = "visible"; var runStr = "document.getElementById( 'referring_uri' ).value = document.location"; setTimeout( runStr, 2000 ); } function hideSignupOverlay() { browser.showSelects(); signupOverlayLayer.style.visibility = "hidden"; signupLayer.style.visibility = "hidden"; browser.changeAttribute( "flash_player", "visibility", "visible" ); signupOverlayLayer.flush(); } function submitSignup( formRef ) { var formObj = new FormClass(); formObj.setForm( formRef ); formObj.init(); signupAjaxInstance.setParams( formObj.getQueryString() ); signupAjaxInstance.xmlhttpPost(); }