var imgObj; var sBaseCmd = "toolbar=no,location=no,status=no,menubar=no,resizable=no"; var bName = navigator.appName; nc = (bName == "Netscape") ? true : false; ie = (bName == "Microsoft Internet Explorer") ? true : false; var default_imgw = 427; var default_start = "R"; //L:left,R:right var iscookieEnabled = window.navigator.cookieEnabled; function setCookie( name, value, expiredays ) { var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; " + (expiredays?"; expires=" + todayDate.toGMTString():"") + ";"; } function getCookie( name, defval) { var nameOfCookie = name + "="; var x = 0; while ( x <= document.cookie.length ) { var y = (x+nameOfCookie.length); if ( document.cookie.substring( x, y ) == nameOfCookie ) { if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length; return unescape( document.cookie.substring( y, endOfCookie ) ); } x = document.cookie.indexOf( " ", x ) + 1; if ( x == 0 ) break; } return ""; } function showpicwin(strURL,linkURL,linkSite,winName,imgw,imgh,sx,sy,features) { var vPic; //alert(winName+'-'+sx); var Scrollbar="no"; var pre_w=0; if ((imgw != 0) && (imgh != 0)) { //ie if (iscookieEnabled) setCookie( sx, imgw , null); if (sx > 0 && iscookieEnabled) { pre_w=getCookie(sx-1,null); setCookie( sx, (parseInt(imgw)+parseInt(pre_w)+160) , null); } if (imgw >= screen.availWidth) {imgw = screen.availWidth; Scrollbar = "yes";} if (imgh >= screen.availHeight) {imgh = screen.availHeight; Scrollbar = "yes";} if (Scrollbar == "yes") Scrollbar += ",top=0,left=0"; else { if (pre_w && iscookieEnabled) {pre_w = parseInt(pre_w);} else {pre_w = default_imgw*sx;} if (default_start == "L") { if (pre_w > 0) sx = pre_w+10; if (sx > screen.availWidth-imgw) sx = sx-screen.availWidth; } else { if (pre_w > 0) { sx = screen.availWidth-parseInt(imgw)-parseInt(pre_w)-10; }else { sx = screen.availWidth-parseInt(imgw)-10; } // alert(sx); //if (sx == 0) sx=1; if (sx < 0) sx=screen.availWidth+sx; } if (sx) Scrollbar += ",left=" + (sx-60); else Scrollbar += ",left=" + (screen.availWidth-imgw)/2; if (sy) { Scrollbar += ",top=" + sy; } else { Scrollbar += ",top=" + ((screen.availHeight-imgh)/2-140); } } var features = ",scrollbars=" + Scrollbar + ",width=" + imgw + ",height=" + imgh //alert (features); } //else showpicwin(strURL,linkURL,linkSite,winName,sx,sy,",scrollbars=no"); //nc vPic = window.open("",winName, sBaseCmd + features); vPic.opener = self; vPic.document.writeln (""); vPic.document.writeln ("¬¡°Ê°T®§"); vPic.document.writeln (""); vPic.document.writeln (""); vPic.document.write ("CLOSE"); vPic.document.writeln ("
Close
"); vPic.document.write (""); vPic.document.close(); vPic.focus(); return false; } function popwin() { showpicwin('img/12acd214e68106643dcdb7176d752ce2.gif','http://www.miramargarden.com.tw/news-into03.php?n_id=133','_blank','pop_0','350','300','0'); showpicwin('img/2d52c2727f709a4ced33b3f34d48fce7.gif','http://www.miramargarden.com.tw/news-into02.php?n_id=162','_blank','pop_1','350','300','1'); } onload=popwin();