<html lang="">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<title>PowerCam Outline</title>
<script>
function init()
{
if (navigator.appName.indexOf("Explore") < 0)
{
document.getElementById("title").innerHTML = "<center><p>Only IE browser is supported to play PowerCam raw format '.fs'!</center>";
return;
}
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.load("project.fsp");
var nd = xmlDoc.documentElement.selectSingleNode("abstract");
document.title = makehtml(nd.selectSingleNode("title").text);
var _author = makehtml(nd.selectSingleNode("author").text);
nd = xmlDoc.documentElement.selectSingleNode("index");
t = nd.attributes.getNamedItem("type");
if (t != null) indexType = t.nodeValue;
t = cInt(getms(nd.attributes.getNamedItem("duration").nodeValue));
if (_author != "") _author = _author + ", ";
document.getElementById("title").innerHTML = document.title + " <span style='font-size:10px; font-weight:normal;'>(" + _author + getstr(t) + ")</span>";
var html = "";
var i, l1 = 0, l2 = 0;
for (i=0; i<nd.childNodes.length; i++)
{
var title = makehtml(nd.childNodes[i].selectSingleNode("title").text);
var css = "";
if (title.indexOf("...") == 0)
{
l2 ++;
css = " style='padding:0px 0px 0px 20px'";
title = l1 + "." + l2 + " " + title.substr(3);
}
else
{
l1 ++;
l2 = 0;
title = l1 + ". " + title;
}
var url = "index.html?slide=" + (i+1);
html += "<div " + css + "><a href='javascript:m_openfs(\"" + url + "\")' rel='nofollow' onclick='return false;'>" + title + "</a></div>";
}
document.getElementById("outline").innerHTML = html;
}
function m_openfs(url)
{
var width = screen.width;
var height = screen.height;
var left=0, top=0;
if ((width == 1024 && height == 768) || (width == 1280 && height == 1024))
{
window.open(url, null, "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top + ", menubar=no, resizable=yes, status=yes, titlebar=no, toolbar=no");
return;
}
// 50px: powercam inner title, 80px IE url and status bar height
width = screen.availWidth - 10; //1024
height = Math.floor(((screen.availWidth - 270)/4)*3) + 50;
if (height + 80 > screen.availHeight) //wide screen PC
{
height = screen.availHeight - 80;
width = Math.floor(((height - 50)*4)/3) + 270;
left = (screen.width - width) / 2;
}
window.open(url, null, "width=" + width + ", height=" + height + ", left=" + left + ", top=0, menubar=no, resizable=yes, status=yes, titlebar=no, toolbar=no");
}
function makehtml(text)
{
var html = text.replace(/&/,"&");
html = html.replace(/</,"<");
html = html.replace(/>/,">");
html = html.replace(/\r\n/,"<br>");
html = html.replace(/\n/,"<br>");
html = html.replace(/\r/,"<br>");
return(html);
}
function getms(timet)
{
var t = timet.split(":");
if (t.length == 3)
time1 = cInt(t[0]) * 3600000 + cInt(t[1]) * 60000 + cInt(t[2]*1000);
else
time1 = cInt(t[0]) * 60000 + cInt(t[1]*1000);
return time1;
}
function getstr(sec)
{
sec = sec / 1000;
var hh = cInt(sec / 3600);
var mm = cInt((sec - hh * 3600) / 60);
var ss = cInt(sec % 60);
if (mm < 10) mm = "0" + mm;
if (ss < 10) ss = "0" + ss;
if (hh == 0) return mm + ":" + ss;
else return hh + ":" + mm + ":" + ss;
}
function cInt(value) { return (value == "" || value == "undefined") ? 0 : parseInt(value, 10); }
</script>
<style>
body {padding:10px 10px 10px 10px; letter-spacing:2px; font-size:12px; line-height:20px}
#title {font-size:15px; font-weight:bold;}
#outline {padding:10px 0px 20px 0px; border-top:1px solid #ccc;}
#copyright {padding:10px 0px 0px 0px; font-size:10px;}
A:link {text-decoration: none}
A:visited {color:#66f; text-decoration: none}
A:hover {color:red; text-decoration: underline}
</style>
</head>
<body onload="init();">
<div id=title></div>
<div id=outline></div>
<div><input type=button onclick='m_openfs("index.html?slide=1")' value='read'></div>
<div id=copyright>Created with <a href='http://www.powercam.com.tw' rel='nofollow' onclick='return false;'>PowerCam</a>, FormosaSoft Corp.</div>
<noscript>PowerCam Player only support js enabled browser.</noscript>
</body>
</html>