﻿//---------------------------------------------------------------
function favorite(){
	var str='<a href="#" onclick="javascript:copyToClipBoard()">推荐给好友</a> | '
	str=str+'<a href="#" onclick="javascript:window.external.AddFavorite(location.href+\'#sc\',\'★\'+document.title)">收藏本页</a> | '
	str=str+'<a href="#" onclick="javascript:window.open(\'http://shuqian.qq.com/post?from=3&amp;title=\'+encodeURIComponent(document.title)+\'&amp;uri=\'+encodeURIComponent(document.location.href)+\'&amp;jumpback=2&amp;noui=1\',\'favit\',\'width=700,height=480,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes\');void(0)" target="_self">收藏到QQ书签</a> | '
	str=str+'<a href="#" onclick="javascript:window.open(\'http://cang.baidu.com/do/add?it=\'+encodeURIComponent(document.title.substring(0,76))+\'&amp;iu=\'+encodeURIComponent(location.href)+\'&amp;fr=ien#nw=1\',\'_blank\',\'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes\');void(0)" target="_self">收藏到百度书签</a> | '
	str=str+'<a href="#" onclick="javascript:window.open(\'http://www.google.com/bookmarks/mark?op=add&bkmk=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title),\'_blank\',\'scrollbars=no,width=680,height=450,left=75,top=20,status=no,resizable=yes\');void(0)" target="_self">收藏到GOOGLE书签</a> '
	document.write(str)
}
//---------------------------------------------------------------
function copyToClipBoard(){
var clipBoardContent="";
clipBoardContent+=document.title;
clipBoardContent+="\r\n";
clipBoardContent+=document.location;
window.clipboardData.setData("Text",clipBoardContent);
alert("复制成功，请粘贴到你的QQ/MSN上推荐给你的好友");
}
//---------------------------------------------------------------
function GETOBJ(OBJID){if(document.getElementById && document.getElementById(OBJID)){return document.getElementById(OBJID);}else if(document.all && document.all(OBJID)){return document.all(OBJID);}else if(document.layers && document.layers[OBJID]){return document.layers[OBJID];}else{return false;}}
//---------------------------------------------------------------
function flash_show(file,width,height,marginleft,margintop,style){var obj;if (style==1){obj='<embed src="'+file+'"; quality="high" wmode="transparent" style="width:'+width+'px;height:'+height+'px; position:absolute;margin-left:'+marginleft+'px;margin-top:'+margintop+'px;"></embed>';}else if(style==2){obj='<object id="flash_obj" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+file+'" /><param name="quality" value="high" /><param name="wmode" value="opaque" /><embed src="'+file+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed></object>';}document.write(obj);}
//---------------------------------------------------------------
function DivShow(j,n)
{
	var obj;
	var i=1;
	for (i=1;i<=n;i++)
	{
		obj=GETOBJ("lan"+i);
		obj.className="";
		obj=GETOBJ("index"+i);
		obj.style.display="none";
	}
	obj=GETOBJ("lan"+j);
	obj.className="on";
	obj=GETOBJ("index"+j);
	obj.style.display="block";
}
//---------------------------------------------------------------
function startmarquee(obj,lh,speed,delay,index)
{
var t;
var p=false;
var o=document.getElementById(obj+index);
o.innerHTML+=o.innerHTML;
o.onmouseover=function(){p=true}
o.onmouseout=function(){p=false}
o.scrollTop = 0;
function start(){
t=setInterval(scrolling,speed);
if(!p) o.scrollTop += 2;
}
function scrolling(){
if(o.scrollTop%lh!=0){
o.scrollTop += 2;
if(o.scrollTop>=o.scrollHeight/2) o.scrollTop = 0;
}else{
clearInterval(t);
setTimeout(start,delay);
}
}
setTimeout(start,delay);
}
