Advertisement
DEATHMETALGORE

My Header

Nov 6th, 2013
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 23.54 KB | None | 0 0
  1.  
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb">
  4. <head>
  5.     <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  6.     <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9" />
  7.     <meta name="description" content="" />
  8.     <meta name="keywords" content="" />
  9.     <meta name="copyright" content="2000, 2002, 2005, 2007 phpBB Group" />
  10.    
  11.    
  12.     <title>EL-RP &bull; Forum</title>
  13.    
  14.     <link href="./styles/we_clearblue/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
  15.     <link href="./style.php?id=2&amp;lang=en" rel="stylesheet" type="text/css" media="screen, projection" />
  16.     <link rel="icon" href="./images/favicon.png" type="image/x-icon">
  17.    
  18.    
  19.     <!--
  20.         phpBB style name: we_clearblue
  21.         Based on style:   prosilver (this is the default phpBB3 style)
  22.         Original author:  Tom Beddard (http://www.subBlue.com/)
  23.         Modified by:      weeb (http://weeb.pl)
  24.  
  25.         NOTE: This page was generated by phpBB, the free open-source bulletin board package.
  26.               The phpBB Group is not responsible for the content of this page and forum. For more information
  27.               about phpBB please visit http://www.phpbb.com
  28.     -->
  29.  
  30.     <script type="text/javascript">
  31.     // <![CDATA[
  32.         var jump_page = 'Enter the page number you wish to go to:';
  33.         var on_page = '';
  34.         var per_page = '';
  35.         var base_url = '';
  36.         var style_cookie = 'phpBBstyle';
  37.         var style_cookie_settings = '; path=/';
  38.         var onload_functions = new Array();
  39.         var onunload_functions = new Array();
  40.  
  41.        
  42.  
  43.         /**
  44.         * Find a member
  45.         */
  46.         function find_username(url)
  47.         {
  48.             popup(url, 960, 570, '_usersearch');
  49.             return false;
  50.         }
  51.  
  52.         /**
  53.         * New function for handling multiple calls to window.onload and window.unload by pentapenguin
  54.         */
  55.         window.onload = function()
  56.         {
  57.             for (var i = 0; i < onload_functions.length; i++)
  58.             {
  59.                 eval(onload_functions[i]);
  60.             }
  61.         }
  62.  
  63.         window.onunload = function()
  64.         {
  65.             for (var i = 0; i < onunload_functions.length; i++)
  66.             {
  67.                 eval(onunload_functions[i]);
  68.             }
  69.         }
  70.  
  71.     // ]]>
  72.     </script>
  73.    
  74.     <script type="text/javascript" src="./styles/we_clearblue/template/forum_fn.js"></script>
  75.    
  76.     <!-- @todo: Add all code that needs to be executed in the header here -->
  77. <link href="./styles/we_clearblue/theme/jquery_base.css" rel="stylesheet" type="text/css" />
  78. <script src="./styles/we_clearblue/template/jquery-1.10.2.min.js" type="text/javascript"></script>
  79. <script src="./styles/we_clearblue/template/jquery_base/jquery-ui-1.8.9.custom.min.js" type="text/javascript"></script>
  80. <script src="./styles/we_clearblue/template/jquery_base/jquery.notify.min.js" type="text/javascript"></script>
  81.  
  82. <script type="text/javascript">
  83. // <![CDATA[
  84. /**
  85. * change this to the div you need for your style
  86. * if you don't know what it is, take a look at http://www.m-a-styles.de
  87. */
  88. var quickedit_div = '#post\%d div.content';
  89. var edited_by_div = '#post\%d div.notice';
  90.  
  91. /**
  92. * init vars - DO NOT CHANGE
  93. *
  94. */
  95. var popup_open = false;
  96. var cur_post_id = 0;
  97. var login_instance;
  98. var login_open = false;
  99. var new_pm_count = 0;
  100.  
  101. var logged_in = '1';
  102.  
  103. // Make sure we don't get issues with other MODs or libraries
  104. var pjb = jQuery.noConflict();
  105.  
  106. /**
  107. * init functions
  108. */
  109.  
  110. /**
  111. * functions that need to be executed after the page has finished loading
  112. */
  113.  
  114. pjb(document).ready(function(){
  115.    
  116.     // quickedit
  117.     pjb('.qe-icon a').click(function() {
  118.         post_id = pjb(this).attr('id');
  119.         post_id = post_id.replace(/quickedit/g, ''); // filter out the post ID
  120.  
  121.         // check if quick edit is already enabled
  122.         if(popup_open != true)
  123.         {
  124.             cur_location = pjb(location).attr('href');
  125.             data = 'mode=quickedit&qe_mode=init&post_id=' + post_id + '&location=' + location;
  126.             pjB_do_ajax('open', data, true);
  127.             popup_open = true;
  128.             cur_post_id = post_id;
  129.         }
  130.     });
  131.    
  132.     // mark forums read
  133.     pjb('li.rightside a.markread').click(function() {
  134.         if(popup_open != true)
  135.         {
  136.             cur_location = pjb(location).attr('href');
  137.             data = 'mode=markread_forums&location=' + location;
  138.             pjB_do_ajax('mark_read', data, true);
  139.             return false;
  140.         }
  141.     });
  142.    
  143.     // mark topics read
  144.     pjb('div.pagination a.markread').click(function() {
  145.         if(popup_open != true)
  146.         {
  147.             cur_location = pjb(location).attr('href');
  148.             data = 'mode=markread_topics&location=' + location;
  149.             pjB_do_ajax('mark_read', data, true);
  150.             return false;
  151.         }
  152.     });
  153.    
  154.     // Quickreply
  155.     pjb('#qr_editor_div .button1').click(function(event) {
  156.         if(popup_open != true)
  157.         {
  158.             event.preventDefault();
  159.             var data = 'mode=quickreply';
  160.             cur_location = pjb(location).attr('href');
  161.            
  162.             // get some more info, i.e. subject
  163.             data += '&subject=' + pjb('#qr_editor_div input#subject').val();
  164.             data += '&' + pjb('#qr_editor_div textarea.inputbox').serialize();
  165.             data += '&location=' + cur_location;
  166.  
  167.             var i = 1;
  168.             pjb('#qr_editor_div input:hidden').each(function() {
  169.                 data += '&reply_data' + i + '=' + pjb(this).attr('name') + '&reply_data_val' + i + '=' + pjb(this).val();
  170.                 i++;
  171.             });
  172.             pjB_do_ajax('quickreply', data, true);
  173.         }
  174.     });
  175.    
  176.    
  177.     // initialise jQuery UI notify widget
  178.     pjb("#pjb-container").notify();
  179.    
  180.    
  181.  
  182. });
  183.  
  184. /*
  185. * Onclick functions for BBCode buttons
  186. */
  187. function bind_quickedit_buttons()
  188. {
  189.     // somebody clicks on the bbcode buttons
  190.     pjb('#quickedit-buttons input').bind('click', function() {
  191.         cur_bbcode = pjb(this).attr('id');
  192.         cur_bbcode = cur_bbcode.replace(/bbcode/g, ''); // filter out unneeded parts
  193.        
  194.         // make sure we don't get javascript errors
  195.         if (cur_bbcode == parseInt(cur_bbcode))
  196.         {
  197.             qe_bbstyle(parseInt(cur_bbcode));
  198.         }
  199.     });
  200.    
  201.     // somebody uses the size dropdown box
  202.     pjb('select#addbbcode202').bind('change', function() {
  203.         var cur_size = pjb('select#addbbcode202 option:selected').val();
  204.         qe_bbfontstyle('[size=' + cur_size + ']', '[/size]');
  205.         pjb('select#addbbcode202 option')[2].attr('selected', 'selected');
  206.     });
  207.    
  208.     // click on "submit"
  209.     pjb('#submit_jqe').bind('click', function() {
  210.         if(quickedit_open == true)
  211.         {
  212.             content = pjb('textarea#jqe-message').serialize();
  213.             content = content.substring(8); // make sure we get rid of the 'message=' in front of the post text
  214.             cur_location = pjb(location).attr('href');
  215.             data = 'mode=quickedit&qe_mode=submit&post_id=' + post_id + '&contents=' + content + '&location=' + location;
  216.             pjB_do_ajax('submit', data, true);
  217.         }
  218.     });
  219.    
  220.     // click on "cancel"
  221.     pjb('#cancel_jqe').bind('click', function() {
  222.         if(quickedit_open == true)
  223.         {
  224.             pjb('textarea#jqe-message').val(''); // make sure the user can't see what was in the textbox after clicking cancel
  225.             cancel_edit(); // we don't need an ajax request since we just need to close the edit window
  226.             quickedit_open = false;
  227.         }
  228.     });
  229.    
  230.     // click on "advanced edit"
  231.     pjb('#adv_jqe').bind('mouseover', function() {
  232.         if(quickedit_open == true)
  233.         {
  234.             // get current url for forum_id if we have a global announcement
  235.             content = pjb('textarea#jqe-message').val();
  236.             pjb('input[name="message"]:hidden').val(content);
  237.         }
  238.     });
  239.    
  240.     // click on login
  241.     pjb('#pjb-login input.button1').bind('click', function() {
  242.         // get current url for forum_id if we have a global announcement
  243.         cur_location = pjb(location).attr('href');
  244.         user = pjb('#pjb-login #username').serialize();
  245.         password = pjb('#pjb-login #password').serialize();
  246.        
  247.         // hide login body
  248.         login_instance.close();
  249.        
  250.         var data = 'mode=login&' + user + '&' + password + '&location=' + location;
  251.         login_open = false;
  252.         pjB_do_ajax('login', data, true);
  253.     });
  254.  
  255.     // submit login "form" on hitting enter
  256.     var complete_body = pjb('body');
  257.     complete_body.keypress(function(e)
  258.     {
  259.         var code = null;
  260.         code = (e.keyCode) ? e.keyCode : e.which;
  261.         if (code == 13 && login_open)
  262.         {
  263.             pjb('#pjb-login input.button1').click();
  264.             e.preventDefault(); // don't care, just don't submit any forms ...
  265.         }
  266.     });
  267.  
  268. }
  269.  
  270. // open edit window
  271. function open_edit(success)
  272. {  
  273.     if(success['ERROR'])
  274.     {
  275.         for(i = 0; i < success['ERROR_COUNT']; i++)
  276.         {
  277.             pjB_output_info('', success['ERROR'][i], true);
  278.         }
  279.     }
  280.     else
  281.     {
  282.         pjb('#post' + cur_post_id + ' div.content').hide();
  283.         pjb('#post' + cur_post_id + ' div.notice').hide();
  284.         pjb('#post' + cur_post_id + ' dl.attachbox').hide();
  285.         pjb('#post' + cur_post_id).append(success['TPL_BODY']);
  286.         pjb('#pjB-qe-form').show('slow');
  287.         bind_quickedit_buttons();
  288.         quickedit_open = true;
  289.     }
  290. }
  291.  
  292. // submit edit
  293. function submit_edit(data)
  294. {
  295.     if(data['ERROR'])
  296.     {
  297.         for(i = 0; i < data['ERROR_COUNT']; i++)
  298.         {
  299.             pjB_output_info('', data['ERROR'][i], true);
  300.         }
  301.        
  302.         if(data['ERROR_ACTION'] == 'cancel')
  303.         {
  304.             cancel_edit();
  305.         }
  306.     }
  307.     else
  308.     {
  309.         pjb('#post' + cur_post_id + ' div.content').html(data['TEXT']);
  310.         pjb('#post' + cur_post_id + ' div.notice').html(data['EDITED_BY']);
  311.         pjb('#pjB-qe-form').hide('slow');
  312.         pjb('#pjB-qe-form').remove();
  313.         pjb('#post' + cur_post_id + ' div.content').show('slow');
  314.         pjb('#post' + cur_post_id + ' dl.attachbox').show('slow');
  315.         pjb('#post' + cur_post_id + ' div.notice').show('slow');
  316.        
  317.         pjB_output_info(data['SUCCESS_TITLE'], data['SUCCESS_MESSAGE'], true);
  318.        
  319.        
  320.         quickedit_open = false;
  321.         popup_open = false;
  322.     }
  323. }
  324.  
  325. // cancel quickedit
  326. function cancel_edit()
  327. {
  328.     pjb('#pjB-qe-form').hide('slow');
  329.     pjb('#pjB-qe-form').remove();
  330.     pjb('#post' + cur_post_id + ' div.content').show('slow');
  331.     pjb('#post' + cur_post_id + ' dl.attachbox').show('slow');
  332.     pjb('#post' + cur_post_id + ' div.notice').show('slow');
  333.     quickedit_open = false;
  334.     popup_open = false;
  335. }
  336.  
  337. // mark_read
  338. function mark_read(success)
  339. {
  340.     if(success['MARK_REDIRECT'])
  341.     {
  342.        
  343.         pjB_output_info(success['SUCCESS_TITLE'], success['SUCCESS_MESSAGE'], true);
  344.        
  345.         setTimeout (
  346.             'location.reload()',
  347.             1000 // 1 second until page reload
  348.         );
  349.     }
  350.     else
  351.     {
  352.         for(i = 0; i < success['ERROR_COUNT']; i++)
  353.         {
  354.             pjB_output_info('', success['ERROR'][i], true);
  355.         }
  356.     }
  357. }
  358.  
  359. /**
  360. * function quickreply
  361. * show the new post or an error message
  362. */
  363. function quickreply(success)
  364. {
  365.     if(success['ERROR_COUNT'])
  366.     {
  367.         for(i = 0; i < success['ERROR_COUNT']; i++)
  368.         {
  369.             pjB_output_info('', success['ERROR'][i], true);
  370.         }
  371.     }
  372.     else
  373.     {
  374.         // try to redirect to the last page where we should actually see the post
  375.         if (success['SUCCESS_REDIRECT'] == true)
  376.         {
  377.             var redirect_url = success['SUCCESS_REDIRECT_URL'].replace(/&amp;/g, '&');
  378.             setTimeout (
  379.                 'window.location="' + redirect_url + '";',
  380.                 1000 // 1 second until page reload
  381.             );
  382.         }
  383.         else
  384.         {
  385.             pjb('#pjb-quickreply').append(success['TPL_BODY']);
  386.             var cur_id = '';
  387.             /*
  388.             * using this we can get the last id of our quickreply
  389.             * this should be done using the :last select, unfortunately that doesn't work
  390.             */
  391.             pjb('#pjb-quickreply').children().each( function () {
  392.                 cur_id = pjb(this).attr('id');
  393.             });
  394.            
  395.             // we need to bind the click to the new quickedit button
  396.             pjb('.qe-icon a').bind('click', function() {
  397.                 post_id = pjb(this).attr('id');
  398.                 post_id = post_id.replace(/quickedit/g, ''); // filter out the post ID
  399.  
  400.                 // check if quick edit is already enabled
  401.                 if(popup_open != true)
  402.                 {
  403.                     cur_location = pjb(location).attr('href');
  404.                     data = 'mode=quickedit&qe_mode=init&post_id=' + post_id + '&location=' + location;
  405.                     pjB_do_ajax('open', data, true);
  406.                     popup_open = true;
  407.                     cur_post_id = post_id;
  408.                 }
  409.             });
  410.  
  411.             pjb('#qr_editor_div textarea.inputbox').val('');
  412.             pjb('#' + cur_id).fadeIn('slow');
  413.            
  414.            
  415.             pjB_output_info(success['SUCCESS_TITLE'], success['SUCCESS_MESSAGE'], true);
  416.            
  417.         }
  418.     }
  419. }
  420.  
  421. /**
  422. * handle login messages
  423. * @param (json) data
  424. */
  425. function pjB_login(data)
  426. {  
  427.     if(data['ERROR'])
  428.     {
  429.         for(i = 0; i < data['ERROR_COUNT']; i++)
  430.         {
  431.             pjB_output_info('', data['ERROR'][i], false);
  432.         }
  433.     }
  434.     else
  435.     {
  436.         pjB_output_info('Logout', data['SUCCESS'], true);
  437.         setTimeout (
  438.             'window.location="' + data['LINK'] + '";',
  439.             1000 // 1 second until page reload
  440.         );
  441.     }
  442. }
  443.  
  444. /**
  445. * get template for login
  446. *
  447. * @param (json) data
  448. */
  449. function pjB_login_template(data)
  450. {
  451.     message = data['TPL_BODY'];
  452.    
  453.     login_instance = pjb("#pjb-container").notify("create",
  454.     {
  455.         title: "Logout",
  456.         text: message
  457.     },
  458.     {
  459.         expires: false
  460.     });
  461.    
  462.     login_open = true;
  463.    
  464.     bind_quickedit_buttons();
  465. }
  466.  
  467. /**
  468. * check for new PMs
  469. * if there are any update new PM message, if needed
  470. *
  471. * @param (JSON) Json data holding info for new PMs
  472. */
  473. function pjB_check_pm(data)
  474. {
  475.     /*
  476.     * no error handling ... it's not like anyone would care
  477.     */
  478.     if(new_pm_count != data['NEW_PM_COUNT'] && data['NEW_PM_COUNT'] > 0 && data['NEW_PM'])
  479.     {
  480.         pjB_output_info('<a id="popupHeader" href="./ucp.php?i=pm&amp;folder=inbox">' + data['NEW_PM_MSG'] + '</a>', 'A new private message is waiting for you in your Inbox.<br /><br /><a class="postlink" href="./ucp.php?i=pm&amp;folder=inbox">User Control Panel</a>', false);
  481.         new_pm_count = data['NEW_PM_COUNT'];
  482.     }
  483. }
  484.  
  485. /**
  486. * creates a new jQuery UI notification message
  487. * @todo: create different design for errors
  488. *
  489. * @param (string) title = Title of the message
  490. * @param (string) message = Message that will be displayed
  491. * @param (bool) expire = define if the message should be faded out after 5 seconds
  492. */
  493. function pjB_output_info(title, message, expire)
  494. {
  495.     if(expire)
  496.     {
  497.         pjb("#pjb-container").notify("create", {
  498.             title: title,
  499.             text: message
  500.         });
  501.     }
  502.     else
  503.     {
  504.         pjb("#pjb-container").notify("create", {
  505.             title: title,
  506.             text: message
  507.         },{
  508.             expires: false
  509.         });
  510.     }
  511. }
  512.  
  513. /**
  514. * general AJAX function
  515. */
  516. function pjB_do_ajax(mode, data, use_json)
  517. {
  518.     if(use_json)
  519.     {
  520.         var datatype = 'json';
  521.     }
  522.     else
  523.     {
  524.         var datatype = 'html';
  525.     }
  526.  
  527.     pjb.ajax({
  528.         type: 'POST',
  529.         data: data,
  530.         dataType: datatype,
  531.         url: './jquery_base.php',
  532.         success: function(data){
  533.             switch(mode)
  534.             {
  535.                 case 'open':
  536.                     pjb('#quickeditError').html('');
  537.                     open_edit(data);
  538.                 break;
  539.                 case 'submit':
  540.                     submit_edit(data);
  541.                 break;
  542.                 case 'advanced_edit':
  543.                     advanced_edit(data);
  544.                 break;
  545.                 case 'mark_read':
  546.                     mark_read(data);
  547.                 break;
  548.                 case 'quickreply':
  549.                     quickreply(data);
  550.                 break;
  551.                 case 'login':
  552.                     pjB_login(data);
  553.                 break;
  554.                 case 'login_template':
  555.                     pjB_login_template(data)
  556.                 break;
  557.                 case 'check_pm':
  558.                     pjB_check_pm(data);
  559.                 break;
  560.             }
  561.         }
  562.     });
  563. }
  564.  
  565. /**
  566. *   some initial vars, needed for the next few functions
  567. */
  568. // Check for Browser & Platform for PC & IE specific bits
  569. // More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
  570. var clientPC = navigator.userAgent.toLowerCase(); // Get client info
  571. var clientVer = parseInt(navigator.appVersion); // Get browser version
  572.  
  573. var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -1));
  574. var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
  575.  
  576. var baseHeight;
  577.  
  578. bbcode = new Array();
  579. qe_bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]', '[spoiler]', '[/spoiler]');
  580.  
  581. /** Below are all functions regarding BBCodes and the way they are inserted into the textbox
  582. *   Please do not change anything as this might cause major problems
  583. *   Functions are based on the functions in editor.js of prosilver
  584. *   bbCode control by subBlue design [ www.subBlue.com ]
  585. *   Includes unixsafe colour palette selector by SHS`
  586. *   modified by Marc Alexander: - changed in order to work with jQuery Quick Edit
  587. *                               - added jQuery functions
  588. */
  589.  
  590.  
  591.  
  592. var qe_txt_name = 'jqe-message';
  593. var qe_txt_name2 = '#jqe-message';
  594.  
  595.  
  596.  
  597. /**
  598. * Fix a bug involving the TextRange object. From
  599. * http://www.frostjedi.com/terra/scripts/demo/caretBug.html
  600. */
  601. function qe_initInsertions()
  602. {
  603.     //var textarea = document.getElementById(qe_txt_name);
  604.     var textarea = pjb(qe_txt_name2);
  605.  
  606.     if (is_ie && typeof(baseHeight) != 'number')
  607.     {
  608.         //textarea.focus(); // fix stack overflow error in IE
  609.         baseHeight = document.selection.createRange().duplicate().boundingHeight;
  610.     }
  611. }
  612.  
  613. /**
  614. * bbstyle
  615. */
  616. function qe_bbstyle(bbnumber)
  617. {  
  618.     if (bbnumber != -1)
  619.     {
  620.         qe_bbfontstyle(qe_bbtags[bbnumber], qe_bbtags[bbnumber+1]);
  621.     }
  622.     else
  623.     {
  624.         qe_insert_text('[*]');
  625.         document.getElementById(qe_txt_name).focus();
  626.     }
  627. }
  628.  
  629. /**
  630. * Apply bbcodes
  631. */
  632. function qe_bbfontstyle(bbopen, bbclose)
  633. {
  634.     theSelection = false;
  635.  
  636.     var textarea = document.getElementById(qe_txt_name);
  637.  
  638.     textarea.focus();
  639.  
  640.     if ((clientVer >= 4) && is_ie && is_win)
  641.     {
  642.         // Get text selection
  643.         theSelection = document.selection.createRange().text;
  644.  
  645.         if (theSelection)
  646.         {
  647.             // Add tags around selection
  648.             document.selection.createRange().text = bbopen + theSelection + bbclose;
  649.             document.getElementById(qe_txt_name).focus();
  650.             theSelection = '';
  651.             return;
  652.         }
  653.     }
  654.     else if (document.getElementById(qe_txt_name).selectionEnd && (document.getElementById(qe_txt_name).selectionEnd - document.getElementById(qe_txt_name).selectionStart > 0))
  655.     {
  656.         qe_mozWrap(document.getElementById(qe_txt_name), bbopen, bbclose);
  657.         document.getElementById(qe_txt_name).focus();
  658.         theSelection = '';
  659.         return;
  660.     }
  661.    
  662.     //The new position for the cursor after adding the bbcode
  663.     var caret_pos = qe_getCaretPosition(textarea).start;
  664.     var new_pos = caret_pos + bbopen.length;       
  665.  
  666.     // Open tag
  667.     qe_insert_text(bbopen + bbclose);
  668.  
  669.     // Center the cursor when we don't have a selection
  670.     // Gecko and proper browsers
  671.     if (!isNaN(textarea.selectionStart))
  672.     {
  673.         textarea.selectionStart = new_pos;
  674.         textarea.selectionEnd = new_pos;
  675.     }  
  676.     // IE
  677.     else if (document.selection)
  678.     {
  679.         var range = textarea.createTextRange();
  680.         range.move("character", new_pos);
  681.         range.select();
  682.         qe_storeCaret(textarea);
  683.     }
  684.  
  685.     textarea.focus();
  686.     return;
  687. }
  688.  
  689. /**
  690. * Insert text at position
  691. */
  692. function qe_insert_text(text, spaces, popup)
  693. {
  694.     var textarea;
  695.    
  696.     if (!popup)
  697.     {
  698.         textarea = document.getElementById(qe_txt_name);
  699.     }
  700.     else
  701.     {
  702.         textarea = opener.document.getElementById(qe_txt_name);
  703.     }
  704.     if (spaces)
  705.     {
  706.         text = ' ' + text + ' ';
  707.     }
  708.    
  709.     // Since IE9, IE also has textarea.selectionStart, but it still needs to be treated the old way.
  710.     // Therefore we simply add a !is_ie here until IE fixes the text-selection completely.
  711.     if (!isNaN(textarea.selectionStart) && !is_ie)
  712.     {
  713.         var sel_start = textarea.selectionStart;
  714.         var sel_end = textarea.selectionEnd;
  715.  
  716.         qe_mozWrap(textarea, text, '');
  717.         textarea.selectionStart = sel_start + text.length;
  718.         textarea.selectionEnd = sel_end + text.length;
  719.     }
  720.     else if (textarea.createTextRange && textarea.caretPos)
  721.     {
  722.         if (baseHeight != textarea.caretPos.boundingHeight)
  723.         {
  724.             textarea.focus();
  725.             qe_storeCaret(textarea);
  726.         }
  727.  
  728.         var caret_pos = textarea.caretPos;
  729.         caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text;
  730.     }
  731.     else
  732.     {
  733.         textarea.value = textarea.value + text;
  734.     }
  735.     if (!popup)
  736.     {
  737.         textarea.focus();
  738.     }
  739. }
  740.  
  741. /**
  742. * From http://www.massless.org/mozedit/
  743. */
  744. function qe_mozWrap(txtarea, open, close)
  745. {
  746.     var selLength = (typeof(txtarea.textLength) == 'undefined') ? txtarea.value.length : txtarea.textLength;
  747.     var selStart = txtarea.selectionStart;
  748.     var selEnd = txtarea.selectionEnd;
  749.     var scrollTop = txtarea.scrollTop;
  750.  
  751.     if (selEnd == 1 || selEnd == 2)
  752.     {
  753.         selEnd = selLength;
  754.     }
  755.  
  756.     var s1 = (txtarea.value).substring(0,selStart);
  757.     var s2 = (txtarea.value).substring(selStart, selEnd);
  758.     var s3 = (txtarea.value).substring(selEnd, selLength);
  759.  
  760.     txtarea.value = s1 + open + s2 + close + s3;
  761.     txtarea.selectionStart = selStart + open.length;
  762.     txtarea.selectionEnd = selEnd + open.length;
  763.     txtarea.focus();
  764.     txtarea.scrollTop = scrollTop;
  765.  
  766.     return;
  767. }
  768.  
  769. /**
  770. * Insert at Caret position. Code from
  771. * http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
  772. */
  773. function qe_storeCaret(textEl)
  774. {
  775.     if (textEl.createTextRange)
  776.     {
  777.         textEl.caretPos = document.selection.createRange().duplicate();
  778.     }
  779. }
  780.  
  781. /**
  782. * Caret Position object
  783. */
  784. function qe_caretPosition()
  785. {
  786.     var start = null;
  787.     var end = null;
  788. }
  789.  
  790. /**
  791. * Get the caret position in an textarea
  792. */
  793. function qe_getCaretPosition(txtarea)
  794. {
  795.     var caretPos = new qe_caretPosition();
  796.    
  797.     // simple Gecko/Opera way
  798.     if(txtarea.selectionStart || txtarea.selectionStart == 0)
  799.     {
  800.         caretPos.start = txtarea.selectionStart;
  801.         caretPos.end = txtarea.selectionEnd;
  802.     }
  803.     // dirty and slow IE way
  804.     else if(document.selection)
  805.     {
  806.    
  807.         // get current selection
  808.         var range = document.selection.createRange();
  809.  
  810.         // a new selection of the whole textarea
  811.         var range_all = document.body.createTextRange();
  812.         range_all.moveToElementText(txtarea);
  813.        
  814.         // calculate selection start point by moving beginning of range_all to beginning of range
  815.         var sel_start;
  816.         for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
  817.         {      
  818.             range_all.moveStart('character', 1);
  819.         }
  820.    
  821.         txtarea.sel_start = sel_start;
  822.    
  823.         // we ignore the end value for IE, this is already dirty enough and we don't need it
  824.         caretPos.start = txtarea.sel_start;
  825.         caretPos.end = txtarea.sel_start;          
  826.     }
  827.  
  828.     return caretPos;
  829. }
  830.  
  831. // ]]>
  832. </script>
  833.    
  834.     <!-- <script type="text/javascript" src="./styles/we_clearblue/template/jquery-1.10.2.min.js"></script> -->
  835.    
  836.     <script>
  837.     $(function(){
  838.         $('.social_icons').hover(function () {
  839.             $(this).find('img:last-child').stop().fadeOut('fast');
  840.         }, function () {
  841.             $(this).find('img:last-child').stop().fadeIn('fast');
  842.         });
  843.     });
  844.     </script>
  845.    
  846.     <script>
  847.         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  848.         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  849.             m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  850.         })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  851.    
  852.         ga('create', 'UA-44734426-1', 'el-rp.com');
  853.         ga('send', 'pageview');
  854.     </script>
  855.    
  856.     <!-- Slider -->
  857.     <link href="./styles/we_clearblue/template/slider/css/skitter.styles.css" type="text/css" media="all" rel="stylesheet" />
  858.     <script type="text/javascript" src="./styles/we_clearblue/template/slider/js/jquery.easing.1.3.js"></script>
  859.     <script type="text/javascript" src="./styles/we_clearblue/template/slider/js/jquery.skitter.min.js"></script>
  860.    
  861.     <script type="text/javascript">
  862.         $(document).ready(function() {
  863.             $('.box_skitter_large').skitter({
  864.                 theme: 'square',
  865.                 numbers_align: 'right',
  866.                 with_animations: ['fadeFour', 'fade', 'block', 'cubeStopRandom', 'circles'],
  867.                 numbers: false,
  868.                 navigation: false,
  869.                 interval: 5000,
  870.                 show_randomly: true,
  871.             });
  872.         });
  873.     </script>
  874.  
  875.  
  876. <script type="text/javascript" src="./mchat/jquery_cookie_mini.js"></script>
  877. <script type="text/javascript">
  878.  
  879.     function countAdClick(id)
  880.     {
  881.        loadXMLDoc('./ads/click.php?a=' + id);
  882.     }
  883.  
  884.     function countAdView(id)
  885.     {
  886.        loadXMLDoc('./ads/view.php?a=' + id);
  887.     }
  888.  
  889.     function loadXMLDoc(url) {
  890.        req = false;
  891.        if(window.XMLHttpRequest) {
  892.           try {
  893.              req = new XMLHttpRequest();
  894.           } catch(e) {
  895.              req = false;
  896.           }
  897.        } else if(window.ActiveXObject) {
  898.           try {
  899.              req = new ActiveXObject("Msxml2.XMLHTTP");
  900.           } catch(e) {
  901.              try {
  902.                 req = new ActiveXObject("Microsoft.XMLHTTP");
  903.              } catch(e) {
  904.                 req = false;
  905.              }
  906.           }
  907.        }
  908.        if(req) {
  909.           req.open("GET", url, true);
  910.           req.send(null);
  911.        }
  912.     }
  913. </script>
  914. </head>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement