var mapp_o={}; mapp_o.r_session=""; mapp_o.TEST_REAL="real"; mapp_o.iframe=null; mapp_o.userAgent=window.navigator.userAgent.toLowerCase(); mapp_o.isAndroid=/\bandroid\b/.test(mapp_o.userAgent); mapp_o.isIphone=/like mac os x/.test(mapp_o.userAgent) && /\biphone\b/.test(mapp_o.userAgent); mapp_o.isIpad=/like mac os x/.test(mapp_o.userAgent) && /\bipad\b/.test(mapp_o.userAgent); mapp_o.isIOS=mapp_o.isIphone || mapp_o.isIpad; mapp_o.view=function(win_url, win_attr){ if((mapp_o.TEST_REAL=="real" && mapp_o.r_session!="dmookviewer") || (!mapp_o.isAndroid && !mapp_o.isIphone)){ mapp_o.opwin(win_url, win_attr); return; } if(mapp_o.iframe==null){ var iframe = document.createElement('iframe'); iframe.style.position = 'absolute'; iframe.style.left = '-300px'; iframe.style.left = '0px'; iframe.style.height = '1px'; iframe.style.width = '1px'; document.body.appendChild(iframe); mapp_o.iframe=iframe; } mapp_o.iframe.contentWindow.location=win_url; } mapp_o.opwin=function(win_url, win_attr){ if(!win_attr){ var w = window.screen.availWidth; var h = window.screen.availHeight; win_attr = "width=" + w + ",height=" + h; } var bFull=false if(window.navigator.userAgent.indexOf("MSIE")>0){ var nS = window.navigator.userAgent.indexOf("MSIE") + 5; var nE = window.navigator.userAgent.indexOf(";", nS); var ver = eval(window.navigator.userAgent.substring(nS,nE)); if(ver>=7.0) bFull = true; } var win; if(bFull) win = window.open(win_url,"", "scrollbars=yes,scrolling=yes,resizable=yes"); else win = window.open(win_url,"",win_attr + ',left=0,top=0,scrollbars=yes,scrolling=yes,menubar=no,resizable=yes'); try{win.focus();}catch(e){} }