// JavaScript Document
function checkFrame() {
	var root, location, pos, page, tmp;
	root='angeliniinfissi.it/';
	if (!(parent.frames.length > 0)) { // Se non siamo dentro ad un frameset		
		location = new String(window.location);
		//alert(location);
		pos = location.search(root);
		//alert(pos);
		pos += root.length;
		//alert(pos);
		page = location.substr(pos);
		root = '';
		tmp = page;
		while ((pos = tmp.search('/')) !=-1) {			
			root +='../';
			tmp = tmp.substr(pos+1);			
		}		
		window.location = root+'index.htm?page='+page;
	}
}
