// None of the pages in the main iReport app use this file, but the following
// external pages load it (according to cache server; there may be more):
//   http://audience.ireport.com/services/cnn/ireport/confirm.do
//   http://audience.ireport.com/services/cnn/ireport/regwall/displayname.do
//   http://audience.ireport.com/services/cnn/ireport/regwall/profiledisplay.do
//   http://audience.ireport.com/services/cnn/login.do
//   http://audience.ireport.com/services/cnn/passHint.do
//   http://i.cdn.turner.com/cnn/.element/swf/2.0/sect/ireport/widget.swf
//   http://www.ireport.com/themes/custom/resources/xmp/videoWall.swf
// Please document external dependencies on this file. --kyrogers,13nov08

function show(id){ 
    if ($(id).style.display == 'none') {
        $(id).style.display = '';
    } else {
        $(id).style.display = 'none';
    }
}

function hide(id){ 
    $(id).style.display = 'none';
}

function showAndHide(id,id2) {
    $(id).style.display = 'block';
    $(id2).style.display = 'none';
}

function UpdateTxtInput(obj, strTxt) {
    if(obj.value == strTxt) {
        obj.value='';
    }
    else if(obj.value == '') {
        obj.value = strTxt;
    }
}

function disableRegistrationForm(theform) {

    var form = document.forms[theform];
    
    var limit = form.elements.length;
    for (i=0;i<limit;i++) {
        form.elements[i].disabled = true;
    }
}

function enableSubmit(control, objName) {

    if ($(control).checked) {
        $(objName).disabled = false;
    }
    else {
        $(objName).disabled = true;
    }
    
}
