document.onselectstart=new Function("return false;")
document.ondragstart=new Function("return false;")
var upm;
var downm;
var leftm;
var rightm;
st=0;
function bu(){
if(event.button==4)
alert("Not support.")
}
function langth(){
a=window.document.body.clientHeight/main.scrollHeight;
b=(window.document.body.clientHeight-scru.style.pixelHeight-scrd.style.pixelHeight)*a;
c=window.document.body.clientWidth/main.scrollWidth;
d=(window.document.body.clientWidth-scrlH.style.pixelWidth-scrrH.style.pixelWidth)*c;
if (a>=1){
scrb.style.display="none";
main.style.pixelTop=0
fk.style.display="none";
main1.style.pixelWidth=window.document.body.clientWidth;
}
else {
scrb.style.display="block";
}
if(c>=1){
scrbH.style.display="none";
main.style.pixelLeft=0
fk.style.display="none";
main1.style.pixelHeight=window.document.body.clientHeight;
}
else{
scrbH.style.display="block";
}
if(a<1&&c>=1){
scrb.style.pixelHeight=window.document.body.clientHeight;
scr.style.pixelHeight=b;
a1=(scrb.style.pixelHeight-scru.style.pixelHeight-scrd.style.pixelHeight)/main.scrollHeight;
scr.style.pixelTop=scru.style.pixelHeight-main.style.pixelTop*a1;
main1.style.pixelWidth=window.document.body.clientWidth-scrb.style.pixelWidth;
if (scr.style.pixelTop>window.document.body.clientHeight-scrd.style.pixelHeight-scr.style.pixelHeight){
scr.style.pixelTop=window.document.body.clientHeight-scrd.style.pixelHeight-scr.style.pixelHeight;
main.style.pixelTop=-main.scrollHeight+window.document.body.clientHeight;
}
}
if(a>=1&&c<1){
scrbH.style.pixelWidth=window.document.body.clientWidth;
scrH.style.pixelWidth=d;
c1=(scrbH.style.pixelWidth-scrlH.style.pixelWidth-scrrH.style.pixelWidth)/main.scrollWidth;
scrH.style.pixelLeft=scrlH.style.pixelWidth-main.style.pixelLeft*c1;
main1.style.pixelHeight=window.document.body.clientHeight-scrbH.style.pixelHeight-1;
if (scrH.style.pixelLeft>scrbH.style.pixelWidth-scrrH.style.pixelWidth-scrH.style.pixelWidth){
scrH.style.pixelLeft=scrbH.style.pixelWidth-scrrH.style.pixelWidth-scrH.style.pixelWidth;
main.style.pixelLeft=-main.scrollWidth+window.document.body.clientWidth;
}
}
if(a<1&&c<1){
scrb.style.pixelHeight=window.document.body.clientHeight-scrrH.style.pixelHeight;
a=scrb.style.pixelHeight/main.scrollHeight;
b=(scrb.style.pixelHeight-scru.style.pixelHeight-scrd.style.pixelHeight)*a;
scr.style.pixelHeight=b;
a1=(scrb.style.pixelHeight-scru.style.pixelHeight-scrd.style.pixelHeight)/main.scrollHeight;
scr.style.pixelTop=scru.style.pixelHeight-main.style.pixelTop*a1;
main1.style.pixelWidth=window.document.body.clientWidth-scrb.style.pixelWidth;
scrbH.style.pixelWidth=main1.style.pixelWidth;
c=scrbH.style.pixelWidth/main.scrollWidth;
d=(scrbH.style.pixelWidth-scrlH.style.pixelWidth-scrrH.style.pixelWidth)*c;
scrH.style.pixelWidth=d;
c1=(scrbH.style.pixelWidth-scrlH.style.pixelWidth-scrrH.style.pixelWidth)/main.scrollWidth;
scrH.style.pixelLeft=scrlH.style.pixelWidth-main.style.pixelLeft*c1;
main1.style.pixelHeight=window.document.body.clientHeight-scrbH.style.pixelHeight-1;
fk.style.display="block";
if (scrH.style.pixelLeft>scrbH.style.pixelWidth-scrrH.style.pixelWidth-scrH.style.pixelWidth){
scrH.style.pixelLeft=scrbH.style.pixelWidth-scrrH.style.pixelWidth-scrH.style.pixelWidth;
main.style.pixelLeft=-main.scrollWidth+scrbH.style.pixelWidth
}
if (scr.style.pixelTop>scrb.style.pixelHeight-scrd.style.pixelHeight-scr.style.pixelHeight){
scr.style.pixelTop=scrb.style.pixelHeight-scrd.style.pixelHeight-scr.style.pixelHeight;
main.style.pixelTop=-main.scrollHeight+scrb.style.pixelHeight;
}
}
}
function find(){
y=event.clientY-scr.style.pixelTop;
st=1}
function findH(){
x=event.clientX-scrH.style.pixelLeft;
st=2}
function scrollit(){
if (st==1){
y1=event.clientY-y;
if (y1<=scru.style.pixelHeight){
scr.style.pixelTop=scru.style.pixelHeight;
main.style.pixelTop=0;
}
else if (y1>=scrb.style.pixelHeight-scrd.style.pixelHeight-scr.style.pixelHeight){
scr.style.pixelTop=scrb.style.pixelHeight-scrd.style.pixelHeight-scr.style.pixelHeight;
main.style.pixelTop=-main.scrollHeight+scrb.style.pixelHeight;
}
else{
scr.style.pixelTop=y1;
bb=y1/a;
main.style.pixelTop=-bb;
}
}
if (st==2){
x1=event.clientX-x;
if (x1<=scrlH.style.pixelWidth){
scrH.style.pixelLeft=scrlH.style.pixelWidth;
main.style.pixelLeft=0;
}
else if (x1>=scrbH.style.pixelWidth-scrrH.style.pixelWidth-scrH.style.pixelWidth){
scrH.style.pixelLeft=scrbH.style.pixelWidth-scrrH.style.pixelWidth-scrH.style.pixelWidth;
main.style.pixelLeft=-main.scrollWidth+scrbH.style.pixelWidth;
}
else{
scrH.style.pixelLeft=x1;
dd=(scrH.style.pixelLeft-scrlH.style.pixelWidth)/c1;
main.style.pixelLeft=-dd;
}
}
}
function upmain(){
if(scr.style.pixelTop>scru.style.pixelHeight&&main.style.pixelTop<0){
main.style.pixelTop+=(4/a1);
scr.style.pixelTop-=4;
}
else{
main.style.pixelTop=0;
scr.style.pixelTop=scru.style.pixelHeight;
}
}
function downmain(){
lan=scrb.style.pixelHeight-scrd.style.pixelHeight-scr.style.pixelHeight;
lan1=-main.scrollHeight+scrb.style.pixelHeight;
if(scr.style.pixelTop<lan&&main.style.pixelTop>lan1){
main.style.pixelTop-=(4/a1);
scr.style.pixelTop+=4;
}
else{
main.style.pixelTop=lan1;
scr.style.pixelTop=lan;
}
}
function leftmain(){
if(scrH.style.pixelLeft>scrlH.style.pixelWidth&&main.style.pixelLeft<0){
main.style.pixelLeft+=(7/c1);
scrH.style.pixelLeft-=7;
}
else{
main.style.pixelLeft=0;
scrH.style.pixelLeft=scrlH.style.pixelWidth;
}
}
function rightmain(){
lanH=scrbH.style.pixelWidth-scrrH.style.pixelWidth-scrH.style.pixelWidth;
lan1H=-main.scrollWidth+scrbH.style.pixelWidth;
if(scrH.style.pixelLeft<lanH&&main.style.pixelLeft>lan1H){
main.style.pixelLeft-=(7/c1);
scrH.style.pixelLeft+=7;
}
else{
main.style.pixelLeft=lan1H;
scrH.style.pixelLeft=lanH;
}
}
function scrollitfa(){
p=event.clientY;
if(st==0){
h=scrb.style.pixelHeight-scrd.style.pixelHeight-scr.style.pixelHeight;
go()
}
}
function go(){
if(p>scru.style.pixelHeight+10&&p<h-5){
scr.style.pixelTop=p-5;
main.style.pixelTop=-(p-scru.style.pixelHeight-5)/a1;
}
else if(p>scru.style.pixelHeight+10&&p>h-5&&p<scrb.style.pixelHeight-scrd.style.pixelHeight){
scr.style.pixelTop=h;
main.style.pixelTop=-main.scrollHeight+scrb.style.pixelHeight;
}
else if(p<scru.style.pixelHeight+10&&p>scru.style.pixelHeight){
scr.style.pixelTop=scru.style.pixelHeight;
main.style.pixelTop=0;
}
}
function scrollitfaH(){
pH=event.clientX;
if(st==0){
hH=scrbH.style.pixelWidth-scrrH.style.pixelWidth-scrH.style.pixelWidth;
goH()
}
}
function goH(){
if(pH-scrlH.style.pixelWidth>10&&pH<hH-5){
scrH.style.pixelLeft=pH-5;
main.style.pixelLeft=-(pH-scrlH.style.pixelWidth-5)/c1;
}
else if(pH-scrlH.style.pixelWidth>10&&pH>hH-5&&pH<scrbH.style.pixelWidth-scrrH.style.pixelWidth){
scrH.style.pixelLeft=hH;
main.style.pixelLeft=-main.scrollWidth+scrbH.style.pixelWidth;
}
else if(pH-scrlH.style.pixelWidth<10&&pH-scrlH.style.pixelWidth>0){
scrH.style.pixelLeft=scrlH.style.pixelWidth;
main.style.pixelLeft=0;
}
}
