
if(typeof(sina)!="object"){var sina={}}sina.$=function(i){if(!i){return null}return document.getElementById(i)};var sinaFlash=function(V,x,X,Z,v,z,i,c,I,l,o){var w=this;if(!document.createElement||!document.getElementById){return}w.id=x?x:'';var O=function(I,i){for(var l=0;l<I.length;l++){if(I[l]==i){return l}}return-1},C='8.0.42.0';if(O(['eladies.sina.com.cn','ent.sina.com.cn'],document.domain)>-1){w.ver=C}else{w.ver=v?v:C}w.ver=w.ver.replace(/\./g,',');w.__classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";w.__codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+w.ver;w.width=X;w.height=Z;w.movie=V;w.src=w.movie;w.bgcolor=z?z:'';w.quality=c?c:"high";w.__pluginspage="http://www.macromedia.com/go/getflashplayer";w.__type="application/x-shockwave-flash";w.useExpressInstall=(typeof(i)=="boolean")?i:false;w.xir=I?I:window.location;w.redirectUrl=l?l:window.location;w.detectKey=(typeof(o)=="boolean")?o:true;w.escapeIs=false;w.__objAttrs={};w.__params={};w.__embedAttrs={};w.__flashVars=[];w.__flashVarsStr="";w.__forSetAttribute("id",w.id);w.__objAttrs["classid"]=w.__classid;w.__forSetAttribute("codebase",w.__codebase);w.__forSetAttribute("width",w.width);w.__forSetAttribute("height",w.height);w.__forSetAttribute("movie",w.movie);w.__forSetAttribute("quality",w.quality);w.__forSetAttribute("pluginspage",w.__pluginspage);w.__forSetAttribute("type",w.__type);w.__forSetAttribute("bgcolor",w.bgcolor)};sinaFlash.prototype={getFlashHtml:function(){var I=this,i='<object ';for(var l in I.__objAttrs){i+=l+'="'+I.__objAttrs[l]+'"'+' '};i+='>\n';for(var l in I.__params){i+='	<param name="'+l+'" value="'+I.__params[l]+'" \/>\n'};if(I.__flashVarsStr!=""){i+='	<param name="flashvars" value="'+I.__flashVarsStr+'" \/>\n'};i+='	<embed ';for(var l in I.__embedAttrs){i+=l+'="'+I.__embedAttrs[l]+'"'+' '};i+='><\/embed>\n<\/object>';return i},__forSetAttribute:function(I,i){var l=this;if(typeof(I)=="undefined"||I==''||typeof(i)=="undefined"||i==''){return};I=I.toLowerCase();switch(I){case "classid":break;case "pluginspage":l.__embedAttrs[I]=i;break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblClick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "codebase":l.__objAttrs[I]=i;break;case "src":case "movie":l.__embedAttrs["src"]=i;l.__params["movie"]=i;break;case "width":case "height":case "align":case "vspace":case "hspace":case "title":case "class":case "name":case "id":case "accesskey":case "tabindex":case "type":l.__objAttrs[I]=l.__embedAttrs[I]=i;break;default:l.__params[I]=l.__embedAttrs[I]=i}},__forGetAttribute:function(i){var I=this;i=i.toLowerCase();if(typeof I.__objAttrs[i]!="undefined"){return I.__objAttrs[i]}else if(typeof I.__params[i]!="undefined"){return I.__params[i]}else if(typeof I.__embedAttrs[i]!="undefined"){return I.__embedAttrs[i]}else{return null}},setAttribute:function(I,i){this.__forSetAttribute(I,i)},getAttribute:function(i){return this.__forGetAttribute(i)},addVariable:function(I,i){var l=this;if(l.escapeIs){I=escape(I);i=escape(i)};if(l.__flashVarsStr==""){l.__flashVarsStr=I+"="+i}else{l.__flashVarsStr+="&"+I+"="+i};l.__embedAttrs["FlashVars"]=l.__flashVarsStr},getVariable:function(I){var o=this,i=o.__flashVarsStr;if(o.escapeIs){I=escape(I)};var l=new RegExp(I+"=([^\\&]*)(\\&?)","i").exec(i);if(o.escapeIs){return unescape(RegExp.$1)};return RegExp.$1},addParam:function(I,i){this.__forSetAttribute(I,i)},getParam:function(i){return this.__forGetAttribute(i)},write:function(i){var I=this;if(typeof i=="string"){document.getElementById(i).innerHTML=I.getFlashHtml()}else if(typeof i=="object"){i.innerHTML=I.getFlashHtml()}}};

(function () {

	var _ua = navigator.userAgent.toLowerCase();
	var $IE = /msie/.test(_ua);
	var $moz = /gecko/.test(_ua);
	var $Safari = /safari/.test(_ua);

	function $E(id) {
		return typeof(id) == 'string' ? _viewWindow.document.getElementById(id) : id;
	}

var getScrollPos = function(oDocument) {
	oDocument = oDocument || document;
	return [
			Math.max(oDocument.documentElement.scrollTop, oDocument.body.scrollTop), 
			Math.max(oDocument.documentElement.scrollLeft, oDocument.body.scrollLeft),
			Math.max(oDocument.documentElement.scrollWidth, oDocument.body.scrollWidth), 
			Math.max(oDocument.documentElement.scrollHeight, oDocument.body.scrollHeight)
			];
};


var getStyle = function (el, property) {
	switch (property) {
		// 透明度
		case "opacity":
				var val = 100;
				try {
						val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity;
				}
				catch(e) {
						try {
							val = el.filters('alpha').opacity;
						}catch(e){}
				}
				return val;
		 // 浮动
		 case "float":
				 property = "styleFloat";
		 default:
				 var value = el.currentStyle? el.currentStyle[property]: null;
				 return ( el.style[property] || value );
	}
};
if($moz) {
	getStyle = function (el, property) {
		// 浮动
		if(property == "float") {
			property = "cssFloat";
		}
		// 获取集合
		try{
			var computed = document.defaultView.getComputedStyle(el, "");
		}
		catch(e) {
			traceError(e);
		}
		return el.style[property] || computed? computed[property]: null;
	};
}

/**
* 获取节点对象的距文档的XY值

*/
var getXY = function (el) {
	if ((el.parentNode == null || el.offsetParent == null || getStyle(el, "display") == "none") && el != document.body) {
		return false;
	}
	var parentNode = null;
	var pos = [];
	var box;
	var doc = el.ownerDocument;
	// IE
	box = el.getBoundingClientRect();
	var scrollPos = getScrollPos(el.ownerDocument);
	return [box.left + scrollPos[1], box.top + scrollPos[0]];
	// IE end
	parentNode = el.parentNode;
	while (parentNode.tagName && !/^body|html$/i.test(parentNode.tagName)) {
		if (getStyle(parentNode, "display").search(/^inline|table-row.*$/i)) { 
			pos[0] -= parentNode.scrollLeft;
			pos[1] -= parentNode.scrollTop;
		}
		parentNode = parentNode.parentNode; 
	}
	return pos;
};
	if($moz) {
		getXY = function (el) {
			if ((el.parentNode == null || el.offsetParent == null || getStyle(el, "display") == "none") && el != document.body) {
				return false;
			}
			var parentNode = null;
			var pos = [];
			var box;
			var doc = el.ownerDocument;

			// FF
			pos = [el.offsetLeft, el.offsetTop];
			parentNode = el.offsetParent;
			var hasAbs = getStyle(el, "position") == "absolute";

			if (parentNode != el) {
				while (parentNode) {
						pos[0] += parentNode.offsetLeft;
						pos[1] += parentNode.offsetTop;
						if ($Safari && !hasAbs && getStyle(parentNode,"position") == "absolute" ) {
								hasAbs = true;
						}
						parentNode = parentNode.offsetParent;
				}
			}

			if ($Safari && hasAbs) {
				pos[0] -= el.ownerDocument.body.offsetLeft;
				pos[1] -= el.ownerDocument.body.offsetTop;
			}
			parentNode = el.parentNode;
			// FF End
			while (parentNode.tagName && !/^body|html$/i.test(parentNode.tagName)) {
				if (getStyle(parentNode, "display").search(/^inline|table-row.*$/i)) { 
					pos[0] -= parentNode.scrollLeft;
					pos[1] -= parentNode.scrollTop;
				}
				parentNode = parentNode.parentNode; 
			}
			return pos;
		};
	}

	/**
	 * 获取Event对象
	 */
	var getEvent = function () {
		return window.event;
	};
	if($moz) {
		getEvent = function () {
			var o = arguments.callee.caller;
			var e;
			var n = 0;
			while(o != null && n < 40){
				e = o.arguments[0];
				if (e && (e.constructor == Event || e.constructor == MouseEvent)) {
					return e;

				}
				n ++;
				o = o.caller;
			}
			return e;
		};
	}

	/**
	 * 禁止Event事件冒泡
	 */
	var stopEvent = function() {
		var ev = getEvent();
		ev.cancelBubble = true;
		ev.returnValue = false;
	};
	if($moz) {
		stopEvent = function() {
			var ev = getEvent();
			ev.preventDefault();
			ev.stopPropagation();
		};
	}
	Function.prototype.bind3 = function(object, args) { 
		args = args == null? []: args;
		var __method = this; 
		return function() { 
			__method.apply(object, args); 
		} 
	};
	/**
	* 在指定节点上绑定相应的事件
	*/
	function addEvent2 (elm, func, evType, useCapture) {
		var elm = $E(elm);
		if(typeof useCapture == 'undefined') useCapture = false;
		if(typeof evType == 'undefined')  evType = 'click';
		if (elm.addEventListener) {
			elm.addEventListener(evType, func, useCapture);
			return true;
		}
		else if (elm.attachEvent) {
			var r = elm.attachEvent('on' + evType, func);
			return true;
		}
		else {
			elm['on' + evType] = func;
		}
	};

	/**
		初始化的一些变量

	*/
	var _inputNode;
	var _rndID = parseInt(Math.random() * 100);
	/** 当前显示的菜单集合 */
	var _showMenuItems = [];
	/** 当前显示的菜单索引 */
	var _selectMenuIndex = -1;
	/** 被选中行的文字 */
	var _selectMenuText = "";

	var _viewWindow = window;
	var passcardOBJ = {
		// 鼠标经过背景颜色
		overfcolor: "#999",
		// 鼠标经过背景颜色
		overbgcolor: "#e8f4fc",
		// 鼠标离开字体颜色
		outfcolor: "#000000",
		// 鼠标离开背景颜色
		outbgcolor: "",
		menuStatus: {
			// 是否显示Sina邮箱
			"sina.com": true,
			// 是否显示VIP邮箱 
			"vip.sina.com": true,
			// 是否显示2008
			"2008.sina.com": true,
			// 是否显示263
			"263.sina.com": true,
			// 是否显示CN邮箱
			"sina.cn": true,
			// 是否显示外域邮箱
			"非新浪邮箱": true
		}
	}

	/**
	 * 动态生成提示框
	 * add by xs @ 2008-3-4
	 */
	passcardOBJ.createNode = function(){
			var d = _viewWindow.document;
			var div = d.createElement('div');
			div.innerHTML = '<ul class="passCard" id="sinaNote" style="display:none;"></ul>'
			d.body.appendChild(div);
	}
	/**
		快捷键选择菜单
	*/
	passcardOBJ.arrowKey = function (keyCodeNum) {
			if(keyCodeNum == 38) {// --
					if(_selectMenuIndex <= 0)_selectMenuIndex = _showMenuItems.length;
					_selectMenuIndex --;
					passcardOBJ.selectLi(_selectMenuIndex);
			}
			if(keyCodeNum == 40) {// ++
					if(_selectMenuIndex >= _showMenuItems.length - 1)_selectMenuIndex = -1;
					_selectMenuIndex ++;

					passcardOBJ.selectLi(_selectMenuIndex);
			}
	};
	passcardOBJ.showList = function(e)//显示列表
	{
			_selectMenuText = "";
			var keyCodeNum = getEvent().keyCode;
			if(keyCodeNum == 38 || keyCodeNum == 40)  {
				passcardOBJ.arrowKey(keyCodeNum);
				return false;
			}
			if (!$E('sinaNote')) 
					passcardOBJ.createNode();
			var username = $E(e).value;
			var menuList = {
			};
			var atIndex = username.indexOf("@");
			var InputCase = "";
			var InputStr = "";
			if(atIndex > -1) {
				InputCase = username.substr(atIndex + 1);
				InputStr = username.substr(0, atIndex);
			}

			_showMenuItems = [];
			_selectMenuIndex = 0;
			_showMenuItems[_showMenuItems.length] = "sinaNote_MenuItem_Title_" + _rndID;
			for(var key in this.menuStatus) {
				this.menuStatus[key] = true;
				if(InputCase != "" && InputCase != key.substr(0, InputCase.length)) {
						this.menuStatus[key] = false;
				}
				else {
						_showMenuItems[_showMenuItems.length] = "sinaNote_MenuItem_" + key + "_" + _rndID;
				}
			}
			var listcontent = '<li class="note">请选择登录类型</li>';

			listcontent += '<li id="sinaNote_MenuItem_Title_'+_rndID+'">' + username + '</li>';

			var itemLabel;
			for(var key in this.menuStatus) {
				if(this.menuStatus[key] == true) {
					if(InputStr == "") {
						itemLabel = username + "@" + key;
					}
					else {
						itemLabel = InputStr + "@" + key;
					}
					listcontent += '<li id="sinaNote_MenuItem_' + key + '_' + _rndID + '" title="'+itemLabel+'">' + itemLabel + '</li>';
				}
			}
			$E("sinaNote").innerHTML = listcontent;
			for (var i = 0; i < username.length; i++) {
					if (username.charCodeAt(i) < 0xA0) {
							$E("sinaNote").style.display = "";
							this.selectList(e);
					}
					else {
							this.hideList();
					}
			}

			/**
			 * 自动适应文本框的位置，及宽度
			 */
			var el = $E(e);
			var note = $E("sinaNote");

			/**
				Iframe在父窗体的位置
			*/
			var frameLeft = 0;
			var frameTop = 0;
			var framePos;
			if(_viewWindow != window) {
				framePos = getXY(window.frameElement)
				frameLeft = framePos[0];
				frameTop = framePos[1];
			}

			var inputWidth = el.offsetWidth;
			if(inputWidth < 200) {
				inputWidth = 200;
			}
			note.style.width = inputWidth - 2 + 'px';
			var inputXY = getXY(el);
			note.style.left = (inputXY[0] - ($IE ? 2 : -1) + frameLeft) + 'px';
			note.style.top = (inputXY[1] + el.offsetHeight - ($IE ? 2 : -1) + frameTop) + 'px';
	}
	passcardOBJ.selectList = function(e)//选择列表
	{
			var unames = $E("sinaNote").getElementsByTagName("li");
			for (var i = 1; i < unames.length; i++) {
					unames[1].style.backgroundColor = passcardOBJ.overbgcolor;
					unames[1].style.color = passcardOBJ.outfcolor;//鼠标经过字体颜色
					unames[i].onmousedown = function(){
						var temp=this.innerHTML;
							if(temp.indexOf("非新浪邮箱")>-1){
								var pos=temp.split("@");
								$E(e).value=pos[0];
							}else{
								$E(e).value = this.innerHTML;
							}
							stopEvent();
					}
					unames[i].onmouseover = function(){
							if (i != 1) {
									unames[1].style.backgroundColor = passcardOBJ.outbgcolor;
									unames[1].style.color = passcardOBJ.overfcolor;//鼠标经过字体颜色
							}
							this.style.backgroundColor = passcardOBJ.overbgcolor;//鼠标经过背景颜色
							this.style.color = passcardOBJ.outfcolor;//鼠标经过字体颜色
					}
					unames[i].onmouseout = function(){
							this.style.backgroundColor = passcardOBJ.outbgcolor;//鼠标离开背景颜色
							this.style.color = passcardOBJ.overfcolor;//鼠标离开字体颜色
							unames[1].style.backgroundColor = passcardOBJ.overbgcolor;//鼠标经过背景颜色
							unames[1].style.color = passcardOBJ.outfcolor;//鼠标经过字体颜色
					}
			}
	}
	/**
		选中指定ID的li
		@author | fangchao@staff.sina.com.cn
	*/
	passcardOBJ.selectLi = function (nIndex) {
			var menuNode;
			$E("sinaNote_MenuItem_Title_"+_rndID).style.backgroundColor = passcardOBJ.outbgcolor;//鼠标离开背景颜色
			$E("sinaNote_MenuItem_Title_"+_rndID).style.color = passcardOBJ.overfcolor;//鼠标离开字体颜色
			for(var i = 0; i < _showMenuItems.length; i ++ ) {
				menuNode = $E(_showMenuItems[i]);
				menuNode.style.backgroundColor = passcardOBJ.outbgcolor;//鼠标离开背景颜色
				menuNode.style.color = passcardOBJ.overfcolor;//鼠标离开字体颜色
			}
			$E(_showMenuItems[nIndex]).style.backgroundColor = passcardOBJ.overbgcolor;//鼠标经过背景颜色
			$E(_showMenuItems[nIndex]).style.color = passcardOBJ.outfcolor;//鼠标经过字体颜色
			_selectMenuText = $E(_showMenuItems[nIndex]).innerHTML;

	}
	passcardOBJ.hideList = function()//隐藏列表
	{
			/**
			 * 如果没有找到页面中相应的对象，则自动创建
			 */
			if (!$E('sinaNote')) 
					passcardOBJ.createNode();
			$E("sinaNote").style.display = "none";
	}
	passcardOBJ.init = function (oNode, oColors, oFocusNode, oWindowTarget) {
		for(var key in oColors) {
			this[key] = oColors[key];
		}
		addEvent2(document, passcardOBJ.hideList, "click");
		addEvent2(oNode, passcardOBJ.hideList, "blur");
		addEvent2(oNode, passcardOBJ.showList.bind3(this, [oNode]), "keyup");
		addEvent2(oNode, function (e) {
			var keyCodeNum = getEvent().keyCode;
			if(keyCodeNum == 13 || keyCodeNum == 9) {
				if(_selectMenuText != "") {
					var temp=_selectMenuText;
					if(temp.indexOf("非新浪邮箱")>-1){
						var pos=temp.split("@");
						oNode.value=pos[0];
					}else{
						oNode.value = _selectMenuText;
					}
				}
				if(oFocusNode != null) oFocusNode.focus();
				stopEvent();
			}
		}, "keydown");
		if(oWindowTarget) _viewWindow = oWindowTarget;
	}
	window.passcardOBJ = passcardOBJ;
})();
/* login Suggest end */

/******** Editorial dept. end ********/

/******** Sales dept. begin ********/
function SinaDotAdJs(){
//-------------------------------

var pthis = this;
//浏览器判断
this.isIE=navigator.userAgent.indexOf("MSIE")==-1?false:true;
this.isOPER=navigator.userAgent.indexOf("Opera")==-1?false:true;
this.version=navigator.appVersion.split(";"); 
this.trim_Version=this.version[1].replace(/[ ]/g,""); 
this.isIE6=(navigator.appName=="Microsoft Internet Explorer" && this.trim_Version=="MSIE6.0")?true:false;
this.isXHTML = document.compatMode=="CSS1Compat"?true:false;

//获取body
this.bdy = (document.documentElement && document.documentElement.clientWidth)?document.documentElement:document.body;

//获取对象
this.$ = function(id){if(document.getElementById){return eval('document.getElementById("'+id+'")')}else{return eval('document.all.'+id)}};

//获取cookie
this.getAdCookie = function(N){
	var c=document.cookie.split("; ");
	for(var i=0;i<c.length;i++){var d=c[i].split("=");if(d[0]==N)return unescape(d[1]);}
	return "";
};

//设置cookie
this.setAdCookie = function(N,V,Q,D){
	var L=new Date();
	var z=new Date(L.getTime()+Q*60000);
    var tmpdomain = "";
	if(typeof(D)!="undefined"){if(D){tmpdomain="domain=sina.com.cn;";}}
	document.cookie=N+"="+escape(V)+";path=/;"+tmpdomain+"expires="+z.toGMTString()+";";
};

//日期判断函数
this.compareDate = function(type,d){
  try{
        var dateArr = d.split("-");
        var checkDate = new Date();
        checkDate.setFullYear(dateArr[0], dateArr[1]-1, dateArr[2]);
		var now = new Date();
        var nowTime = now.getTime();
		var checkTime = checkDate.getTime();
		if(type=="after"){          
		  if(nowTime >= checkTime){return true;}
		  else{return false;}
		}		
        else if(type=="before"){
          if(nowTime <= checkTime){return true;}
		  else{return false;}
		}
  }catch(e){return false;}
}

//获取时间对象
this.strToDateFormat = function(str,ext){
	var arys = new Array();
	arys = str.split('-');
	var newDate = new Date(arys[0],arys[1]-1,arys[2],arys[3],0,0);
	if(ext){newDate = new Date(newDate.getTime()+1000*60*60*24);}
	return newDate;
 }

//时间区间检查
this.checkTime = function(begin,end){
  var td = new Date();
  var flag = (td>=pthis.strToDateFormat(begin,false) && td<pthis.strToDateFormat(end,begin==end?true:false))?true:false;
  return flag;
}

//外部事件加载
this.addEvent = function(obj,event,func){
  var MSIE=navigator.userAgent.indexOf("MSIE");
  var OPER=navigator.userAgent.indexOf("Opera");
  if(document.all && MSIE!=-1 && OPER==-1){
    obj.attachEvent("on"+event,func);
  }else{
    obj.addEventListener(event,func,false);
  }
};

//PNG透明函数
this.correctPNG = function(){ 
    var arVersion = navigator.appVersion.split("MSIE");
    var vs = parseFloat(arVersion[1]);
    if ((vs >= 5.5) && (document.body.filters)){ 
       for(var j=0; j<document.images.length; j++){ 
          var img = document.images[j];
          var imgName = img.src.toUpperCase(); 
          if (imgName.substring(imgName.length-3, imgName.length) == "PNG"){ 
             var imgID = (img.id) ? "id='" + img.id + "' " : "";
             var imgClass = (img.className) ? "class='" + img.className + "' " : "";
             var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
             var imgStyle = "display:inline-block;" + img.style.cssText;
             if (img.align == "left"){imgStyle = "float:left;" + imgStyle}
             if (img.align == "right"){imgStyle = "float:right;" + imgStyle}
             if (img.parentElement.href){imgStyle = "cursor:hand;" + imgStyle}
             var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>";
             img.outerHTML = strNewHTML;
             j = j-1;
          } 
       } 
    }     
};

//容器对象
this.initWrap = function(mod,id,v,w,h,po,l,r,t,b,z,m,p,bg,dsp){
  var lst='';
  if(mod == 0x01){lst += 'pthis.'+v+' = document.createElement("'+id+'");';}
  else if(mod == 0x02){lst += 'pthis.'+v+' = document.getElementById("'+id+'");';}
  else return;
  if(v!="" && mod == 0x01){lst+=v+'.id = "'+v+'";';}
  if(w!=""){lst+=v+'.style.width = '+w+' + "px";';}
  if(h!=""){lst+=v+'.style.height = '+h+' + "px";';}
  if(po!=""){
	  lst+=v+'.style.position = "'+po+'";';

      if(l!=""){lst+=v+'.style.left = '+l+' + "px";';}
      else if(l=="" && r!=""){lst+=v+'.style.right = '+r+' + "px";';}
	  if(t!=""){lst+=v+'.style.top = '+t+' + "px";';}
      else if(t=="" && b!=""){lst+=v+'.style.bottom = '+b+' + "px";';}
	  if(z!=""){lst+=v+'.style.zIndex = "'+z+'";';}
  }
  if(bg!=""){lst+=v+'.style.background = "'+bg+'";';}
  if(m!=""){lst+=v+'.style.margin = "'+m+'";';}
  if(p!=""){lst+=v+'.style.padding = "'+p+'";';}
  if(dsp!=""){lst+=v+'.style.display = "'+dsp+'";';}
  return lst;
};

//素材对象
this.initObj = function(id,s,u,w,h){
  var lst = s.substring(s.length-3).toLowerCase();
  switch(lst){
	 case "tml":
	 case "htm":
	 case "php":var to = document.createElement("iframe");
                     to.id=id;
	                 to.width=w;
	                 to.height=h;
                     to.src=s;
                     to.frameBorder = 0;
					 to.allowTransparency = "true";
                     to.scrolling = "no";
                     to.marginheight = 0;
                     to.marginwidth = 0;
					 break;
	 case "swf": var to = document.createElement("div");
					 var fo = new sinaFlash( s, id, w, h, "7", "", false, "High");
	                 fo.addParam("wmode", "transparent");
	                 fo.addParam("allowScriptAccess", "always");
	                 fo.addParam("menu", "false");
	                 fo.write(to);
				     break;
     case "jpg":
     case "gif":
	 case "png":if(u!=""){
		             var to = document.createElement("a");
					 to.href = u;
					 to.target = "_blank";
					 var io = new Image();
	                 io.id = id;
					 io.style.width = w+"px";
					 io.style.height = h+"px";
					 io.style.border = "none";
					 io.src = s;
					 to.appendChild(io);
				}else{
				     var to = new Image();
	                 to.id = id;
					 to.style.width = w+"px";
					 to.style.height = h+"px";
					 to.style.border = "none";
					 to.style.cursor = "pointer";
					 to.src = s;	 
				}
				     break;
	     default:var to = document.createElement("a");
		             to.id = id;
					 to.href = u;
					 to.target = "_blank";
                     to.innerText = s;
  }
  return to;
};

//-------------------------------
};
/* http://d2.sina.com.cn/d1images/common/SinaDotTop.js begin */
/*
RotatorAD V3.8 2009-10-22
Author: Dakular <shuhu@staff.sina.com.cn>
格式: new RotatorAD(商业广告数组, 非商业广告数组, 层id)
说明: 第一次访问随机出现，以后访问顺序轮播；自动过滤过期广告；cookie时间24小时；商业广告数量不足时，从非商业广告中补充
	  限制最少轮播数量，广告少于限制数时，才从垫底里补充，否则不补垫底
*/
if(typeof(RotatorAD)!='function'){
var RotatorAD = function(rad,nad,div_id){

var date = new Date();
var id = 0;
var max = 99;
var url = document.location.href;
var cookiename = 'SinaRot'+escape(url.substr(url.indexOf('/',7),2)+url.substring(url.lastIndexOf('/')));
var timeout = 1440; //24h
var w = rad.width;
var h = rad.height;
var bnum = rad.num;
var num = rad.num;
var num2 = rad.num2;
var marginType = (typeof(rad.mtype)=="undefined")?0:rad.mtype;
var ary = new Array();
//过滤无效商广
for(var i=0; i<rad.length; i++){
	var start = strToDate(rad[i][2].replace('<startdate>','').replace('</startdate>',''));
	var end = strToDate(rad[i][3].replace('<enddate>','').replace('</enddate>',''),true);
	if(date>start && date<end){
		ary.push([rad[i][0], rad[i][1], rad[i][4], rad[i][5]?rad[i][5]:'0']);
	}
}
//过滤无效垫底
var vnad = new Array();
for(var i=0; i<nad.length; i++){
	if(nad[i][2]==null){
		vnad.push([nad[i][0], nad[i][1], '', '0']);
	}else{
		var start = strToDate(nad[i][2].replace('<startdate>','').replace('</startdate>',''));
		var end = strToDate(nad[i][3].replace('<enddate>','').replace('</enddate>',''),true);
		if(date>start && date<end){
			vnad.push([nad[i][0], nad[i][1], '', '0']);
		}
	}
}
//补位
var nn = 0;
if(vnad.length>0 && (num2==null || ary.length<num2)){
	for(var i=0; i<(num2==null?rad.num:num2); i++){
		if(i>ary.length-1){
			ary.push([vnad[nn][0], vnad[nn][1], '', '0']);
			if(++nn > nad.length-1) nn = 0;
		}
	}
}
//num = ary.length<num?ary.length:num;
//排序(同步有序号的广告)
ary.sort(function(x,y){return x[3]-y[3];});
//取id
if(typeof(globalRotatorId)=='undefined' || globalRotatorId==null || isNaN(globalRotatorId)){
	curId = G(cookiename);

	curId = curId==""?Math.floor(Math.random()*max):++curId;
	if(curId>max || curId==null || isNaN(curId)) curId=0;
	S(cookiename,curId,timeout);
	globalRotatorId = curId;
}
id=globalRotatorId%num;

//Show AD
if(ary.length==0) return; //如果没有广告则不显示
var n = id;

try{
  if(typeof(ary[n][0])=="undefined" || ary[n][0]=="") return;
  var type = ary[n][0].substring(ary[n][0].length-3).toLowerCase();
  var od = document.getElementById(div_id);
  if(od && marginType==1){od.style.marginTop = 8 + "px";}
  if(od && marginType==2){od.style.marginBottom = 8 + "px";}
  if(od && marginType==3){od.style.marginTop = 8 + "px";od.style.marginBottom = 8 + "px";}
}catch(e){return;}

if(type=='swf'){
var of = new sinaFlash(ary[n][0], div_id+'_swf', w, h, "7", "", false, "High");
of.addParam("wmode", "opaque");
of.addParam("allowScriptAccess", "always");
of.addVariable("adlink", escape(ary[n][1]));
if(ary[n][2]!="" && ary[n][2]!=null){of.addVariable("_did", ary[n][2]);}
of.write(div_id);
}else if(type=='jpg' || type=='gif'){
if(ary[n][2]!="" && ary[n][2]!=null){
  od.innerHTML = '<a href="'+ary[n][1]+'" target="_blank" onclick="try{_S_acTrack('+ary[n][2]+');}catch(e){}"><img src="'+ary[n][0]+'" border="0" width="'+w+'" height="'+h+'" /></a>';
}else{
  od.innerHTML = '<a href="'+ary[n][1]+'" target="_blank"><img src="'+ary[n][0]+'" border="0" width="'+w+'" height="'+h+'" /></a>';
}
}else if(type=='htm' || type=='tml'){
od.innerHTML = '<iframe id="ifm_'+div_id+'" frameborder="0" scrolling="no" width="'+w+'" height="'+h+'"></iframe>';
document.getElementById('ifm_'+div_id).src = ary[n][0];
}else if(type=='.js'){ //js
document.write('<script language="javascript" type="text/javascript" src="'+ary[n][0]+'"></scr'+'ipt>');
}else{ //textlink
    if(ary[n][2]!="" && ary[n][2]!=null){
  document.write('<a href="'+ary[n][1]+'" onclick="try{_S_acTrack('+ary[n][2]+');}catch(e){}"  target="_blank">'+ary[n][0]+'</a>');
    }else{
  document.write('<a href="'+ary[n][1]+'"  target="_blank">'+ary[n][0]+'</a>');
}
}

function G(N){
	var c=document.cookie.split("; ");
	for(var i=0;i<c.length;i++){
		var d=c[i].split("=");
		if(d[0]==N)return unescape(d[1]);
	}return '';
};
function S(N,V,Q){
	var L=new Date();
	var z=new Date(L.getTime()+Q*60000);
	document.cookie=N+"="+escape(V)+";path=/;expires="+z.toGMTString()+";";
};
function strToDate(str,ext){
	var arys = new Array();
	arys = str.split('-');
	var newDate = new Date(arys[0],arys[1]-1,arys[2],9,0,0);
	if(ext){
		newDate = new Date(newDate.getTime()+1000*60*60*24);
	}
	return newDate;
}

}
}

//分时通栏标志
(function(){
  var pthis=this;this.compareDate = function (a,b){try{var n = new Date().getHours();if(n >= a && n < b){return true;}else{return false;}}catch(e){return false;}};
  try{window.timer_0915 = this.compareDate(9,15);}catch(e){}
  try{window.timer_1524 = this.compareDate(15,24);}catch(e){}
})();

/*********************************/

/*

轮播背投类 RotatorPB v3.1
Update by Dakular <shuhu@staff.sina.com.cn> 2008-8-25
格式：new RotatorPB(广告数组)
说明：第一次访问随机出现，以后访问顺序轮播；自动过滤过期广告；cookie时间24小时；商业广告数量不足时不显示
*/
if(typeof(RotatorPB)!='function'){
	var RotatorPB=function (rad){
		this.ary = new Array();
		this.date = new Date();
		this.w = rad.width;
		this.h = rad.height;
		this.num = rad.num;
		this.o = rad.length;
		this.id = RotatorPB.id++;
		this.m = 'rpb_'+this.id;
		this.n = new Array();
		this.L = new Date();
		this.e = 0;
		var f;
		var D = false;
		var nn = 0;
		//过滤无效广告
		for(var i=0; i<rad.length; i++){
			var start = RotatorPB.strToDate(rad[i][2].replace('<startdate>','').replace('</startdate>',''));
			var end = RotatorPB.strToDate(rad[i][3].replace('<enddate>','').replace('</enddate>',''),true);
			if(this.date>start && this.date<end && (this.num==null || this.ary.length<this.num) ){
				this.ary.push([rad[i][0], rad[i][1], rad[i][4]]);
			}
		}
		this.o = this.ary.length;
		//取id
		for(var i=0;i<this.o;i++){
			f=this.m+'_'+(i+1);
			g=RotatorPB.G(f);
			if(g!=''){
				this.n[i]=g;
				D=true;
			}else {
				this.n[i]=0;
			}
		}
		if(!D){
			var r=Math.ceil(Math.random()*this.o);
			var t=this.m+'_'+r;
			RotatorPB.S(t,this.L.getTime(),1440);
			this.e=r;
			if(this.o==1){RotatorPB.S('s_dl',r,1440);}
			//return r;
		}else {
			var R=this.n.join(',').split(',');
			var k=R.sort();
			var max=Number(k[k.length-1]);
			var min=Number(k[0]);
			var F;
			for(var i=0;i<this.n.length;i++){
				if(max==this.n[i]){
					F=i+1;
					break;
				}
			}
			if(typeof(F)!='undefined'){
				G=this.m+'_'+F;
				H=Number(RotatorPB.G(G));
				I=F%this.o+1;
				J=this.m+'_'+I;
				RotatorPB.S(J,this.L.getTime(),1440);
				if(this.o==1){
					I=-RotatorPB.G('s_dl');
					if(I==0){I=1;RotatorPB.S('s_dl',1,1440);}
					RotatorPB.S('s_dl',I,1440);
				}
				this.e=I;
				//return I;
			}
		}
		//Show AD
		if(this.e==0 || this.ary.length==0) return; //如果没有广告则不显示
		if(this.e==-1) return; //当只有一个广告时：始终显示第一个/奇数次刷新显示
		var n = this.e-1;
		var btsrc = this.ary[n][0];
		var bturl = this.ary[n][1];
		var bttype = btsrc.substring(btsrc.length-3).toLowerCase();
		if(bttype=='.js'){ //js
			document.write('<script language="javascript" type="text/javascript" src="'+btsrc+'"></scr'+'ipt>'); return;
		}else if(bttype!='htm' && bttype!='tml'){
			sinabturl = "http://d1.sina.com.cn/d1images/pb/pbv4.html?"+bturl+"${}"+bttype+"${}"+btsrc;
		}else{
			sinabturl = btsrc;
		}
		try{
			aryADSeq.push("openWindowBack()");
		}catch(e){
			openWindowBack();
		}
		if(this.ary[n][2]!=""){ //监测计数
			var oImg = new Image();
			oImg.src = this.ary[n][2];
		}
	};
	RotatorPB.id=1;
	RotatorPB.G=function (N){
		var c=document.cookie.split("; ");
		for(var i=0;i<c.length;i++){
			var d=c[i].split("=");
			if(d[0]==N)return unescape(d[1]);
		}return '';
	};
	RotatorPB.S=function (N,V,Q){
		var L=new Date();
		var z=new Date(L.getTime()+Q*60000);
		document.cookie=N+"="+escape(V)+"; path=/; expires="+z.toGMTString()+";";
	};
	RotatorPB.strToDate = function(str,ext){
		var arys = new Array();
		arys = str.split('-');
		var newDate = new Date(arys[0],arys[1]-1,arys[2],9,0,0);
		if(ext){
			newDate = new Date(newDate.getTime()+1000*60*60*24);
		}
		return newDate;
	}
	var openWindowBack = function(){
		var popUpWin2 = open(sinabturl, (window.name!="popUpWin2")?"popUpWin2":"", "width=1,height=1,top=4000,left=3000");
	}
};

/*********************************/

/*赞助生成工具*/
try{if(typeof(SinaDotColumnBarCreativeClass)!="function"){var SinaDotColumnBarCreativeClass=function(o){if(typeof(o)!="undefined"&&o!=""){var pthis=this;this.$=function(id){if(document.getElementById){return eval('document.getElementById("'+id+'")')}else{return eval("document.all."+id)}};this.initWrap=function(mod,id,v,w,h,po,l,r,t,b,z,m,p,bg,dsp){var lst="";if(mod==1){lst+="var "+v+' = document.createElement("'+id+'");'}else{if(mod==2){lst+="var "+v+' = document.getElementById("'+id+'");'}else{return}}if(v!=""){lst+=v+'.id = "'+v+'";'}if(w!=""){lst+=v+".style.width = "+w+' + "px";'}if(h!=""){lst+=v+".style.height = "+h+' + "px";'}if(po!=""){lst+=v+'.style.position = "'+po+'";';if(l!=""){lst+=v+".style.left = "+l+' + "px";'}else{if(l==""||r!=""){lst+=v+".style.right = "+r+' + "px";'}}if(t!=""){lst+=v+".style.top = "+t+' + "px";'}else{if(t==""||b!=""){lst+=v+".style.bottom = "+b+' + "px";'}}if(z!=""){lst+=v+'.style.zIndex = "'+z+'";'}}if(bg!=""){lst+=v+'.style.background = "'+bg+'";'}if(m!=""){lst+=v+'.style.margin = "'+m+'";'}if(p!=""){lst+=v+'.style.padding = "'+p+'";'}if(dsp!=""){lst+=v+'.style.display = "'+dsp+'";'}return lst};this.initObj=function(id,s,u,w,h){var lst=s.substring(s.length-3).toLowerCase();switch(lst){case"tml":case"htm":var to=document.createElement("iframe");to.id=id;to.style.width=w+"px";to.style.height=h+"px";to.src=s;to.frameBorder=0;to.scrolling="no";to.marginheight=0;to.marginwidth=0;break;case"swf":var to=document.createElement("div");var fo=new sinaFlash(s,id,w,h,"7","",false,"High");fo.addParam("wmode","transparent");fo.addParam("allowScriptAccess","always");fo.addParam("menu","false");fo.write(to);break;case"jpg":case"gif":case"png":if(u!=""){var to=document.createElement("a");to.href=u;to.target="_blank";var io=new Image();io.id=id;io.style.width=w+"px";io.style.height=h+"px";io.style.border="none";io.src=s;to.appendChild(io)}else{var to=new Image();to.id=id;to.style.width=w+"px";to.style.height=h+"px";to.style.border="none";to.style.cursor="pointer";to.src=s}break;default:var to=document.createElement("a");to.id=id;to.href=u;to.target="_blank";to.innerText=s}return to};this.getAdCookie=function(N){var c=document.cookie.split("; ");for(var i=0;i<c.length;i++){var d=c[i].split("=");if(d[0]==N){return unescape(d[1])}}return""};this.setAdCookie=function(N,V,Q){var L=new Date();var z=new Date(L.getTime()+Q*60000);document.cookie=N+"="+escape(V)+";path=/;expires="+z.toGMTString()+";"};this.addEvent=function(obj,event,func){var MSIE=navigator.userAgent.indexOf("MSIE");var OPER=navigator.userAgent.indexOf("Opera");if(document.all&&MSIE!=-1&&OPER==-1){obj.attachEvent("on"+event,func)}else{obj.addEventListener(event,func,false)}};var btimer;var showTag=false;var bo=pthis.$("SinaDotColumnBarCreativeTmpWrap_"+o.id);bo=bo.parentNode;bo.style.position="relative";eval(pthis.initWrap(1,"div","b_"+o.id,o.b.w,o.b.h,"absolute",o.b.p[0],o.b.p[1],o.b.p[2],o.b.p[3],o.b.z,0,0,"","block"));eval("pthis.bWrap = b_"+o.id+"");var bObj=pthis.initObj("bo_"+o.id,o.b.s,o.b.u,o.b.w,o.b.h);pthis.bWrap.appendChild(bObj);bo.appendChild(pthis.bWrap);pthis.eWrap=document.createElement("div");pthis.eWrap.innerHTML="";pthis.showE=function(){var apthis=pthis;clearTimeout(btimer);apthis.eWrap.innerHTML="";if(o.e.s!=""){eval(pthis.initWrap(1,"div","e_"+o.id,o.e.w,o.e.h,"absolute",o.e.p[0],o.e.p[1],o.e.p[2],o.e.p[3],o.e.z,0,0,"","none"));eval("apthis.eWrap = e_"+o.id+"");var eObj=pthis.initObj("eo_"+o.id,o.e.s,o.e.u,o.e.w,o.e.h);apthis.eWrap.appendChild(eObj);bo.appendChild(apthis.eWrap);apthis.eWrap.style.display="block";if(o.c.w!=""||o.c.h!=""){eval(pthis.initWrap(1,"div","c_"+o.id,o.c.w,o.c.h,"absolute",o.c.p[0],o.c.p[1],o.c.p[2],o.c.p[3],o.c.z,0,0,o.c.b,"block"));eval("apthis.cWrap = c_"+o.id+"");apthis.cWrap.onclick=function(){apthis.eWrap.style.display="none";showTag=false};apthis.cWrap.style.background=(o.c.b=="")?"url(http://d1.sina.com.cn/shh/SinaDotColumnBarCreativeTool/spc.gif) repeat":o.c.b;apthis.cWrap.innerHTML=o.c.inn;apthis.cWrap.style.textAlign="center";apthis.cWrap.style.overFlow="hidden";apthis.cWrap.style.cursor="pointer";apthis.cWrap.style.color=o.c.c;apthis.eWrap.appendChild(apthis.cWrap)}if(o.e.t!=""){btimer=setTimeout(function(){apthis.eWrap.style.display="none";showTag=false},o.e.t)}if(o.e.tr!=""){var tro=new Image();tro.src=o.e.tr+"&"+Math.random()}if(o.o.ahd){apthis.eWrap.onmouseover=function(){apthis.eWrap.style.display="block"};pthis.bWrap.onmouseout=function(){apthis.eWrap.style.display="none";showTag=false};apthis.eWrap.onmouseout=function(){apthis.eWrap.style.display="none";showTag=false}}}};var currTimes=1;var clcExt=typeof(o.o.cle)=="undefined"?0:o.o.cle;pthis.bWrap.onmouseover=function(){if(!showTag){showTag=true;if(clcExt==0){var tmpeip=true;try{if(typeof(o.o.eip)!="undefined"&&typeof(o.o.eti)!="undefined"){if(o.o.eip!=""&&!isNaN(o.o.eip)){var tmpeti=(o.o.eti=="")?1440:eval(o.o.eti*60);var cepcookie=pthis.getAdCookie("ceCookie"+o.id);cepcookie=(cepcookie==""||cepcookie=="undefined")?0:cepcookie;cepcookie++;pthis.setAdCookie("ceCookie"+o.id,cepcookie,tmpeti);if(cepcookie>o.o.eip){tmpeip=false}}}}catch(e){}if(tmpeip){if(o.o.enm!=""&&!isNaN(o.o.enm)){if(currTimes<=o.o.enm){pthis.showE();++currTimes}}else{pthis.showE()}}}}};pthis.bWrap.onclick=function(){if(clcExt==1){var tmpeip=true;try{if(typeof(o.o.eip)!="undefined"&&typeof(o.o.eti)!="undefined"){if(o.o.eip!=""&&!isNaN(o.o.eip)){var tmpeti=(o.o.eti=="")?1440:eval(o.o.eti*60);var cepcookie=pthis.getAdCookie("ceCookie"+o.id);cepcookie=(cepcookie==""||cepcookie=="undefined")?0:cepcookie;cepcookie++;pthis.setAdCookie("ceCookie"+o.id,cepcookie,tmpeti);if(cepcookie>o.o.eip){tmpeip=false}}}}catch(e){}if(tmpeip){if(o.o.enm!=""&&!isNaN(o.o.enm)){if(currTimes<=o.o.enm){pthis.showE();++currTimes}}else{pthis.showE()}}}};if(o.o.anm!=""&&!isNaN(o.o.anm)){var cbpcookie=pthis.getAdCookie("cbCookie"+o.id);cbpcookie=(cbpcookie==""||cbpcookie=="undefined")?1:cbpcookie;setTimeout(function(){if(cbpcookie<=o.o.anm){pthis.showE();++cbpcookie;pthis.setAdCookie("cbCookie"+o.id,cbpcookie,1440)}},o.o.adl)}else{if(o.o.anm=="auto"&&isNaN(o.o.anm)){setTimeout(function(){pthis.showE()},o.o.adl)}else{}}}}}}catch(e){};


/******** Sales dept. end ********/


