// // init all variables with the class givin $(document).ready(function() { // debug ("init"); $(".GUIwindow").each( function (i) { gWindowDragElement(this); }); }); // // function gAddEventListener (id, eventname, callback) { var obj = document.getElementById(id); if (obj) obj.addEventListener(eventname, callback); }; // // get the text between Text1 and Text2 function getTextBetween(fulltext, text1, text2) { var end1 = text1.length; var start2 = fulltext.length-text2.length; if (end1 < start2) { return fulltext.substr(text1.length, start2-end1); } else return ""; };