// JavaScript Document

/* funções de comportamento das caixas de texto */

$(document).ready(function() {
	swfobject.registerObject("FlashID");
});


function txt_init(tb) {
	tb.onfocus = function(){txt_focus(tb);};
	tb.onblur = function(){txt_blur(tb);};
}

function txt_focus(tb) {
	if (tb.value == tb.defaultValue) {
		tb.value = "";
	}	
}

function txt_blur(tb) {
	var newVal = tb.value;
	if (newVal=="" || newVal==tb.defaultValue) {
		tb.value = tb.defaultValue;
	}
}

function pwd_init(tb) {
		tb.onfocus = function(){pwd_focus(tb);};
		tb.onblur = function(){pwd_blur(tb);};
}

function pwd_focus(tb) {
	if (tb.value == tb.defaultValue) {
		tb.value = "";
		tb.type = "password"
	}
}

function pwd_blur(tb) {
	var newVal = tb.value;
	if (newVal=="" || newVal==tb.defaultValue) {
		tb.value = tb.defaultValue;
		tb.type = "text";
	}
}
