aboutsummaryrefslogtreecommitdiff
path: root/id/oa/src/main/webapp/js/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'id/oa/src/main/webapp/js/common.js')
-rw-r--r--id/oa/src/main/webapp/js/common.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/id/oa/src/main/webapp/js/common.js b/id/oa/src/main/webapp/js/common.js
new file mode 100644
index 000000000..59b7b4e0e
--- /dev/null
+++ b/id/oa/src/main/webapp/js/common.js
@@ -0,0 +1,32 @@
+function gup(name) {
+ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
+ var regexS = "[\\?&]"+name+"=([^&#]*)";
+ var regex = new RegExp( regexS );
+ var results = regex.exec( window.location.href );
+ if( results == null )
+ return "";
+ else
+ return results[1];
+}
+function jumpToAnker() {
+ var jump = gup("jump");
+ if (jump != "") {
+ location.hash="#"+jump;
+ }
+}
+function PVP2LoginIframe(url) {
+ var el = document.getElementById("demonstrator_leftcontent");
+
+ var iframe = document.createElement("iframe");
+ iframe.setAttribute("src", url);
+ iframe.setAttribute("width", "240");
+ iframe.setAttribute("height", "220");
+ iframe.setAttribute("frameborder", "0");
+ iframe.setAttribute("scrolling", "no");
+ iframe.setAttribute("title", "Login");
+
+ var button = document.getElementById("submitbutton");
+ button.parentNode.removeChild(button);
+
+ el.appendChild(iframe, el);
+}