
// Call this function in frame-set html header to make sure frame set is loaded at top. 

function LoadTop() {
	
	// if reframed, reload
	if (top != self) {
		if (document.images)
    			top.location.replace(location.href);
		else
    			top.location.href = location.href;

	}


}


// Call this function to make sure the MAWFA main page is loaded at top. 

function MainLoadTop() {
	
	// if reframed, reload
	if (top != self) {
		if (document.images)
    			top.location.replace('http://www.wish.org');
		else
    			top.location.href = 'http://www.wish.org';

	}

}



// Call this function in the content frame-window named "wishmain".
// Pass it the frame-set file name that should be loaded.
// For example, pass it frame_giving.htm and this makes sure the content page is 
// not loaded without the *correct* surrounding frameset.  If it is, it will load
// frame_giving.htm.  frameURL can be an absolute or relative URL

function CheckFrames(frameURL) {

	if ((top == self) || (parent.frames[1].name != 'wishmain')) {

    		if (document.images)
        		top.location.replace(frameURL);
    		else
        		top.location.href = frameURL;
	}

}

