var isLoad=false,flashload=false;
function fc(func){
	var movieName='flashDataMovie',fileurl='/setcookies.swf',fn=func||function(){};
	var loadtime=0;
	function init(){
		if(isLoad){
			fn();
			return;
		}
		if(!flashload){
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="0" height="0" id="flashDataMovie">'+
	'<param name="movie" value="/setcookies.swf" /><param name="allowScriptAccess" value="always" /><param name="quality" value="high" />'+
	'<embed src="/setcookies.swf" quality="high" width=0 height=0 type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" name="flashDataMovie" swLiveConnect="true"></embed></object>');
	}
	loadingFlash();
	flashload=true;
	}
	function loadingFlash(){
		var objThisFlash = thisMovie(movieName)['saveValue'];
		loadtime+=100;
		if(!!objThisFlash){
				loadtime=0;
				isLoad=true;
				fn();
				return true;
		}else if(loadtime>5000){
			return false;
		}
		window.setTimeout(loadingFlash,100)
	}
	function thisMovie(movieName){
		if (navigator.appName.indexOf("Microsoft") != -1){
			return window[movieName];
		}else{
			return document[movieName];
		}   
	}
	fc.set=function(key,value){
		var thisobj=thisMovie(movieName);
		thisobj.saveValue(key, value);
		return true;
	};
	fc.get=function(key){
		var thisobj=thisMovie(movieName),getobj = thisobj.getValue(),v='';
		for(var i in getobj){
			if(i==key){
				v=getobj[i];
				break;
			}
		}
		return v;
	};
	fc.clear=function(key){
		var thisobj=thisMovie(movieName),getobj = thisobj.getValue();
		fc.set(key,null);
	};
	init();
}
fc();