static void openTvdb(WebDriver driver, String linkText) throws IOException {
		// Remove old temp files
		for (File f : BULLZIP_DIR.listFiles()) {
			if (f.isFile()) {
				f.delete();
			}
		}

		Properties loginProps = new Properties();
		loginProps.load(Utils.class.getResourceAsStream("login.properties"));

		driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
//		Dimension winSize = driver.manage().window().getSize();
//		Dimension newWinSize = new Dimension(1700, winSize.height);
//		driver.manage().window().setSize(newWinSize);

		// Don't know why, but document.write seems to hang
		// ((JavascriptExecutor)driver).executeScript(
		// "document.write('<p>нT{ Bullzip printer X|w]
		// "+output_dir.getPath().replace('\\',
		// '/')+"/&lt;time&gt;.pdf<br>" +
		// "T{ЫHU link }lUU:<br>" +
		// "<a
		// href=\"http://www.tvedb.yuntech.edu.tw/tvedb/index/index.asp\">Ų򥻸ƪ</a>');"
		// +
		// "document.close();");

		if (linkText == null) {
			driver.get("http://140.125.243.18/");
		} else {
			((JavascriptExecutor) driver).executeScript("var p = document.createElement('p');"
					+ "p.innerHTML= 'нT{  Bullzip printer X|w] " + BULLZIP_DIR.getPath().replace('\\', '/')
					+ "/&lt;time&gt;.pdf<br>" + "T{ЫHU link }lUU:<br>';" + "var a = document.createElement('a');"
					+ "a.setAttribute('href', 'http://140.125.243.18/');"
					+ "a.innerHTML = '" + linkText + "';" + "p.appendChild(a);"
					+ "document.getElementsByTagName('body')[0].appendChild(p);");

			// Pop-ups cause subsequent call to WebDriver throwing exception
			// ((JavascriptExecutor)driver).executeScript(
			// "confirm('нT{ Bullzip printer X|w]
			// ["+output_dir.getPath().replace('\\',
			// '/')+"]<time>.pdf');");
			// ((JavascriptExecutor)driver).executeScript(
			// "document.location.href='http://www.tvedb.yuntech.edu.tw/tvedb/index/index.asp';");

			// Wait for the user clicking the link
//			(new WebDriverWait(driver, 100000000)).until(new ExpectedCondition<Boolean>() {
//
//				public Boolean apply(WebDriver drv) {
//					return drv.getCurrentUrl().equals("http://140.125.243.18");
//				}
//
//			});
		}

//		driver.findElement(By.linkText("ޱMհ|")).click();

		// handle IE SSL certificate error
		if (driver instanceof InternetExplorerDriver && !driver.findElements(By.id("overridelink")).isEmpty()) {
			driver.navigate().to("javascript:document.getElementById('overridelink').click()");
		}
		
		WebElement username;
		
		// wait for VPN login page
		driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS);
		(new WebDriverWait(driver, 10)).until(new ExpectedCondition<Boolean>() {
			public Boolean apply(WebDriver d) {
				if (d.getCurrentUrl().contains("welcome.cgi")) {
					return true;
				} else {
					return false;
				}
			}
		});
		driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

		// input VPN auth info
		username = driver.findElement(By.name("username"));
		username.sendKeys(loginProps.getProperty("tvedb.vpn.login"));
		driver.findElement(By.name("password")).sendKeys(loginProps.getProperty("tvedb.vpn.password"));
		username.submit();

		driver.findElement(By.linkText("ޱMհ|հȰ򥻸Ʈw")).click();
//		driver.findElement(By.linkText("login")).click();

		// wait for system login page
		driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS);
		(new WebDriverWait(driver, 10)).until(new ExpectedCondition<Boolean>() {
			public Boolean apply(WebDriver d) {
				if (d.getCurrentUrl().contains("login_school.htm")) {
					return true;
				} else {
					return false;
				}
			}
		});
		driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

		// login system
		username = driver.findElement(By.name("user_id"));
		username.sendKeys(loginProps.getProperty("tvedb.web.login"));
		driver.findElement(By.name("user_pwd")).sendKeys(loginProps.getProperty("tvedb.web.password"));
		username.submit();
	}