/* Doc_Obj v1.1 <http://flashopen.net/tutorials/swfobject/>
	Copyright (c) 2009 Carlos Guerra Amaral
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
/*
 Tested in PCWin with 
				FireFox 3.0.11 
				Netscape 8.1 
				Flock 1.2.6 
				Safari 3.2.1 
				IExplorer 8.0.6001
*/
	var useragent = navigator.userAgent.toLowerCase();
	var hashes = false;
	var h;
	var url;
	var index;
	var count = 0;
	var myurl = window.location.href;
	//
	if (useragent.indexOf("gecko") != -1) {
		hashes = true;
		setInterval("get_url()",50);
	}else{
		hashes = false;
		setInterval("get_url()",50);
	}
	//
	function set_url(n){
		//
		window.location.hash = "#"+n;
		//
		// IE / Opera
		if (hashes == false) {
			if(document["hframe"].location.search != "?"+n){
				document["hframe"].location.search = "?"+n;
				url = "?"+n;
				document["hframe"].reload();
			}
		}else{
			url = window.location.hash;
		}
	}
	//
	function get_url(){
		// IE
		if (hashes == false) {
			index = document["hframe"].location.search;
			if(url != index){
				url = document["hframe"].location.search;
				setTimeout(time_out,100);
				
			}
			//
		// FF / Netscape
		}else {
			index = window.location.hash;
			if(url != index){
				url = window.location.hash;
				setTimeout(time_out,50);
			}
		}
	}
	function time_out(){
		document["serendipity"].goHome(url.substr(1));
	}
	//
