

var juiIPP_noID = {
	_targetID : null,
	_tracking : null, // hbx tracking
	_linkID : null,
	_continueURL : null,
    _newWindow : true, // by default open in a new window
	onLoad_RemoveLinks : function() {
		if ( document.getElementById( 'bodyContainer' ) ) {
			var aTags = document.getElementById( 'bodyContainer' ).getElementsByTagName( 'A' );

			for ( var i = 0; i < aTags.length; i++ ) {
				if ( aTags[ i ].className == 'insidePagePopup' ) {
					aTags[ i ].href = 'javascript:void(0)';
					aTags[ i ].target = '';
					aTags[ i ].className = 'removedInsidePagePopup';
				}
			}
		}

		juiIPP_noID.onLoad_attachInsidePagePopup();
	},
	onLoad_attachInsidePagePopup : function() {
		var tFull = document.createElement( 'div' );
		tFull.id = 'fullPageWrap_noID';
		tFull.style.visibility = 'hidden';
		tFull.style.display = 'block';

		var tBackground = document.createElement( 'div' );
		tBackground.id = 'ippBackground_noID';
		tBackground.innerHTML = '<!-- -->';

		var tWrap = document.createElement( 'div' );
		tWrap.id = 'ippWrap_noID';

		var popupTop = document.createElement( 'div' );
		popupTop.className = 'popupTop';

		var popupBottom = document.createElement( 'div' );
		popupBottom.className = 'popupBottom';

		var popupBorderLeft = document.createElement( 'div' );
		var popupBorderMiddle = document.createElement( 'div' );
		var popupBorderRight = document.createElement( 'div' );
		popupBorderLeft.className = 'borderLeft';
		popupBorderLeft.innerHTML = '<!-- -->';
		popupBorderMiddle.className = 'borderMiddle';
		popupBorderMiddle.innerHTML = '<!-- -->';
		popupBorderRight.className = 'borderRight';
		popupBorderRight.innerHTML = '<!-- -->';

		popupTop.appendChild( popupBorderLeft );
		popupTop.appendChild( popupBorderMiddle );
		popupTop.appendChild( popupBorderRight );

		popupBorderLeft = undefined;
		popupBorderMiddle = undefined;
		popupBorderRight = undefined;

		popupBorderLeft = document.createElement( 'div' );
		popupBorderMiddle = document.createElement( 'div' );
		popupBorderRight = document.createElement( 'div' );
		popupBorderLeft.className = 'borderLeft';
		popupBorderLeft.innerHTML = '<!-- -->';
		popupBorderMiddle.className = 'borderMiddle';
		popupBorderMiddle.innerHTML = '<!-- -->';
		popupBorderRight.className = 'borderRight';
		popupBorderRight.innerHTML = '<!-- -->';

		popupBottom.appendChild( popupBorderLeft );
		popupBottom.appendChild( popupBorderMiddle );
		popupBottom.appendChild( popupBorderRight );

		popupBorderLeft = undefined;
		popupBorderMiddle = undefined;
		popupBorderRight = undefined;

		var popupContent = document.createElement( 'div' );
		popupContent.className = 'popupContent';

		var popupContentWrap = document.createElement( 'div' );
        popupContentWrap.id = 'popupContentWrap_noID';
		popupContentWrap.className = 'popupContentWrap';

		

        popupContent.appendChild( popupContentWrap );
        popupContentWrap = undefined;

		tWrap.appendChild( popupTop );
		tWrap.appendChild( popupContent );
		tWrap.appendChild( popupBottom );
		popupTop = undefined;
		popupContent = undefined;
		popupBottom = undefined;

		tFull.appendChild( tBackground );
		tFull.appendChild( tWrap );
		tBackground = undefined;
		tWrap = undefined;

		document.body.appendChild( tFull );
		tFull = undefined;
	},
	onClick_NoThanks : function() {
		if ( document.getElementById( 'fullPageWrap_noID' ) ) {
			document.getElementById( 'fullPageWrap_noID' ).style.display = 'none';
		}
	},
	onClick_Continue : function() {
		if ( juiIPP_noID._continueURL ) {
			if ( juiIPP_noID._tracking ) {
				_hbLink( juiIPP_noID._tracking );s_wdpro.pageName = s_wdpro.heir1 + '/' + juiIPP_noID._tracking;void(s_wdpro.tl());
			}

			if ( juiIPP_noID._newWindow ) {
				window.open( juiIPP_noID._continueURL, 'IPP_' + juiIPP_noID._targetID );
			} else {
            	window.document.location.href = juiIPP_noID._continueURL;
            }

			juiIPP_noID.onClick_NoThanks();
		}
	},
	warnLeavingDisney : function( strTargetID, strLinkID, strContinueURL, strTracking ) {
		if ( !strContinueURL || !strLinkID ) {
			return true;
		}

		if ( document.getElementById( 'fullPageWrap_noID' ) && document.getElementById( 'fullPageWrap' ).style.visibility == 'hidden' ) {
			document.getElementById( 'fullPageWrap_noID' ).style.display = 'none';
			document.getElementById( 'fullPageWrap_noID' ).style.visibility = 'visible';
		}

		if ( document.getElementById( strLinkID ) && document.getElementById( strLinkID ).className == 'removedInsidePagePopup' ) {
			if ( !strTargetID || !document.getElementById( strTargetID ) ) {
				strTargetID = '';
			}

			juiIPP_noID._targetID = strTargetID;
			juiIPP_noID._tracking = strTracking;
			juiIPP_noID._linkID = strLinkID;
			juiIPP_noID._continueURL = strContinueURL;

			if ( juiIPP_noID._targetID ) {
				var tempdiv = document.getElementById( juiIPP_noID._targetID );
				var temptop = 0;

				while ( tempdiv != null ) {
					temptop += tempdiv.offsetTop;
					tempdiv = tempdiv.offsetParent;
				}

				document.getElementById( 'ippWrap_noID' ).style.top = temptop + 'px';
			}

			document.getElementById( 'ippBackground_noID' ).style.height = ( document.getElementById( 'footer' ).offsetTop + document.getElementById( 'footer' ).offsetHeight ) + 'px';
			document.getElementById( 'fullPageWrap_noID' ).style.display = 'block';
		} else {
			return true;
		}
	}
};


	SafeAddOnload(function() {
		juiIPP_noID.onLoad_attachInsidePagePopup();
	});
	