﻿/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;

/**--------------*/
var user = navigator.userAgent.toLowerCase();
var isGecko     = (user.indexOf("gecko") > -1);
var isOpera     = (typeof window.opera != "undefined");
var isIe        = (user.indexOf("msie") > -1 && !isOpera);
var isStrict    = (document.documentElement && document.documentElement.clientHeight);
var isSupported = (isGecko || isOpera || isIe);
function getPageSize() {
    var oDocBody = document.body;
    var iScrollWidth, iScrollHeight;
        if (isGecko) {
        iScrollWidth  = oDocBody.scrollWidth;
	   iScrollHeight = window.innerHeight + window.scrollMaxY;
    } else {
        iScrollWidth  = (oDocBody.scrollWidth > oDocBody.offsetWidth)?oDocBody.scrollWidth:oDocBody.offsetWidth;
        iScrollHeight = (oDocBody.scrollHeight > oDocBody.offsetHeight)?oDocBody.scrollHeight:oDocBody.offsetHeight;
    }
    
    if (!isIe) {
        this.windowWidth    = window.innerWidth;
        this.windowHeight   = window.innerHeight;
    } else {
        var oDocObj = (isStrict)?document.documentElement:oDocBody;
        this.windowWidth    = oDocObj.clientWidth;
        this.windowHeight   = oDocObj.clientHeight;
    }
    this.pageHeight = (iScrollHeight < this.windowHeight)?this.windowHeight:iScrollHeight;
    this.pageWidth  = (iScrollWidth < this.windowWidth)?this.windowWidth:iScrollWidth;
return this;
}
//var divstyle="";
function newSize123(datoX,datoY) {

if(document.all && !document.getElementById) 
{ 
	document.all['flash_uper'].style.pixelWidth = datoX; 
	document.all['flash_uper'].style.pixelHeight = datoY; 
	document.getElementById('flash_uper').style.position='static';
}else
{ 
	var obj=document.getElementById('flash_uper');
	divstyle=obj.style;
	document.getElementById('flash_uper').style.top="0px";
	document.getElementById('flash_uper').style.width = datoX+"px"; 
	document.getElementById('flash_uper').style.height = datoY+"px";
	if(document.getElementById('flash_uper').style.position=='absolute') {
		document.getElementById('flash_uper').style.position='static';
		document.getElementById('back').style.display='none';
		doselect('inline');
//document.getElementById('type').style.display='inline';
	}else
	{
		var win=getPageSize();
		document.getElementById('back').style.display='inline';
//document.getElementById('type').style.display='none';
document.getElementById('back').style.height=win.pageHeight+"px";
document.getElementById('back').style.width=win.pageWidth+"px";
		document.getElementById('flash_uper').style.position='absolute';
		document.getElementById('flash_uper').style.left="180px";
		doselect('none');
		//_root.backgroundColor="#00FFFF"; 
	}
} 
//alert(document.getElementById('flash_uper').style.position);
}
 
//--> 
function doselect(display)
{
    var els=document.getElementsByTagName('select');
    for(var i=0;i<els.length;i++)
    {
        s=els[i].style;
        s.display=display;
    }
}
function showbackgroud()
{
   document.write('');
}

//几个公用函数
var _ =
{
	"map":function(vars,func){func(vars);},
	"rand":function(begin,end){if(begin){end = end?end:2147483648;return Math.floor(Math.random()*(end-begin)+begin);}else{a = new Date();return a.getTime();}},
	"r":function(vars){document.write(vars)},
	"e":function(){var elements = [];for (var i = 0; i < arguments.length; i++){var element = arguments[i];if (typeof element == 'string')element = document.getElementById(element);if (arguments.length == 1)return element;elements.push(element);}return elements;},
	"get":function(name){var get  =location.search||location.hash;var start	=get.indexOf(name + '=');if (start == -1) return '';var len = start + name.length + 1;var end = get.indexOf('&',len);if (end == -1) end = get.length;return unescape(get.substring(len,end));},
	"getCookie":function(name){var cookieValue = "";var search = name + "=";if(document.cookie.length > 0){offset = document.cookie.indexOf(search);if (offset != -1){offset += search.length;end = document.cookie.indexOf(";", offset);if (end == -1) end = document.cookie.length;cookieValue = unescape(document.cookie.substring(offset, end));}}return cookieValue;},
	"setCookie":function(name, value, hours){var domain = "; domain=56.com; path=/";hours=hours||1;var expire = new Date((new Date()).getTime() + hours * 60 * 60 * 1000);expire = "; expires=" + expire.toGMTString();document.cookie = name + "=" + escape(value) + expire + domain;},
	"copy":function(vars,note){note=note||'网址复制成功!';window.clipboardData.setData('text',vars);if(note)alert(note);},
	"rehide":function(obj1, obj2){try{obj1	= this.e(obj1);obj2	= this.e(obj2);if(obj1.style.display==''){$(obj1).hide("slow");$(obj2).show();}else{$(obj2).hide("slow");$(obj1).show();}}catch (e){}},
	"gowin":function(url,t,note){if(note)if(!window.confirm(note))return;if(t){top.document.location.replace(url);}document.location.replace(url);},
	"checkboxAll":function(a,b){b = b ? b['checked'] : true;a['checked'] = b;	for(var i=0;i<a.length;i++)a[i]['checked'] = b;},
	"checkboxChkFrom":function(a,note)	{note  = note || "提示:\n\t删除将无法恢复!您确定要删除所选吗？\t\n";var b = false;	if(a['checked'])b = true;for(var i=0;i<a.length;i++){	if(a[i]['checked']){ b = true;	break;	}};if(b) if(confirm(note)) return true;return false;},
	"time":function(a,b){var s,d;	if(b==1){d = new Date(a*1000);	s = d.getYear() + "-";  s += (d.getMonth() + 1) + "-";s += d.getDate();}else{d = new Date(a*1000);s = d.getYear() + "-"; s += (d.getMonth() + 1) + "-";	s += d.getDate()+ " ";s += d.getHours() + ":";s += d.getMinutes() + ":";s += d.getSeconds();};	return s;},
	"substr":function(s,n)	{s = s.toString();if(s){n = n||20;if(s.length > n){return s.substr(0,n)+'..';	}}return s;	},
	"size":function(a){var b;if(a<1024){b = 'Bit';}else if(a<1024*1024 && a>1024){a = a/1024;b = 'K';}else if(a<1024*1024*1024 && a>1024*1024){a = a/1024/1024;b = 'M';}else{a = a/1024/1024/1024;b = 'G';};return (Math.round(a*100)/100)+b;},
	"player":function(v,p,w,h){p = p || 'http://www.56.com/flashApp/v_player_site_fp7_5_20061219.swf';w = w || '100%';h = h || '100%';var wl = this.get('wl') || 0;return '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'"><param name="movie" value="'+(wl?p+'?'+v:p)+'"><param name="quality" value="high"> <param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" />'+(wl?'':'<param name="FlashVars" value="'+v+'" />')+'<embed src="'+(wl?p+'?'+v:p)+'"  '+(wl?'':'flashvars="'+v+'"')+' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"  width="'+w+'" height="'+h+'"></embed></object>';},
	"do":function(e,fn){var a= this.e(e+'_loading');if(a){$(a).show('slow');}else{$('#'+e).prepend('<div id="'+e+'_loading" style="text-align:center"><img src="http://www.56.com/space/imgs/all/loading.gif" alt="数据加载中..."  align="absmiddle" /> 数据加载中... '+(fn?'[<a href="javascript:'+fn+'">刷新</a>]':'')+'</div>');}},
	"err":function(a,data,user,woman){data = (typeof data =='object')?data:data||{"flv":"http://www.56.com/v/img/flv_no_photo.gif","user":"http://www.56.com/v/img/user_no_photo.gif","women":"http://www.56.com/space/imgs/all/thu_woman.gif"};if(user){if(woman){a.src=data.woman;}else{a.src=data.user;}}else{a.src=data.flv;}},
    "phost":function(a,b)
    {
        if(b)
        {        
            var c = {0:'u',1:'u',2:'l',3:'p'};
            if(b==1 || b==2 || b ==3)b = c[b];
            return "http://www.56.com/"+b+(a%88+11);
        }else
        {
            var rs = 0,l=a.length,i;for(i=0;i<l;i++)rs+=a.charCodeAt(i);
            return "http://www.56.com/w"+(rs%88+11);
        }
    },
	"getEnId":function(url){url=url||location.href;return url.indexOf('/v_')==-1?url.split('id=')[1].split('&')[0]:url.split('/v_')[1].split('.')[0];}
};