(function(window){ var _cb = function(){ var self = this; // bootstrapping this.baseurl = baseurl; this.imageurl = ""; this.page = this.baseurl+'/ajax.php'; this.loading_img = ""; this.loading = this.loading_img+" Loading..."; this.download = 0; this.total_size = 0; this.cur_speed = 0; this.status_refesh = 1 //in seconds this.result_page = this.baseurl+'/actions/file_results.php'; this.download_page = this.baseurl+'/actions/file_downloader.php'; this.count = 0; this.hasLoaded = false; this.perc_download = 0; this.force_stop = false; // this.remoteObjID = this.randomString(); this.remoteObjID = ""; this.current_menu = ""; this.normal_player_html = ''; this.hq_player_html = ''; this.has_hq_function = false; this.collectionID = false; this.keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; this.ua = navigator.userAgent.toLowerCase(); if (this.ua.indexOf(" chrome/") >= 0 || this.ua.indexOf(" firefox/") >= 0 || this.ua.indexOf(' gecko/') >= 0) { var StringMaker = function () { this.str = ""; this.length = 0; this.append = function (s) { this.str += s; this.length += s.length; } this.prepend = function (s) { this.str = s + this.str; this.length += s.length; } this.toString = function () { return this.str; } } } else { var StringMaker = function () { this.parts = []; this.length = 0; this.append = function (s) { this.parts.push(s); this.length += s.length; } this.prepend = function (s) { this.parts.unshift(s); this.length += s.length; } this.toString = function () { return this.parts.join(''); } } } this.setRemoteId = function(){ this.remoteObjID = this.randomString(); }; this.Confirm_Delete = function(delUrl){ var self = this; if (confirm("Are you sure you want to delete")) { document.location = delUrl; } }; this.Confirm_Uninstall = function(delUrl) { var self = this; if (confirm("Are you sure you want to uninstall this plugin ?")) { document.location = delUrl; } }; this.confirm_it = function(msg){ var self = this; var action = confirm(msg); if(action) { return true; }else return false; }; this.reloadImage = function(captcha_src,imgid){ var self = this; img = document.getElementById(imgid); img.src = captcha_src+'?'+Math.random(); }; this.validate_category_form = function(thisform){ var self = this; with(thisform){ if (validate_required(title,"Title must be filled out!")==false){ title.focus(); return false; } if (validate_required(description,"Description must be filled out!")==false){ description.focus(); return false; } } }; this.validate_ad_form = function(thisform){ var self = this; with (thisform){ if (validate_required(name,"Name must be filled out!")==false){ name.focus(); return false; } if (validate_required(type,"Type must be filled out!")==false){ type.focus(); return false; } if (validate_required(syntax,"Syntax Must Be Filled Out")==false){ syntax.focus(); return false; } if (validate_required(code,"Code Must Be Filled Out")==false){ code.focus();return false; } } }; this.randomString = function(){ var self = this; var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; var string_length = 8; var randomstring = ''; for (var i=0; i