/* normal action */ var iw; var ih; var message; function onload_func(){ screenwidth = document.getElementById("t1menu").clientWidth; var bw = (onesmc == true) ? bmwidth : bmwidth*2; var contw = oriwidth*2 + 12 + bw; iw = oriwidth; ih = oriheight; if(contw > screenwidth){ contw = screenwidth - 12 - bw; iw = Math.floor(contw/2); ih = iw * oriheight / oriwidth; } if(onesmc == true) setDivPos(); else setDivPos2(); set_link(); if(!document.getElementById("divmessage")) alert("There is no divmessage!"); message = document.getElementById("divmessage"); } function resizeCont() { var tw = document.getElementById("t1menu").clientWidth; if(tw != screenwidth){ screenwidth = tw; onload_func(); } } function setDivPos(){ document.getElementById("b2imgright").style.width = iw+"px"; document.getElementById("b2imgright").style.height = ih+"px"; document.getElementById("b2pixright").style.width = iw+"px"; document.getElementById("b2pixright").style.height = ih+"px"; if(document.getElementById("b2pageshow")){ // mskin002 document.getElementById("b2pageshow").style.width = (iw+bmwidth+3)+"px"; } document.getElementById("b2container").style.width = (iw+bmwidth+3)+"px"; document.getElementById("b2container").style.height = (ih+2)+"px"; if(document.getElementById("b2enright")){ document.getElementById("b2enright").style.marginTop = (ih-14)+"px"; document.getElementById("b2enright").style.marginLeft = (iw-15)+"px"; } if(document.getElementById("prevbtn")){ document.getElementById("prevbtn").style.marginTop = "-"+(ih/2+43)+"px"; } if(document.getElementById("nextbtn")){ document.getElementById("nextbtn").style.marginTop = "-"+(ih/2+43)+"px"; } } function setDivPos2(){ document.getElementById("b2imgleft").style.width = iw+"px"; document.getElementById("b2imgleft").style.height = ih+"px"; document.getElementById("b2imgright").style.width = iw+"px"; document.getElementById("b2imgright").style.height = ih+"px"; document.getElementById("b2pixleft").style.width = iw+"px"; document.getElementById("b2pixleft").style.height = ih+"px"; document.getElementById("b2pixright").style.width = iw+"px"; document.getElementById("b2pixright").style.height = ih+"px"; if(document.getElementById("b2pageshow")){ // mskin002 document.getElementById("b2pageshow").style.width = (iw*2+bmwidth*2+3)+"px"; } document.getElementById("b2lkleft").style.marginLeft = (bmwidth+1)+"px"; document.getElementById("b2lkright").style.marginLeft = (bmwidth+iw+1)+"px"; document.getElementById("b2container").style.width = (iw*2+bmwidth*2+3)+"px"; //47+1(margin)+1(line) document.getElementById("b2container").style.height = (ih+2)+"px"; if(document.getElementById("b2enleft")){ document.getElementById("b2enleft").style.marginTop = (ih-14)+"px"; document.getElementById("b2enleft").style.marginLeft = bmwidth+"px"; } if(document.getElementById("b2enright")){ document.getElementById("b2enright").style.marginTop = (ih-14)+"px"; document.getElementById("b2enright").style.marginLeft = (iw*2+bmwidth-15)+"px"; } if(document.getElementById("prevbtn")){ document.getElementById("prevbtn").style.marginTop = "-"+(ih/2+43)+"px"; } if(document.getElementById("nextbtn")){ document.getElementById("nextbtn").style.marginTop = "-"+(ih/2+43)+"px"; } } var evt; document.onmousemove = function(e){ if(!e) e = event; evt = e; } window.addEventListener("resize", resizeCont);