function toggleTextOut(e,txtval) {
	if(e.value=="") e.value = txtval;

}
function toggleTextIn(e,txtval) {
	if(e.value==txtval) e.value="";
	else e.select();
}

$(document).ready(function(){
	$(".swap").hover(
			function(){
				if($(this).attr("src").indexOf("-on") == -1) {
				var newSrc = $(this).attr("src").replace(".gif","-on.gif");
				$(this).attr("src",newSrc);
				}},
				function(){
				if($(this).attr("src").indexOf(".gif") != -1) {
				var oldSrc = $(this).attr("src").replace("-on.gif",".gif");
				$(this).attr("src",oldSrc);
				}
				});
	
	//Navigation 
	$(".datagrid table tr:even").addClass("odd");

	//equel height
	
	jQuery.fn.setEqualHeight=function(o) {
    	var maxHeight=0;
    	var maxElement=null;
     	jQuery(this).each(function(i) {
          		if((jQuery(this).height()+parseInt(jQuery(this).css("padding-bottom"))+parseInt(jQuery(this).css("padding-top")))>maxHeight) {
    			maxHeight=jQuery(this).height()+parseInt(jQuery(this).css("padding-top"))+parseInt(jQuery(this).css("padding-bottom"));
    			maxElement=this;
    		}
    	});
    	jQuery(this).not($(maxElement)).each(function() {$(this).height(maxHeight-parseInt(jQuery(this).css("padding-top"))-parseInt(jQuery(this).css("padding-bottom")))})
    }
	
	
});

