function swfcontext($gaid, $parseurl, $deepRedirect){
	if($gaid!=""){
		if (typeof(_gat) == "object") {
			try {
				pageTracker = _gat._getTracker($gaid);
				pageTracker._setDomainName("none");
				pageTracker._setAllowLinker(true);
			} catch(err) {};
		};
	};
	this.FLASHVERSION = "9.0.124";
	if($parseurl) this.PARSEURL(window.location.toString());
	if($deepRedirect) this.DEEPURL($deepRedirect);
};

swfcontext.prototype.PARSEURL = function($location) {
	var key = ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","deeplink"];
	var q = {name:"params", parser: /(?:^|&)([^&=]*)=?([^&]*)/g};
	var parser = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;
	var m   = parser.exec($location);
	var uri = {};
	var i   = 14;

	while (i--) uri[key[i]] = m[i] || "";

	uri[q.name] = {};
	uri[key[12]].replace(q.parser, function ($0, $1, $2) {
		if ($1) uri[q.name][$1] = $2;
	});
	
	this.URLITEMS = uri;
	this.DOMAIN = this.URLITEMS["protocol"]+"://"+this.URLITEMS["host"];
	this.PATH_URL = this.URLITEMS["protocol"]+"://"+this.URLITEMS["host"]+this.URLITEMS["directory"];
	this.PARAMS_URL = this.URLITEMS["params"];
};

swfcontext.prototype.SETUPFLASH = function( $flashObj ) {
	if($flashObj["SWF_RUNTIME"] == undefined)				$flashObj["SWF_RUNTIME"]	= "medias/swf/runtime.swf";
	if($flashObj["SWF_TARGET"] == undefined)				$flashObj["SWF_TARGET"] 	= "content";
	if($flashObj["SWF_WIDTH"] == undefined)					$flashObj["SWF_WIDTH"] 		= "100%";
	if($flashObj["SWF_HEIGHT"] == undefined)				$flashObj["SWF_HEIGHT"] 	= "100%";
	if($flashObj["SWF_NAME"] == undefined)					$flashObj["SWF_NAME"] 		= "main";
	if($flashObj["SWF_INSTALL"] == undefined)				$flashObj["SWF_INSTALL"] 	= "";
	if($flashObj["SWF_VARS"] == undefined)					$flashObj["SWF_VARS"] 		= {};
	if($flashObj["SWF_PARAMS"] == undefined)				$flashObj["SWF_PARAMS"] 	= {};
	if($flashObj["VERSION"] == undefined)					$flashObj["VERSION"] 		= this.FLASHVERSION;
	
	if($flashObj["SWF_VARS"].swMin == undefined)			$flashObj["SWMIN"] 			= 1015;
	else $flashObj["SWMIN"] = $flashObj["SWF_VARS"].swMin;
	if($flashObj["SWF_VARS"].shMin == undefined)			$flashObj["SHMIN"] 			= 630;
	else $flashObj["SHMIN"] = $flashObj["SWF_VARS"].shMin;
	
	if($flashObj["SWF_ATTS"] == undefined) $flashObj["SWF_ATTS"] = {id:$flashObj["SWF_NAME"], name:$flashObj["SWF_NAME"]};
	else{
		$flashObj["SWF_ATTS"].id = $flashObj["SWF_NAME"];
		$flashObj["SWF_ATTS"].name = $flashObj["SWF_NAME"];
	};
};
swfcontext.prototype.DEEPURL = function($pRedirect) {
	if(this.URLITEMS["params"][$pRedirect] != undefined){
		var deeplink = this.URLITEMS["params"][$pRedirect];
		delete this.URLITEMS["params"][$pRedirect];
		var redirect = "";
		for(var params in this.URLITEMS["params"]) redirect+= "&"+params+"="+this.URLITEMS["params"][params];
		redirect = redirect.substring(1,redirect.length);
		redirect = this.PATH_URL +"?"+redirect;
		if(deeplink.charAt(0)!="/") deeplink = "/"+deeplink;
		this.REDIRECT(redirect+"#"+deeplink);	
	};
};
swfcontext.prototype.REDIRECT = function($path) {document.location = $path;};
swfcontext.prototype.TRACK = function($path) { try{pageTracker._trackPageview($path.toUpperCase());}catch(err){}};