//装载函数
var LoadId=setInterval(AniMate,20);
var LoadPos=0;
var LoadDir=2;
var LoadLen=0;
function AniMate(){
var elem=document.getElementById('Progress');
if(elem != null){
if(LoadPos==0) LoadLen+=LoadDir;
if(LoadLen>32 || LoadPos>79) LoadPos+=LoadDir;
if(LoadPos>79) LoadLen -= LoadDir;
if(LoadPos>79 && LoadLen==0) LoadPos=0;
elem.style.left=LoadPos;
elem.style.width=LoadLen;
}
}
function Loading(){
this.clearInterval(LoadId);
var TargeLem=document.getElementById('LoadBox');
TargeLem.style.display='none';
TargeLem.style.visibility='hidden';
}
//Cookies函数
function ReadCookie(obj){
var mycookie=unescape(document.cookie);
value="";
var Str=mycookie.indexOf(obj+"=");
if(Str!=-1){
return true;
}else{
return false;
}
}
function WriteCooike(obj){
var exp=new Date();
var TempValue;
if(ReadCookie(obj)==true){
document.getElementById(obj).style.display="block";
document.getElementById(obj+"_").src="/Images/Icon/01.gif";
exp.setTime(exp.getTime()-1);
document.cookie=obj+"=true;expires="+exp.toGMTString();
}else{
document.getElementById(obj).style.display="none";
document.getElementById(obj+"_").src="/Images/Icon/02.gif";
exp.setTime(exp.getTime()+365*24*60*60);
document.cookie=obj+"=true;expires="+exp.toGMTString();
}
}
function LoadCookie(){
var TempArr=document.cookie.split(";");
for(var i=0;i<TempArr.length;i++){
if(document.getElementById(TempArr[i].substring(0,TempArr[i].indexOf("=")).replace(" ",""))!=null){
document.getElementById(TempArr[i].substring(0,TempArr[i].indexOf("=")).replace(" ","")).style.display="none";
document.getElementById(TempArr[i].substring(0,TempArr[i].indexOf("=")).replace(" ","")+"_").src="/Images/Icon/02.gif";
}
}
}
//搜索函数
function onChangeForm(){
if(FormSearch.Options.value==0)
FormSearch.action="/Baby/Search.php";
if(FormSearch.Options.value==1)
FormSearch.action="/Blog/Search.php";
if(FormSearch.Options.value==2)
FormSearch.action="/Album/Search.php";
if(FormSearch.Options.value==3)
FormSearch.action="/Video/Search.php";
if(FormSearch.Options.value==4)
FormSearch.action="/Ring/Search.php";
if(FormSearch.Options.value==5)
FormSearch.action="/Ring/SearchBBS.php";
if(FormSearch.Options.value==6)
FormSearch.action="/Know/Search.php";
return true;
}
//折叠函数
function Pucker(obj){
if(document.getElementById(obj).style.display=="none"){
document.getElementById(obj).style.display="block";
document.getElementById(obj+"_").src="/Images/ICO/28.gif";
}else{
document.getElementById(obj).style.display="none";
document.getElementById(obj+"_").src="/Images/ICO/27.gif";
}
}
//复制函数
function CopyInBoard(Url){
window.clipboardData.setData('Text',Url);
alert('您已将本内容地址复制成功！\n接下来您只需要在适当的区域鼠标右键粘帖即可将本内容分享给您的好友。');
}
//滑动门函数
function MainCell(n,Hash){
nc=document.getElementsByName("MainNavce");
if(nc){
t=document.getElementsByName("Main")
for(i=0;inc.length;i++){
nc.item(i).className="Main-Off";
t.item(i).className="Main-Hide";
}
nc.item(n-1).className="Main-On";
t.item(n-1).className="Main-TB Main-Show";
}else if(MainNavce){
for(i=0;i<MainNavce.length;i++){
MainNavce[i].className="Main-Off";
Main[i].className="Main-Hide";
}
MainNavce[n-1].className="Main-On";
Main[n-1].className="Main-TB Main-Show";
}
if(Hash){
document.location="#"+Hash;
}
}
//菜单效果
function High(Which){
theobject=Which;theobject.filters.alpha.opacity=0
Highlighting=setInterval("HighLightit(theobject)",80)
}
function Low(Which){
clearInterval(Highlighting)
Which.filters.alpha.opacity=100;
}
function HighLightit(Cur){
if(Cur.filters.alpha.opacity100)
Cur.filters.alpha.opacity+=15
else if(window.Highting)
clearInterval(Highlighting)
}