home *** CD-ROM | disk | FTP | other *** search
- var chosenAlt = -1;
-
- var moduleData = new ActiveXObject("Microsoft.XMLDOM");
- moduleData.load("data/tips.xml");
- var moduleRoot = moduleData.documentElement;
-
- function showPage() {
- buildPage();
- parent.goPage = 'tips.html';
- AppScreen.style.visibility = "visible";
- }
-
- function buildPage() {
- styleRule = '<?xml version="1.0"?>';
- styleRule += '<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">';
- styleRule += '<xsl:template match="/">';
- styleRule += '<xsl:apply-templates select="tips/text">';
- styleRule += '<xsl:template>';
- styleRule += '<xsl:copy>';
- styleRule += '<xsl:apply-templates select="@* | * | comment() | pi() | text()"/>';
- styleRule += '</xsl:copy>';
- styleRule += '</xsl:template>';
- styleRule += '</xsl:apply-templates>';
- styleRule += '</xsl:template>';
- styleRule += '</xsl:stylesheet>';
-
- style = new ActiveXObject("Microsoft.XMLDOM");
- style.loadXML(styleRule);
-
- TextArea.innerHTML = moduleData.transformNode(style);
-
- optieWriteString = '';
- for (var i=0; i<moduleRoot.selectNodes("optie").length; i++) {
- optieWriteString += '<div id="AltBtn" title="' + moduleRoot.selectNodes("optie")[i].selectSingleNode("text").text + '" url="' + moduleRoot.selectNodes("optie")[i].getAttribute("url") + '" num="' + i + '" style="top:'+ (i*21) +'px">';
- optieWriteString += '<div id="AltText">' + moduleRoot.selectNodes("optie")[i].selectSingleNode("text").text + '</div>';
- optieWriteString += '</div>';
- }
- OptieArea.innerHTML = optieWriteString;
- }
-
- function buildContents() {
- styleRule = '<?xml version="1.0"?>';
- styleRule += '<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">';
- styleRule += '<xsl:template match="/">';
- styleRule += '<xsl:apply-templates select="//optie['+chosenAlt+']/layout">';
- styleRule += '<xsl:template>';
- styleRule += '<xsl:copy>';
- styleRule += '<xsl:apply-templates select="@* | * | comment() | pi() | text()"/>';
- styleRule += '</xsl:copy>';
- styleRule += '</xsl:template>';
- styleRule += '</xsl:apply-templates>';
- styleRule += '</xsl:template>';
- styleRule += '</xsl:stylesheet>';
-
- style = new ActiveXObject("Microsoft.XMLDOM");
- style.loadXML(styleRule);
-
- FbkArea.innerHTML = '<p style="color:#ffffff; text-decoration:underline">' + moduleRoot.selectSingleNode("//optie[" + chosenAlt + "]/text").text + '</p>' + moduleData.transformNode(style);
- }