<!--
/*
 -------------------------------------------------------------------------------
|  Copyright (C) 2005 Azalea Technology. All rights reserved.                   |
|-------------------------------------------------------------------------------|
|  Unauthorized removal of this notice is considered a violation of the         |
|  license agreement under which this Code may be used. This work is protected  |
|  under United States copyright law and the similar law(s) of other countries  |
|  under which such as work is afforded legal protection, and upon conviction   |
|  of such a violation in a court of applicable jurisdiction, such person(s)    |
|  may be subject to the maximum allowable penalty as permitted under such law. |
|-------------------------------------------------------------------------------|
|  You acknowledge and agree that information presented to you through this     |
|  site (the "Web Site") is protected by all applicable copyrights, trademarks, |
|  service marks, patents or other proprietary rights and laws, and by virtue   |
|  of accessing the Web Site, except as expressly authorized by the Azalea      |
|  Technology, LLC., you agree not to modify, rent, lease, loan, sell,          |
|  distribute, store, or create derivative works based on the Web Site, in      |
|  whole or in part.                                                            |
 -------------------------------------------------------------------------------

      Purpose: DHTML functions
	     Date: Sunday, June 26, 2005 6:59 PM CST
   Programmer: Benjamin Roberts (broberts@azaleatech.com)
               Azalea Technology, LLC.
               P.O. Box 131150
			   Tyler, TX 75713-1150
*/

// IDENTIFY THE ELEMENT WITHIN A FEW OF THE DIFFERENT IMPLEMENTATIONS OF THE DOM (IE, FIREFOX, ETC.)
function identify_element(strID){
    var element;
    if(document.all) element = eval("document.all."+strID);
    else if(document.getElementById) element = document.getElementById(strID);
    else element = null;
    return element;
}

// DYNAMICALLY WRITE TEXT TO THE CONTENTS OF AN ELEMENT
function write_text_to_element(strID,strText){
    var element = identify_element(strID);
    if(element!=null){
        if(element.innerHTML) element.innerHTML = strText;
    }
}

// DYNAMICALLY SET THE COLOR CSS PROPERTY OF AN ELEMENT
function set_font_color(strID,strHEXcolorCode){
    var element = identify_element(strID);
    if(element!=null) element.style.color=strHEXcolorCode;
}

// DYNAMICALLY SET THE FONT-SIZE CSS PROPERTY OF AN ELEMENT
function set_font_size(strID,strValue){
    var element = identify_element(strID);
    if(element!=null) element.style.fontSize=strValue;
}

// DYNAMICALLY SET THE FONT-WEIGHT CSS PROPERTY OF AN ELEMENT
function set_font_weight(strID,strValue){
    var element = identify_element(strID);
    if(element!=null) element.style.fontWeight=strValue;
}

// DYNAMICALLY SET THE BACKGROUND-COLOR CSS PROPERTY OF AN ELEMENT
function set_bgcolor(strID,strHEXcolorCode){
    var element = identify_element(strID);
    if(element!=null) element.style.backgroundColor=strHEXcolorCode;
}

// DYNAMICALLY SET THE BORDER COLOR CSS PROPERTY OF AN ELEMENT
function set_border_color(strID,strHEXcolorCode){
    var element = identify_element(strID);
    if(element!=null) element.style.borderColor=strHEXcolorCode;
}

// DYNAMICALLY SET THE CLASS NAME PROPERTY OF AN ELEMENT
function set_class_name(strID,strClassName){
    var element = identify_element(strID);
    if(element!=null) element.className=strClassName;
}

// DYNAMICALLY HIDE AN ELEMENT BY SETTING CSS DISPLAY PROPERTY
function hideBlock(nr){
	if (document.layers) document.layers[nr].display = 'none';
	else if (document.all) document.all[nr].style.display = 'none';
	else if (document.getElementById) document.getElementById(nr).style.display = 'none';
}

// DYNAMICALLY HIDE AN ELEMENT BY SETTING CSS DISPLAY PROPERTY
function showBlock(nr){
	if (document.layers) document.layers[nr].display = 'block';
	else if (document.all) document.all[nr].style.display = 'block';
	else if (document.getElementById) document.getElementById(nr).style.display = 'block';
}

// DYNAMICALLY HIDE OR SHOW AN ELEMENT BY SETTING CSS DISPLAY PROPERTY
function blocking(nr){
	if (document.layers){
		current = (document.layers[nr].display == 'none') ? 'block' : 'none';
		document.layers[nr].display = current;
	}
	else if (document.all){
		current = (document.all[nr].style.display == 'none') ? 'block' : 'none';
		document.all[nr].style.display = current;
	}
	else if (document.getElementById){
		vista = (document.getElementById(nr).style.display == 'none') ? 'block' : 'none';
		document.getElementById(nr).style.display = vista;
	}
}

//-->
