﻿function $a(id,tag){var re=(id&&typeof id!="string")?id:document.getElementById(id);if(!tag){return re;}else{return re.getElementsByTagName(tag);}};function tabs(head,con){var ids=head.split('/');var hx=$a(ids[0],ids[1]);var cons=con.split('/');var uls=$a(cons[0],cons[1]);for(var i=0;i<hx.length;i++){hx[i].temp=i;hx[i].old=hx[i].className.replace("on","");alert(typeof(uls[i])+"||"+hx[i]);if(typeof(uls[i])!="undefined"&&typeof(hx[i])!="undefined"){uls[i].old=uls[i].className.replace("show","");hx[i]["onmouseover"]=function(){go_to(this.temp);}}};function go_to(prsv){for(var i=0;i<hx.length;i++){hx[i].className=hx[i].old;uls[i].className=uls[i].old;}hx[prsv].className+=" on";uls[prsv].className+=" show"}};function addImg(url){var img=new Image();img.src=url;return img;}function HtmlMove(id,tag,path,rate,upbt,downbt,pgtime,lis){var mous=false,o=$a(id);o.onmouseover=function(){mous=true;};o.onmouseout=function(){mous=false;};var fg=tag.split('/'),as=$a(o,fg[1]),fx=(path=="scrollRight"||path=="scrollLeft")?"scrollLeft":"scrollTop";var ow=fx=="scrollTop"?as[0].offsetHeight:as[0].offsetWidth,pw=fx=="scrollTop"?o.offsetHeight:o.offsetWidth;var pgli=lis||Math.floor((pw+ow/2)/ow),pg=Math.floor((as.length+(pgli-1))/pgli),pgmx=ow*pgli,now=0,mx,d;var os=$a(o,fg[0])[0];os.innerHTML+=os.innerHTML;d=setInterval(function(){go_to((path=="scrollTop"||path=="scrollLeft")?true:false);},pgtime);if(upbt){var ups=$a(upbt),uimg=addImg(ups.src),uimg1=addImg(ups.src.replace(/(.*)(\.\w{3})/,"$1_$2"));ups.onmouseover=function(){this.src=uimg1.src;};ups.onmouseout=function(){this.src=uimg.src;};$a(upbt).onmousedown=function(){clearInterval(d);go_to(true);d=setInterval(function(){go_to(true);},pgtime);}}if(downbt){var down=$a(downbt),dimg=addImg(down.src),dimg1=addImg(down.src.replace(/(.*)(\.\w{3})/,"$1_$2"));down.onmouseover=function(){this.src=dimg1.src;};down.onmouseout=function(){this.src=dimg.src;};down.onmousedown=function(){clearInterval(d);go_to(false);d=setInterval(function(){go_to(false);},pgtime);}}function go_to(fxs){if(mous){return;};var ex;if(fxs){if(now<pg){now++;}else{now=1;o[fx]=0;}mx=now*pgmx;ex=setInterval(function(){(o[fx]+rate<mx)?(o[fx]+=rate):o[fx]=mx;if(o[fx]==mx){clearInterval(ex);}},10);}else{if(now>0){now--;}else{now=pg-1;o[fx]=pg*pgmx;}mx=now*pgmx;ex=setInterval(function(){(o[fx]-rate>mx)?(o[fx]-=rate):o[fx]=mx;if(o[fx]==mx){clearInterval(ex);}},10);}}};function startmarquee(lh,speed,delay,index){var t;var p=false;var o=document.getElementById("scroll"+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);};
