

function clearDefaultText(event) {
    var target = window.event ? window.event.srcElement : event ? event.target : null;
    if (!target) return;
    if (target.value == target.defaultText) {
        target.value = '';
    }
}

function replaceDefaultText(event) {
    var target = window.event ? window.event.srcElement : event ? event.target : null;
    if (!target) return;
    if (target.value == '' && target.defaultText) {
        target.value = target.defaultText;
    }
}

function BindEvents() {

   var formInputs = document.getElementsByTagName('INPUT');
    for (var i=0; i<formInputs.length; i++) {
        var theInput = formInputs[i];
        if ((theInput.type == 'text' || theInput.type == 'password') && (theInput.className.match(/\bclrdef\b/))) {  
		theInput.onfocus = clearDefaultText;
		theInput.onblur = replaceDefaultText;
            if (theInput.value != '') {
                theInput.defaultText = theInput.value;
            }
        }
    }	
	
}

function emphasizedContentPopupOpen()
{
	window.open("/index.php?popup=1", "", "status = 1, height = 600, width = 650, resizable = 0" )

}

if (window.attachEvent) {
	// IE
	window.attachEvent("onload", BindEvents);

} else {
	// DOM
	window.addEventListener("load", BindEvents, false);

}




