messageObj = new DHTML_modalMessage();	// We only create one object of this class
messageObj.setShadowOffset(5);	// Large shadow


function displayMessage(url)
{
	
	messageObj.setSource(url);
	messageObj.setCssClassMessageBox(false);
	messageObj.setSize(300,500);
	messageObj.setShadowDivVisible(true);	// Enable shadow for these boxes
	messageObj.display();
}

function displayStaticMessage(messageContent,cssClass)
{
	messageObj.setHtmlContent(messageContent);
	messageObj.setSize(300,150);
	messageObj.setCssClassMessageBox(cssClass);
	messageObj.setSource(false);	// no html source since we want to use a static message here.
	messageObj.setShadowDivVisible(false);	// Disable shadow for these boxes	
	messageObj.display();
	
	
}

function closeMessage()
{
	messageObj.close();	
}

function mask(str,textbox,loc,delim){
var locs = loc.split(',');

for (var i = 0; i <= locs.length; i++){
	for (var k = 0; k <= str.length; k++){
	 if (k == locs[i]){
	  if (str.substring(k, k+1) != delim){
	    str = str.substring(0,k) + delim + str.substring(k,str.length)
	  }
	 }
	}
 }
textbox.value = str
}

function showHide_2(cboxid,elementid){
if (document.getElementById(cboxid).checked){
document.getElementById(elementid).style.display = 'inline';
} else {
document.aspnetForm.ctl00_ContentPlaceHolder1_txtSpecial.value="";
document.getElementById(elementid).style.display = 'none';

}
}

function showHide_1(rbtnList,elementid)
{
    if (rbtnList == "Other" || rbtnList == "No")
{
document.getElementById(elementid).style.display = 'inline';
} 
else 
{
document.getElementById(elementid).style.display = 'none';
}
}

function showHide_3(cboxid, elementid) {
    if (document.getElementById(cboxid).checked) {
        document.getElementById(elementid).style.display = 'inline';
    } else {
        document.getElementById(elementid).style.display = 'none';
    }
}

function Flasher(controlId) {
    var _control = document.getElementById(controlId);
    var _styles = { FlashDark: 'FlashLight', FlashLight: 'FlashDark' };

    this.start = start;
    this.timerId = null;

    function start(interval) {
        this.timerId = window.setInterval(flash, interval);
    }

    function flash() {
        if (!_control) return; //or throw an exception

        _control.className = _styles[_control.className];
    }
}

function showHide(cboxid, elementid) {
    if (document.getElementById(cboxid).checked) {
        document.getElementById(elementid).style.display = 'none';
    } else {
        document.getElementById(elementid).style.display = 'inline';
    }
}


