/* ==================================================== ##
##             COPYRIGHTS © DANNEO PHP TEAM             ##
## ==================================================== ##
## PRODUCT : CMS(CONTENT MANAGEMENT SYSTEM)             ##
## LICENSE : GNU 2(General Public License v.2)          ##
## TECHNOLOGIES : PHP & MySQL                           ##
## WWW: www.danneo.com | www.danneo.ru | www.danneo.org ##
## E-MAIL : help@danneo.com                             ##
## ==================================================== */
// CLASS : DN_System_Load
// Init
function DN_System_Load(){
this.wib = screen.width;
this.heb = screen.height;
this.documes = (document.getElementById || document.createElement || document.getElementsByTagName) ? true : false;
this.objects = window.addEventListener || window.attachEvent ? window : document.addEventListener ? document : null;
this.types = 'load';
}
// ADDSEVENT
DN_System_Load.prototype.addsevent = function(func){
if(this.objects.addEventListener){
this.objects.addEventListener(this.types,func,false);
return true;
} else if (this.objects.attachEvent){
this.objects.attachEvent("on" + this.types,func);
} else {
return false;
}
}
// FIND OBJ
DN_System_Load.prototype.findobj = function(obj){
this.parent = window.document;
if(this.parent.getElementById && this.parent.getElementById(obj)){ return this.parent.getElementById(obj); }
if(this.parent[obj]){ return this.parent[obj]; }
if(this.parent.all && this.parent.all[obj]){ return this.parent.all[obj]; }
if(this.parent.layers && this.parent.layers[obj]){ return this.parent.layers[obj]; }
return null;
}
// BROWSER
DN_System_Load.prototype.browser = function(){
 this.ver = navigator.appVersion;
 this.agent = navigator.userAgent.toLowerCase();
 this.dom = document.getElementById ? 1:0;
 this.all = document.all ? 1:0;
 this.ie5 = (this.ver.indexOf("MSIE 5")>-1 && this.dom) ? 1:0;
 this.ie6 = (this.ver.indexOf("MSIE 6")>-1 && this.dom) ? 1:0;
 this.ie4 = (document.all && !this.dom) ? 1:0;
 this.ie = this.ie4 || this.ie5 || this.ie6;
 this.opera = this.agent.indexOf("opera")>-1;
 this.gecko = (this.agent.indexOf("gecko")!=-1) ? 1:0;
 this.bw = (this.ie || this.opera || this.gecko);
 return this;
}
// ALERTS
DN_System_Load.prototype.alerts = function(err){ alert(err); }
// CONFIRMS
DN_System_Load.prototype.confirms = function(str){ confirm(str); }
// PROMPTS
DN_System_Load.prototype.prompts = function(str,fix){ prompt(str,fix); }
// FIND OBJ
DN_System_Load.prototype.findobj = function(obj){
this.parent = window.document;
if(this.parent[obj]){ return this.parent[obj]; }
if(this.parent.all && this.parent.all[obj]){ return this.parent.all[obj]; }
if(this.parent.layers && this.parent.layers[obj]){ return this.parent.layers[obj]; }
if(this.parent.getElementById && this.parent.getElementById(obj)){ return this.parent.getElementById(obj); }
return null;
}

// RECAPTCHA
DN_System_Load.prototype.recaptcha = function(){
var t = new Date().getTime();
document.getElementById('captcha').innerHTML = '<img src="image.php?to=captcha&t=' + t + '" border="0"><br />';
}
// BLOCKCAPTCHA
DN_System_Load.prototype.blockcaptcha = function(){
var t = new Date().getTime();
document.getElementById('blockcaptcha').innerHTML = '<img src="image.php?to=captcha&t=' + t + '" border="0"><br />';
}
// BROKEN
DN_System_Load.prototype.broken = function(host,url){
if(confirm(message)){
 var open = host + '/' + url;
 window.location = open;
}
}
// CLASS : DN_System_Load


// INIT CLASS
var DN = new DN_System_Load();
// INIT CLASS

