// redirect to main page
if ( (window.location.toString().indexOf('?frame=' != -1 )) ){

  var  hostname = '/' + window.location.hostname + '/';

var start = window.location.toString().indexOf('?frame=');
var frameNewSrc = window.location.toString().substr( (start + 7));

if ( frameNewSrc !=  hostname ) {

	if ( document.getElementById('body_frame') != null ) {
		document.getElementById('body_frame').src = frameNewSrc;
	}
	else{
//		setTimeout(function(){window.location = 'http:/'+ hostname; }, 1);
		setTimeout(function(){document.getElementById('body_frame').src = frameNewSrc;}, 100);

	}
}

}

