﻿var _self = null;
function WaitScreen(cont) {
    this.browser = new BrowserDetect().browser ;

    this.container = jQuery("#" + cont);
    if (!this.container) {
		alert ("ERROR!\nNo placeholder defined!") ;
		return false ;
	}
	this.func = '';
    this.boolWord = null;
    
    this.doShow = WaitScreen_doShow;
    this.doShowA = WaitScreen_doShowA;
    this.doHide = WaitScreen_doHide;
    this.doExecFunc = ExecFunc;
    this.doExecFuncA = ExecFuncA;
}

function WaitScreen_doShow(funcS, word) {    
    this.container.show();
    this.boolWord = word;
    this.func = funcS;
    _self = this;
    jQuery().oneTime("1s", _self.doExecFunc);
}
function WaitScreen_doHide() {
    this.container.hide();    
}
function ExecFunc(){
    //eval(self.func + "(" + self.boolWord + ")");
    _self.func(_self.boolWord);
    _self.container.hide();
}

//------------------------------------------------------------//
function WaitScreen_doShowA(funcS) {    
    this.container.show();    
    this.func = funcS;
    _self = this;
    jQuery().oneTime("1s", _self.doExecFuncA);
}
function ExecFuncA(){
    //eval(self.func + "(" + self.boolWord + ")");
    _self.func();
    _self.container.hide();
}

