/*function openCalendar(FormElement){
	var calendarwindow;
	url = "calendar.html?formname=resform&formelement=" + FormElement;
	calendarwindow = window.open(url,"thewindow","toolbar=no,LEFT=700,TOP=400,WIDTH=180,HEIGHT=150,status=no,scrollbars=no,resize=no,menubar=no");
	calendarwindow.focus();
}*/

function createRollovers() {
    var onText = "_on",
        offText = "_off";
 
    $('img.rollover').each( function() {

        var onImg = $(this).attr('src').replace(offText,onText),
            offImg = $(this).attr('src').replace(onText,offText);
        
        $(this).bind('mouseenter', function () {
            $(this).attr('src', onImg );
        });
        $(this).bind('mouseleave', function () {
            $(this).attr('src', offImg );
        });
    });
 
    return;
}

function createLinkTargets() {
    $('a.newWindow').each( function() {
        $(this).bind( 'click', function () {
            var newWindow = window.open($(this).attr('href'));
            return false;
        });
    });
    return;
}

function clearText(){
    if ($(this).defaultValue == $(this).value) {
	    $(this).value = ''
    } else if ($(this).value == '') {
	    $(this).value = $(this).defaultValue
    };
}

$(document).ready(function () {
    createRollovers();
    createLinkTargets();
    
});
