/* // Chrome/Firefox/MSIE/Opera function get_browser() { var N=navigator.appName, ua=navigator.userAgent, tem; var M=ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1]; M=M? [M[1], M[2]]: [N, navigator.appVersion, '-?']; return M[0]; } function get_browser_version() { var N=navigator.appName, ua=navigator.userAgent, tem; var M=ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1]; M=M? [M[1], M[2]]: [N, navigator.appVersion, '-?']; return M[1]; } */ // Chrome/Firefox/MSIE/Opera function get_browser() { s = GetBrowser(); s = s.split(' '); return s[0]; } function get_version() { s = GetBrowser(); s = s.split(' '); return s[1]; } function GetBrowser() { var ua= navigator.userAgent, tem, M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; if(/trident/i.test(M[1])){ tem= /\brv[ :]+(\d+)/g.exec(ua) || []; return 'MSIE '+(tem[1] || ''); } if(M[1]=== 'Chrome'){ tem= ua.match(/\bOPR\/(\d+)/) if(tem!= null) return 'Opera '+tem[1]; } M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?']; if((tem= ua.match(/version\/(\d+)/i))!= null) M.splice(1, 1, tem[1]); return M.join(' '); } function GetOS() { var OSName="unknown"; if( navigator.appVersion.indexOf("Win")!=-1 ) OSName="Windows"; if( navigator.appVersion.indexOf("X11")!=-1 ) OSName="UNIX"; if( navigator.appVersion.indexOf("Linux")!=-1 ) OSName="Linux"; if( navigator.appVersion.indexOf("Mac")!=-1 ) OSName="MacOS"; if( navigator.userAgent.match(/Android/i) ) OSName="Android"; if( navigator.userAgent.match(/iPhone|iPad|iPod/i) ) OSName="iOS"; return OSName; } function GetFileName(file) { i0 = file.lastIndexOf('/'); i1 = file.lastIndexOf('\\'); if( i0>i1 ) i1=i0; if( i1==-1) i1=0; i1++; i2 = file.lastIndexOf('.'); name = file.substring(i1,i2) || file; return name; } function GetFileExt(file) { var ext = file.substring(file.lastIndexOf('.')); return ext; } function ShortBtn() { var x,y,s; x = $(window).width()-400; y = 20; //$("#short_div").popup("option", "arrow", "l,t,r,b"); $("#short_div").popup("open",{ arrow:true, x:x, y:y }); var browser = get_browser(); var os = GetOS(); if( os=="iOS" ) { s="Add to home screen:\n"; s+="
    "; s+="
  1. Click the Share button  .
  2. "; s+="
  3. Select Add to Home Screen.
  4. "; s+="
"; } else if( os=="Android" ) { s="Add to home screen:\n"; s+="
    "; s+="
  1. Click the Settings button  .
  2. "; s+="
  3. Click the Star button  .
  4. "; s+="
  5. Select Add shortcut to home screen.
  6. "; s+="
"; } else if( browser=='Chrome' ) { s="Add to taskbar:\n"; s+="
    "; s+="
  1. Click the Chrome menu .
  2. "; s+="
  3. Click More Tools.
  4. "; s+="
  5. Add the page:
  6. "; s+="
  7. Check Open as window.
  8. "; s+="
"; } else if( browser=='Firefox' ) { s="Add to desktop:\n"; s+="Drag the address bar icon to the desktop."; } $("#short_div").html(s); }