Merge branch 'qml' of ssh://drop.maemo.org/git/mdictionary into qml
[mdictionary] / www / scripts / javascripts.js
diff --git a/www/scripts/javascripts.js b/www/scripts/javascripts.js
new file mode 100644 (file)
index 0000000..db82503
--- /dev/null
@@ -0,0 +1,32 @@
+<!--
+
+/* test function for this javascript module */
+function test_function()
+{
+       alert("javascripts.js module test function!");
+}
+
+/* called onLoad web page - initialize all data in javascript */
+function init_javascript()
+{
+
+}
+
+/* to show/hide answer in faq and user guide pages */
+function faq_switcher(el)
+{
+       var answer = el.parentNode.getElementsByTagName("div")[1];
+       /* it is not always DIV that we want - lets check if it is a answer class */
+
+       if("none" == answer.style.display ||
+          "" == answer.style.display) {
+               answer.style.display = "block";
+               el.style.backgroundImage = "url(styles/images/switcher-minus.png)";
+       }
+       else {
+               answer.style.display = "none";
+               el.style.backgroundImage = "url(styles/images/switcher.png)";
+       }
+}
+
+//-->
\ No newline at end of file