/* function to show and hide contact info

/*
	jsLOG: Provides logging functionality for javascript.
	Constructor parameters:
		- param_newwindow (boolean) : if logging is displayed in a new window, if not, pop-ups will be shown.
		- param_active (boolean)  : if logging is activated
*/

var VAR_LOG_COUNTER = 1;

function jsLOG(param_active, param_newwindow) {

	// Public data fields
	this.enabled = param_active;
	this.newWindow = param_newwindow;
	this.logWindow = null;

	// Methods

	// log : Displays the log line in the log.
	function jsLOG_log(param_logline) {
		if ( this.enabled == true ) {
			if ( this.newWindow == true ) {
				if ( this.logWindow ) {
				} else {
					this.createWindow();
				}
				this.logWindow.document.writeln ('<xmp>' + param_logline + '</xmp>---<BR>');
			} else {
				window.alert ( param_logline );
			}
		}
	}
	this.log = jsLOG_log;


}

/* jsBasic: Provides a set of basic methods for javascript.
   no constructor parameters
*/
function jsBasic (){
/*
[public methods]
- log
- popup
- popupfull
- show
- hide
- setText
- setTrColor
*/
	
	// this property contains the log obj	
	this.logClass = null;
	
	
	//- START log settings
	//*** method setLog : sets the internal log class
	function jsBasic_setLog(param_active, param_newwindow){
		this.logClass = new jsLOG(param_active, param_newwindow);
	}
	this.setLog = jsBasic_setLog;
	
	//*** method log : sends the text to the log
    function Page_log( param_str ) {
      this.logClass.log ( param_str );
    }
    this.log = Page_log;
	//- END log settings
	
	
	//***method to show divs
	function jsBasic_show(param_obj){
	    if (document.getElementById && document.getElementById(param_obj) != null) {
			this.log('[show method - executing show method for object id: ' +  param_obj);
         	document.getElementById(param_obj).style.visibility='visible';
         	document.getElementById(param_obj).style.display='block';	
	    }
	}
	this.show = jsBasic_show;
	
	//***method to hide divs
	function jsBasic_hide(param_obj){
	    if (document.getElementById && document.getElementById(param_obj) != null) {
			this.log('[hide method - executing hide method for object id: ' +  param_obj);		
	         document.getElementById(param_obj).style.visibility='hidden';
	         document.getElementById(param_obj).style.display='none';
	    }	
	}
	this.hide = jsBasic_hide;
	
	
	//***method to set inner Text
	function jsBasic_setText(param_obj, param_text){
	    if (document.getElementById && document.getElementById(param_obj) != null) {
			this.log('[setText method - executing setText method for object id: ' +  param_obj);		
	         document.getElementById(param_obj).innerHTML = param_text;
	    }	
	}
	this.setText = jsBasic_setText;

	
//end jsBasic class	
}