function isEmpty(elem, helperMsg,value_txt){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus(); // set the focus to this input
		elem.value=value_txt;
		return true;
	}
	return false;
}


function showDivTag(eid){
 document.getElementById(eid).style.display = 'block';
 document.getElementById(eid).style.visibility = 'visible';
 }


function hideDivTag(eid) {
 //document.getElementById(eid).style.visibility = 'hidden';
 $("#"+eid).hide();
}
 
function dc_show(conid, fwidth){
 document.getElementById(conid).style.display = 'block';
 document.getElementById(conid).style.visibility = 'visible';
 document.getElementById(conid).style.width = fwidth + 'px';
 document.getElementById(conid).style.Height = 'auto';
 document.getElementById(conid).style.marginLeft = '-' + Math.round(fwidth/2) + 'px';
 var dtop = (window.outerHeight /2) - ( document.getElementById(conid).clientHeight  / 2) - 100;
 if (dtop < 100) dtop=100;
 dtop = dtop + window.pageYOffset;
 document.getElementById(conid).style.top = dtop + 'px';
 }

function dc_closeLink(obj) {
 var conid = obj.parentNode.parentNode.id;
  $("#"+conid +"").hide();
}

function dc_init() {
        var alldivs, i;
        alldivs=document.getElementsByTagName('div');
    for (i in alldivs) {    
       if (alldivs[i].className=='divframe') {
                alldivs[i].style.visibility = 'hidden';
       }
    }
}

function changeClass(idElement, newClass){
    document.getElementById(idElement).setAttribute("class", newClass);
}
